File tree 3 files changed +6
-4
lines changed
android/app/src/main/kotlin/net/mullvad/mullvadvpn
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import net.mullvad.mullvadvpn.compose.test.SHADOWSOCKS_PORT_ITEM_AUTOMATIC_TEST_
27
27
import net.mullvad.mullvadvpn.compose.test.SHADOWSOCKS_PORT_ITEM_X_TEST_TAG
28
28
import net.mullvad.mullvadvpn.compose.transitions.SlideInFromRightTransition
29
29
import net.mullvad.mullvadvpn.compose.util.OnNavResultValue
30
+ import net.mullvad.mullvadvpn.constant.SHADOWSOCKS_AVAILABLE_PORTS
30
31
import net.mullvad.mullvadvpn.constant.SHADOWSOCKS_PRESET_PORTS
31
32
import net.mullvad.mullvadvpn.lib.model.Constraint
32
33
import net.mullvad.mullvadvpn.lib.model.Port
@@ -75,7 +76,7 @@ fun ShadowsocksSettings(
75
76
context.getString(R .string.shadowsocks),
76
77
),
77
78
customPort = state.customPort,
78
- allowedPortRanges = state.validPortRanges ,
79
+ allowedPortRanges = SHADOWSOCKS_AVAILABLE_PORTS ,
79
80
)
80
81
)
81
82
)
Original file line number Diff line number Diff line change 1
1
package net.mullvad.mullvadvpn.constant
2
2
3
3
import net.mullvad.mullvadvpn.lib.model.Port
4
+ import net.mullvad.mullvadvpn.lib.model.PortRange
4
5
5
6
val WIREGUARD_PRESET_PORTS = listOf (Port (51820 ), Port (53 ))
6
7
val UDP2TCP_PRESET_PORTS = listOf (Port (80 ), Port (5001 ))
7
- val SHADOWSOCKS_PRESET_PORTS = listOf (Port (80 ), Port (443 ))
8
+ val SHADOWSOCKS_PRESET_PORTS = emptyList<Port >()
9
+ val SHADOWSOCKS_AVAILABLE_PORTS =
10
+ listOf (PortRange (IntRange (0 , 65535 ))) // Currently we consider all ports to be available
Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ package net.mullvad.mullvadvpn.util
3
3
import net.mullvad.mullvadvpn.lib.model.Port
4
4
import net.mullvad.mullvadvpn.lib.model.PortRange
5
5
6
- // fun Port.in()
7
-
8
6
fun Port.inAnyOf (portRanges : List <PortRange >): Boolean =
9
7
portRanges.any { portRange -> this in portRange }
10
8
You can’t perform that action at this time.
0 commit comments