Support switching to NAT/VPN without restarting the app

This commit is contained in:
Mygod
2015-11-08 18:46:42 +08:00
parent 1f0f92113d
commit 4906ce8af5
7 changed files with 31 additions and 58 deletions
@@ -66,7 +66,6 @@ object Key {
val proxied = "Proxyed"
val isNAT = "isNAT"
val isRoot = "isRoot"
val status = "status"
val proxyedApps = "proxyedApps"
val route = "route"
@@ -75,20 +75,13 @@ object Utils {
val TIME_OUT: Int = -99
var initialized: Boolean = false
var hasRedirectSupport: Int = -1
var isRoot: Int = -1
var shell: String = null
var root_shell: String = null
var iptables: String = null
var data_path: String = null
var rootTries = 0
def isLollipopOrAbove: Boolean = {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
true
} else {
false
}
}
def isLollipopOrAbove: Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
def getSignature(context: Context): String = {
val info = context