Skip to content

Commit 9d922b2

Browse files
dlonSerock3
andcommitted
Add Shadowsocks to retry order
Co-authored-by: Sebastian Holmin <[email protected]>
1 parent 766f211 commit 9d922b2

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Line wrap the file at 100 chars. Th
2424
## [Unreleased]
2525
### Added
2626
- Add WireGuard over Shadowsocks obfuscation to the CLI. It can be enabled with
27-
`mullvad obfuscation set mode shadowsocks`.
27+
`mullvad obfuscation set mode shadowsocks`. This will also be used automatically when connecting
28+
fails with other methods.
2829

2930
#### Windows
3031
- Add experimental support for Windows ARM64.

docs/relay-selector.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ constraints the following default ones will take effect:
5454
- The second attempt will connect to a Wireguard relay on port 443
5555
- The third attempt will connect to a Wireguard relay over IPv6 (if IPv6 is configured on the host) on a random port
5656
- The fourth-to-seventh attempt will alternate between Wireguard and OpenVPN
57-
- The fourth attempt will connect to an OpenVPN relay over TCP on port 443
57+
- The fourth attempt will connect to a Wireguard relay on a random port using Shadowsocks for obfuscation
5858
- The fifth attempt will connect to a Wireguard relay on a random port using [UDP2TCP obfuscation](https://github.com/mullvad/udp-over-tcp)
5959
- The sixth attempt will connect to a Wireguard relay over IPv6 on a random port using UDP2TCP obfuscation (if IPv6 is configured on the host)
60-
- The seventh attempt will connect to an OpenVPN relay over a bridge on a random port
60+
- The seventh attempt will connect to an OpenVPN relay over TCP on port 443
61+
- The eighth attempt will connect to an OpenVPN relay over a bridge on a random port
6162

6263
If no tunnel has been established after exhausting this list of attempts, the relay selector will
6364
loop back to the first default constraint and continue its search from there.

mullvad-relay-selector/src/relay_selector/mod.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ pub static RETRY_ORDER: Lazy<Vec<RelayQuery>> = Lazy::new(|| {
6868
.ip_version(IpVersion::V6)
6969
.build(),
7070
// 4
71-
RelayQueryBuilder::new()
72-
.openvpn()
73-
.transport_protocol(TransportProtocol::Tcp)
74-
.port(443)
75-
.build(),
71+
RelayQueryBuilder::new().wireguard().shadowsocks().build(),
7672
// 5
7773
RelayQueryBuilder::new().wireguard().udp2tcp().build(),
7874
// 6
@@ -82,6 +78,12 @@ pub static RETRY_ORDER: Lazy<Vec<RelayQuery>> = Lazy::new(|| {
8278
.ip_version(IpVersion::V6)
8379
.build(),
8480
// 7
81+
RelayQueryBuilder::new()
82+
.openvpn()
83+
.transport_protocol(TransportProtocol::Tcp)
84+
.port(443)
85+
.build(),
86+
// 8
8587
RelayQueryBuilder::new()
8688
.openvpn()
8789
.transport_protocol(TransportProtocol::Tcp)

mullvad-relay-selector/tests/relay_selector.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,7 @@ fn assert_retry_order() {
290290
.ip_version(IpVersion::V6)
291291
.build(),
292292
// 4
293-
RelayQueryBuilder::new()
294-
.openvpn()
295-
.transport_protocol(TransportProtocol::Tcp)
296-
.port(443)
297-
.build(),
293+
RelayQueryBuilder::new().wireguard().shadowsocks().build(),
298294
// 5
299295
RelayQueryBuilder::new().wireguard().udp2tcp().build(),
300296
// 6
@@ -304,6 +300,12 @@ fn assert_retry_order() {
304300
.ip_version(IpVersion::V6)
305301
.build(),
306302
// 7
303+
RelayQueryBuilder::new()
304+
.openvpn()
305+
.transport_protocol(TransportProtocol::Tcp)
306+
.port(443)
307+
.build(),
308+
// 8
307309
RelayQueryBuilder::new()
308310
.openvpn()
309311
.transport_protocol(TransportProtocol::Tcp)

0 commit comments

Comments
 (0)