Update DNS
This commit is contained in:
@@ -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 _ => {
|
||||
|
||||
Reference in New Issue
Block a user