Disable DNS forwarding in GFWList/ChinaList mode

This commit is contained in:
Max Lv
2016-09-19 17:18:39 +08:00
parent d8f721db3b
commit fda89933d0
@@ -344,7 +344,10 @@ class ShadowsocksVpnService extends VpnService with BaseService {
.setSession(profile.name)
.setMtu(VPN_MTU)
.addAddress(PRIVATE_VLAN.formatLocal(Locale.ENGLISH, "1"), 24)
.addDnsServer("8.8.8.8")
if (profile.route != Route.GFWLIST && profile.route != Route.CHINALIST) {
builder.addDnsServer("8.8.8.8")
}
if (profile.ipv6) {
builder.addAddress(PRIVATE_VLAN6.formatLocal(Locale.ENGLISH, "1"), 126)