use commons-net instead

This commit is contained in:
Max Lv
2013-11-23 14:44:51 +08:00
parent be6f31ded8
commit 765bf837f3
14 changed files with 38 additions and 781 deletions
@@ -303,6 +303,8 @@ class ShadowsocksService extends Service {
startDnsDaemon()
startRedsocksDaemon()
setupIptables
flushDNS()
true
}
@@ -496,6 +498,11 @@ class ShadowsocksService extends Service {
Service.START_STICKY
}
def flushDNS() {
Utils.runRootCommand("ndc resolver flushdefaultif\n"
+ "ndc resolver flushif wlan0\n")
}
def setupIptables: Boolean = {
val init_sb = new StringBuilder
val http_sb = new StringBuilder