Call tun2socks in main process

This commit is contained in:
Max Lv
2014-11-24 10:39:45 +08:00
parent 08d5d56e46
commit 567543d00e
11 changed files with 264 additions and 111 deletions
@@ -123,7 +123,7 @@ object Shadowsocks {
val FEATRUE_PREFS = Array(Key.route, Key.isGlobalProxy, Key.proxyedApps,
Key.isUdpDns, Key.isAutoConnect)
val EXECUTABLES = Array(Executable.PDNSD, Executable.REDSOCKS, Executable.IPTABLES)
val EXECUTABLES = Array(Executable.PDNSD, Executable.REDSOCKS, Executable.SS_TUNNEL, Executable.SS_LOCAL)
// Helper functions
def updateListPreference(pref: Preference, value: String) {
@@ -834,6 +834,14 @@ class Shadowsocks
crash_recovery()
copyAssets(System.getABI)
val ab = new ArrayBuffer[String]
for (executable <- Shadowsocks.EXECUTABLES) {
ab.append("chmod 755 " + Path.BASE + executable)
}
Console.runCommand(ab.toArray)
}
private def recovery() {