Compare commits

...
5 Commits
Author SHA1 Message Date
Max Lv d1d135ccdd refine dns black list 2014-12-26 17:30:20 +08:00
Max Lv a28303ee76 update reject list 2014-12-26 16:13:07 +08:00
Max Lv 2b09ebcd2c bump version 2014-12-24 17:38:17 +08:00
Max Lv 59ede2586a update google service 2014-12-24 17:26:48 +08:00
Max Lv abd1d0220c bump version for a build error 2014-12-20 16:42:38 +08:00
6 changed files with 25 additions and 6 deletions
+2 -1
View File
@@ -29,7 +29,8 @@ libraryDependencies ++= Seq(
libraryDependencies ++= Seq(
"net.simonvt.menudrawer" % "menudrawer" % "3.0.6",
"com.google.android.gms" % "play-services" % "6.1.71",
"com.google.android.gms" % "play-services-base" % "6.5.87",
"com.google.android.gms" % "play-services-ads" % "6.5.87",
"com.android.support" % "support-v4" % "21.0.3"
)
+2 -2
View File
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.shadowsocks"
android:versionCode="96"
android:versionName="2.5.6">
android:versionCode="98"
android:versionName="2.6.0">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
File diff suppressed because one or more lines are too long
@@ -263,8 +263,9 @@ class ShadowsocksNatService extends Service with BaseService {
val conf = if (config.route == Route.BYPASS_CHN) {
val reject = ConfigUtils.getRejectList(getContext, application)
val blackList = ConfigUtils.getBlackList(getContext, application)
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, "127.0.0.1", 8153,
Path.BASE + "pdnsd-nat.pid", reject, reject, 8163)
Path.BASE + "pdnsd-nat.pid", reject, blackList, reject, blackList, 8163)
} else {
ConfigUtils.PDNSD_LOCAL.formatLocal(Locale.ENGLISH, "127.0.0.1", 8153,
Path.BASE + "pdnsd-nat.pid", 8163)
@@ -155,8 +155,9 @@ class ShadowsocksVpnService extends VpnService with BaseService {
val conf = {
if (Utils.isLollipopOrAbove && config.route == Route.BYPASS_CHN) {
val reject = ConfigUtils.getRejectList(getContext, application)
val blackList = ConfigUtils.getBlackList(getContext, application)
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, "0.0.0.0", 8153,
Path.BASE + "pdnsd-vpn.pid", reject, reject, 8163)
Path.BASE + "pdnsd-vpn.pid", reject, blackList, reject, blackList, 8163)
} else {
ConfigUtils.PDNSD_LOCAL.formatLocal(Locale.ENGLISH, "0.0.0.0", 8153,
Path.BASE + "pdnsd-vpn.pid", 8163)
@@ -161,6 +161,8 @@ object ConfigUtils {
| reject = %s;
| reject_policy = fail;
| reject_recursively = on;
| exclude = %s;
| policy = included;
| uptest = none;
| preset = on;
|}
@@ -173,6 +175,8 @@ object ConfigUtils {
| reject = %s;
| reject_policy = fail;
| reject_recursively = on;
| exclude = %s;
| policy = included;
| uptest = none;
| preset = on;
|}
@@ -218,6 +222,17 @@ object ConfigUtils {
}
}
def getBlackList(context: Context, app: ShadowsocksApplication): String = {
val default = context.getString(R.string.black_list)
try {
val container = app.containerHolder.getContainer
val update = container.getString("black_list")
if (update == null || update.isEmpty) default else update
} catch {
case ex: Exception => default
}
}
def getPublicConfig(context: Context, container: Container, config: Config): Config = {
val url = container.getString("proxy_url")
val sig = Utils.getSignature(context)