Commit 0d81207b authored by Max Lv's avatar Max Lv

bump version

parent e7df51f1
......@@ -5,8 +5,8 @@ import sbtandroid._
import sbtandroid.AndroidPlugin._
object App {
val version = "2.1.4"
val versionCode = 65
val version = "2.1.5"
val versionCode = 66
}
object General {
......
Subproject commit 14c8fe6a99897dd79721f7d60cbac0cbe8bc876b
Subproject commit 3126bc07f0ef4ceea9ac861dc713940a4e951adc
......@@ -102,8 +102,16 @@ class ShadowsocksNatService extends Service with BaseService {
val handler: Handler = new Handler()
def isACLEnabled: Boolean = {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
true
} else {
false
}
}
def startShadowsocksDaemon() {
if (config.isGFWList) {
if (isACLEnabled && config.isGFWList) {
val chn_list: Array[String] = getResources.getStringArray(R.array.chn_list_full)
ConfigUtils.printToFile(new File(Path.BASE + "chn.acl"))(p => {
chn_list.foreach(item => p.println(item))
......@@ -114,7 +122,7 @@ class ShadowsocksNatService extends Service with BaseService {
"ss-local -b 127.0.0.1 -s \"%s\" -p \"%d\" -l \"%d\" -k \"%s\" -m \"%s\" -f " +
Path.BASE + "ss-local.pid")
.format(config.proxy, config.remotePort, config.localPort, config.sitekey, config.encMethod)
val cmd = if (config.isGFWList) args + " --acl " + Path.BASE + "chn.acl" else args
val cmd = if (config.isGFWList && isACLEnabled) args + " --acl " + Path.BASE + "chn.acl" else args
if (BuildConfig.DEBUG) Log.d(TAG, cmd)
System.exec(cmd)
}
......@@ -326,6 +334,14 @@ class ShadowsocksNatService extends Service with BaseService {
// Bypass DNS in China
init_sb.append(cmd_bypass.replace("-p tcp -d 0.0.0.0", "-d 114.114.114.114"))
init_sb.append(cmd_bypass.replace("-p tcp -d 0.0.0.0", "-d 114.114.115.115"))
if (!isACLEnabled)
{
val chn_list: Array[String] = getResources.getStringArray(R.array.chn_list)
for (item <- chn_list) {
init_sb.append(cmd_bypass.replace("0.0.0.0", item))
}
}
}
if (hasRedirectSupport) {
init_sb
......
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