Skip to content

Commit

Permalink
fix(outline-client): [1980] randomize list of dns severs
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-r committed May 8, 2024
1 parent 68bec81 commit d1dcbbf
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public class OutlineTunnel: NSObject, Codable {
@objc public static func getTunnelNetworkSettings(tunnelRemoteAddress: String) -> NEPacketTunnelNetworkSettings {
// The remote address is not used for routing, but for display in Settings > VPN > Outline.
let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: tunnelRemoteAddress)
var dnsList = ["1.1.1.1", "9.9.9.9", "208.67.222.222", "208.67.220.220"]
dnsList.shuffle()

// Configure VPN address and routing.
let vpnAddress = selectVpnAddress(interfaceAddresses: getNetworkInterfaceAddresses())
Expand All @@ -79,8 +81,8 @@ public class OutlineTunnel: NSObject, Codable {
settings.ipv4Settings = ipv4Settings

// Configure with Cloudflare, Quad9, and OpenDNS resolver addresses.
settings.dnsSettings = NEDNSSettings(servers: ["1.1.1.1", "9.9.9.9", "208.67.222.222", "208.67.220.220"])
settings.dnsSettings = NEDNSSettings(servers: dnsList)

return settings
}
}
Expand Down

0 comments on commit d1dcbbf

Please sign in to comment.