Commit 54247d6b authored by Max Lv's avatar Max Lv

Update DNS

parent e7fbfd66
......@@ -300,13 +300,14 @@ trait BaseService extends Service {
}
def getBlackList = {
val default = "exclude = " + getString(R.string.black_list) + ";"
val default = getString(R.string.black_list)
try {
val container = app.containerHolder.getContainer
val update = "exclude = " + container.getString("black_list_lite") + ";"
if (update == null || update.isEmpty) default else update
val update = container.getString("black_list_lite")
val list = if (update == null || update.isEmpty) default else update
"exclude = " + list + ";"
} catch {
case ex: Exception => default
case ex: Exception => "exclude = " + default + ";"
}
}
}
......@@ -300,12 +300,12 @@ class ShadowsocksVpnService extends VpnService with BaseService {
val conf = profile.route match {
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",
"0.0.0.0", profile.localPort + 53, "114.114.114.114, 119.29.29.29, 1.2.4.8",
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",
"0.0.0.0", profile.localPort + 53, "8.8.8.8, 8.8.4.4, 208.67.222.222",
"", reject, profile.localPort + 63, reject)
}
case _ => {
......
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