Skip to content

Commit 653aff3

Browse files
committed
fix DNS setting
1 parent d9f28f2 commit 653aff3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ object ShadowsocksSettings {
6060
case Key.route => updateDropDownPreference(pref, profile.route)
6161
case Key.proxyApps => updateSwitchPreference(pref, profile.proxyApps)
6262
case Key.udpdns => updateSwitchPreference(pref, profile.udpdns)
63-
case Key.dns => updateSwitchPreference(pref, profile.dns)
63+
case Key.dns => updateSummaryEditTextPreference(pref, profile.dns)
6464
case Key.ipv6 => updateSwitchPreference(pref, profile.ipv6)
6565
case Key.kcp => updateSwitchPreference(pref, profile.kcp)
6666
case Key.kcpPort => updateNumberPickerPreference(pref, profile.kcpPort)

src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
338338
.setSession(profile.name)
339339
.setMtu(VPN_MTU)
340340
.addAddress(PRIVATE_VLAN.formatLocal(Locale.ENGLISH, "1"), 24)
341-
.addDnsServer(profile.dns.split(0))
341+
.addDnsServer(profile.dns.split(":")(2))
342342

343343
if (profile.ipv6) {
344344
builder.addAddress(PRIVATE_VLAN6.formatLocal(Locale.ENGLISH, "1"), 126)

0 commit comments

Comments
 (0)