Skip to content

Commit bd268b7

Browse files
committed
Try obfuscated proxies until only plain remain
1 parent 6b23ab1 commit bd268b7

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

Diff for: mullvad-ios/src/encrypted_dns_proxy.rs

+9-11
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,15 @@ impl EncryptedDnsProxyState {
9494
}
9595

9696
fn next_configuration(&mut self) -> Option<ProxyConfig> {
97-
if !self.has_tried_xor {
98-
self.has_tried_xor = true;
99-
if let Some(xor_config) = self
100-
.configurations
101-
.iter()
102-
// prefer obfuscated proxy configurations.
103-
.find(|config| config.obfuscation.is_some())
104-
{
105-
self.tried_configurations.insert(xor_config.clone());
106-
return Some(xor_config.clone());
107-
}
97+
if let Some(xor_config) = self
98+
.configurations
99+
.diference(&self.tried_configurations)
100+
// prefer obfuscated proxy configurations.
101+
.find(|config| config.obfuscation.is_some())
102+
.cloned()
103+
{
104+
self.tried_configurations.insert(xor_config.clone());
105+
return Some(xor_config);
108106
}
109107

110108
let config = self

0 commit comments

Comments
 (0)