Commit 3a7ab221 authored by Mygod's avatar Mygod

Use any address as default DNS

parent ec58a40c
......@@ -121,7 +121,7 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
}.let { dns ->
cmd += arrayListOf(
"--dns-relay", "${DataStore.listenAddress}:${DataStore.portLocalDns}",
"--remote-dns", "${dns.host!!}:${if (dns.port < 0) 53 else dns.port}")
"--remote-dns", "${dns.host ?: "0.0.0.0"}:${if (dns.port < 0) 53 else dns.port}")
}
if (route != Acl.ALL) {
......
......@@ -99,7 +99,6 @@ class ProfileConfigFragment : PreferenceFragmentCompat(),
findPreference<Preference>(Key.metered)!!.apply {
if (Build.VERSION.SDK_INT >= 28) isEnabled = serviceMode == Key.modeVpn else remove()
}
findPreference<Preference>(Key.udpdns)!!.isEnabled = serviceMode != Key.modeProxy
plugin = findPreference(Key.plugin)!!
pluginConfigure = findPreference(Key.pluginConfigure)!!
pluginConfigure.setOnBindEditTextListener(EditTextPreferenceModifiers.Monospace)
......
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