Trim remoteDns

This commit is contained in:
Max Lv
2017-02-17 20:13:13 +08:00
parent 66db347215
commit 458a3473b1
2 changed files with 4 additions and 4 deletions
@@ -74,7 +74,7 @@ class ShadowsocksNatService extends BaseService {
"-t", "10",
"-b", "127.0.0.1",
"-l", (profile.localPort + 63).toString,
"-L", profile.remoteDns + ":53",
"-L", profile.remoteDns.trim + ":53",
"-c", buildShadowsocksConfig("ss-tunnel-nat.conf"))
if (profile.udpdns) cmd.append("-u")
@@ -188,7 +188,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
"-t", "10",
"-b", "127.0.0.1",
"-l", (profile.localPort + 63).toString,
"-L" , profile.remoteDns + ":53",
"-L" , profile.remoteDns.trim + ":53",
"-c", buildShadowsocksConfig("ss-tunnel-vpn.conf")).start()
def startDnsDaemon() {
@@ -219,7 +219,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
.setMtu(VPN_MTU)
.addAddress(PRIVATE_VLAN.formatLocal(Locale.ENGLISH, "1"), 24)
builder.addDnsServer(profile.remoteDns)
builder.addDnsServer(profile.remoteDns.trim)
if (profile.ipv6) {
builder.addAddress(PRIVATE_VLAN6.formatLocal(Locale.ENGLISH, "1"), 126)
@@ -251,7 +251,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
val subnet = Subnet.fromString(cidr)
builder.addRoute(subnet.address.getHostAddress, subnet.prefixSize)
})
builder.addRoute(profile.remoteDns, 32)
builder.addRoute(profile.remoteDns.trim, 32)
}
conn = builder.establish()