Commit c96dde86 authored by Max Lv's avatar Max Lv

use runCommand instead

parent 78108e12
......@@ -140,8 +140,7 @@ class ShadowVpnService extends VpnService {
def startShadowsocksDaemon() {
val cmd: String = (BASE +
"shadowsocks -b 127.0.0.1 -s \"%s\" -p \"%d\" -l \"%d\" -k \"%s\" -m \"%s\" -f " +
BASE +
"shadowsocks.pid")
BASE + "shadowsocks.pid")
.format(config.proxy, config.remotePort, config.localPort, config.sitekey, config.encMethod)
if (BuildConfig.DEBUG) Log.d(TAG, cmd)
System.exec(cmd)
......
......@@ -158,10 +158,9 @@ class ShadowsocksService extends Service {
val cmd: String = (BASE +
"shadowsocks -b 127.0.0.1 -s \"%s\" -p \"%d\" -l \"%d\" -k \"%s\" -m \"%s\" -f " +
BASE + "shadowsocks.pid")
.format(config.proxy, config.remotePort, config.localPort, config.sitekey,
config.encMethod)
.format(config.proxy, config.remotePort, config.localPort, config.sitekey, config.encMethod)
if (BuildConfig.DEBUG) Log.d(TAG, cmd)
System.exec(cmd)
Utils.runCommand(cmd)
}
def startDnsDaemon() {
......
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