Commit d10acf52 authored by Mygod's avatar Mygod

Fix remoteDns not used in NAT with UDP disabled

parent 0234acbf
......@@ -119,16 +119,10 @@ class ShadowsocksNatService extends BaseService {
, "-t" , "10"
, "-b" , "127.0.0.1"
, "-l" , (profile.localPort + 53).toString
, "-L" , if (profile.remoteDns == null) "8.8.8.8:53" else profile.remoteDns + ":53"
, "-P" , getApplicationInfo.dataDir
, "-c" , getApplicationInfo.dataDir + "/ss-tunnel-nat.conf")
cmd += "-L"
if (profile.remoteDns == null)
cmd += "8.8.8.8:53"
else
cmd += profile.remoteDns + ":53"
if (profile.auth) cmd += "-A"
if (BuildConfig.DEBUG) Log.d(TAG, cmd.mkString(" "))
......@@ -152,7 +146,7 @@ class ShadowsocksNatService extends BaseService {
, "-t" , "10"
, "-b" , "127.0.0.1"
, "-l" , (profile.localPort + 63).toString
, "-L" , "8.8.8.8:53"
, "-L" , if (profile.remoteDns == null) "8.8.8.8:53" else profile.remoteDns + ":53"
, "-P", getApplicationInfo.dataDir
, "-c" , getApplicationInfo.dataDir + "/ss-tunnel-nat.conf")
......
......@@ -270,16 +270,10 @@ class ShadowsocksVpnService extends VpnService with BaseService {
, "-V"
, "-t", "10"
, "-b", "127.0.0.1"
, "-L" , if (profile.remoteDns == null) "8.8.8.8:53" else profile.remoteDns + ":53"
, "-P", getApplicationInfo.dataDir
, "-c", getApplicationInfo.dataDir + "/ss-tunnel-vpn.conf")
cmd += "-L"
if (profile.remoteDns == null)
cmd += "8.8.8.8:53"
else
cmd += profile.remoteDns + ":53"
if (profile.auth) cmd += "-A"
if (BuildConfig.DEBUG) Log.d(TAG, cmd.mkString(" "))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment