Fix remoteDns not used in NAT with UDP disabled
This commit is contained in:
@@ -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(" "))
|
||||
|
||||
Reference in New Issue
Block a user