fix #85
This commit is contained in:
@@ -119,18 +119,18 @@ class ShadowsocksNatService extends Service with BaseService {
|
||||
}
|
||||
|
||||
val args = (Path.BASE +
|
||||
"ss-local -b 127.0.0.1 -s \"%s\" -p \"%d\" -l \"%d\" -k \"%s\" -m \"%s\" -f " +
|
||||
"ss-local -b 127.0.0.1 -s '%s' -p '%d' -l '%d' -k ''%s' -m '%s' -f " +
|
||||
Path.BASE + "ss-local.pid")
|
||||
.format(config.proxy, config.remotePort, config.localPort, config.sitekey, config.encMethod)
|
||||
val cmd = if (config.isGFWList && isACLEnabled) args + " --acl " + Path.BASE + "chn.acl" else args
|
||||
if (BuildConfig.DEBUG) Log.d(TAG, cmd)
|
||||
System.exec(cmd)
|
||||
Console.runCommand(cmd)
|
||||
}
|
||||
|
||||
def startDnsDaemon() {
|
||||
val cmd = if (config.isUdpDns) {
|
||||
(Path.BASE +
|
||||
"ss-tunnel -b 127.0.0.1 -s \"%s\" -p \"%d\" -l \"%d\" -k \"%s\" -m \"%s\" -L 8.8.8.8:53 -u -f " +
|
||||
"ss-tunnel -b 127.0.0.1 -s '%s' -p '%d' -l '%d' -k '%s' -m '%s' -L 8.8.8.8:53 -u -f " +
|
||||
Path.BASE + "ss-tunnel.pid")
|
||||
.format(config.proxy, config.remotePort, 8153, config.sitekey, config.encMethod)
|
||||
} else {
|
||||
|
||||
@@ -82,7 +82,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
|
||||
|
||||
def startShadowsocksDaemon() {
|
||||
val cmd: String = (Path.BASE +
|
||||
"ss-local -b 127.0.0.1 -s \"%s\" -p \"%d\" -l \"%d\" -k \"%s\" -m \"%s\" -u -f " +
|
||||
"ss-local -b 127.0.0.1 -s '%s' -p '%d' -l '%d' -k '%s' -m '%s' -u -f " +
|
||||
Path.BASE + "ss-local.pid")
|
||||
.format(config.proxy, config.remotePort, config.localPort, config.sitekey, config.encMethod)
|
||||
if (BuildConfig.DEBUG) Log.d(TAG, cmd)
|
||||
|
||||
Reference in New Issue
Block a user