From 54247d6b2b4f35287afc8cde46ef6530682e517b Mon Sep 17 00:00:00 2001 From: Max Lv Date: Fri, 30 Sep 2016 20:48:20 +0800 Subject: [PATCH] Update DNS --- src/main/scala/com/github/shadowsocks/BaseService.scala | 9 +++++---- .../com/github/shadowsocks/ShadowsocksVpnService.scala | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/scala/com/github/shadowsocks/BaseService.scala b/src/main/scala/com/github/shadowsocks/BaseService.scala index 131c23e1..de5f6bce 100644 --- a/src/main/scala/com/github/shadowsocks/BaseService.scala +++ b/src/main/scala/com/github/shadowsocks/BaseService.scala @@ -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 + ";" } } } diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala index 80125829..b111b851 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala @@ -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 _ => {