Fix all our own issues.
Waiting for Android's official fix for their broken NAT implementation.
This commit is contained in:
@@ -801,6 +801,8 @@ class Shadowsocks
|
||||
ab.append("mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system")
|
||||
for (executable <- Shadowsocks.EXECUTABLES) {
|
||||
ab.append("cp %s%s /system/bin/".format(Path.BASE, executable))
|
||||
ab.append("chmod 755 /system/bin/" + executable)
|
||||
ab.append("chown root:shell /system/bin/" + executable)
|
||||
}
|
||||
ab.append("mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system")
|
||||
Console.runRootCommand(ab.toArray)
|
||||
@@ -826,6 +828,7 @@ class Shadowsocks
|
||||
ab.append("chmod 755 " + Path.BASE + executable)
|
||||
}
|
||||
Console.runCommand(ab.toArray)
|
||||
|
||||
}
|
||||
|
||||
private def recovery() {
|
||||
|
||||
@@ -151,7 +151,7 @@ class ShadowsocksNatService extends Service with BaseService {
|
||||
}
|
||||
|
||||
val cmd = if (Build.VERSION.SDK_INT >= 20) {
|
||||
args
|
||||
"system/bin/" + args
|
||||
} else {
|
||||
Path.BASE + args
|
||||
}
|
||||
@@ -185,7 +185,7 @@ class ShadowsocksNatService extends Service with BaseService {
|
||||
p.println(conf)
|
||||
})
|
||||
val cmd = if (Build.VERSION.SDK_INT >= 20) {
|
||||
args
|
||||
"system/bin/" + args
|
||||
} else {
|
||||
Path.BASE + args
|
||||
}
|
||||
@@ -195,10 +195,10 @@ class ShadowsocksNatService extends Service with BaseService {
|
||||
/** Called when the activity is first created. */
|
||||
def handleConnection: Boolean = {
|
||||
|
||||
startShadowsocksDaemon()
|
||||
startDnsDaemon()
|
||||
startRedsocksDaemon()
|
||||
setupIptables
|
||||
startShadowsocksDaemon()
|
||||
setupIptables()
|
||||
flushDNS()
|
||||
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user