diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala index f243ea75..7144cc6d 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala @@ -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") diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala index 8cb89e3f..378e16f1 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala @@ -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(" "))