Bump version
This commit is contained in:
@@ -298,4 +298,15 @@ trait BaseService extends Service {
|
||||
state = s
|
||||
})
|
||||
}
|
||||
|
||||
def getBlackList = {
|
||||
val default = "exclude = " + getString(R.string.black_list) + ";"
|
||||
try {
|
||||
val container = app.containerHolder.getContainer
|
||||
val update = "exclude = " + container.getString("black_list") + ";"
|
||||
if (update == null || update.isEmpty) default else update
|
||||
} catch {
|
||||
case ex: Exception => default
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,12 +184,12 @@ class ShadowsocksNatService extends BaseService {
|
||||
case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => {
|
||||
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
|
||||
"127.0.0.1", profile.localPort + 53, "1.2.4.8, 114.114.114.114",
|
||||
reject, profile.localPort + 63, reject)
|
||||
getBlackList, reject, profile.localPort + 63, reject)
|
||||
}
|
||||
case Route.CHINALIST => {
|
||||
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
|
||||
"127.0.0.1", profile.localPort + 53, "8.8.8.8, 208.67.222.222",
|
||||
reject, profile.localPort + 63, reject)
|
||||
"", reject, profile.localPort + 63, reject)
|
||||
}
|
||||
case _ => {
|
||||
ConfigUtils.PDNSD_LOCAL.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
|
||||
|
||||
@@ -301,12 +301,12 @@ class ShadowsocksVpnService extends VpnService with BaseService {
|
||||
case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => {
|
||||
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
|
||||
"0.0.0.0", profile.localPort + 53, "1.2.4.8, 114.114.114.114",
|
||||
reject, profile.localPort + 63, reject)
|
||||
getBlackList, reject, profile.localPort + 63, reject)
|
||||
}
|
||||
case Route.CHINALIST => {
|
||||
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
|
||||
"0.0.0.0", profile.localPort + 53, "8.8.8.8, 208.67.222.222",
|
||||
reject, profile.localPort + 63, reject)
|
||||
"", reject, profile.localPort + 63, reject)
|
||||
}
|
||||
case _ => {
|
||||
ConfigUtils.PDNSD_LOCAL.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
|
||||
|
||||
@@ -117,6 +117,8 @@ object ConfigUtils {
|
||||
| ip = %s;
|
||||
| timeout = 3;
|
||||
| query_method = udp_only;
|
||||
| %s
|
||||
| policy = included;
|
||||
| reject = %s;
|
||||
| reject_policy = fail;
|
||||
| reject_recursively = on;
|
||||
|
||||
Reference in New Issue
Block a user