[FR] Android client: expose "Match Domains" (split DNS) — documented but not implemented #3798
strausmann
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
The Match Domains preference is documented for the GUI clients including Android
(Configure Clients),
but the Android client does not expose it, and never sends it to olm. On Android, DNS is
therefore all-or-nothing: either every query on the device goes to the upstream DNS server,
or none does.
Why this matters
Without split DNS, enabling "DNS Over Tunnel" makes the upstream DNS server a single point of
failure for the entire device, not just for Pangolin resources. If that server or the site
behind it becomes unreachable, the phone cannot resolve anything at all — banking apps,
messengers, everything. It also means every hostname the device looks up is sent through the
tunnel, which affects latency on mobile networks, CDN/geo-steering (answers are tailored to the
resolver's location rather than the device's), and captive portals in guest networks.
This is exactly the trade-off the documentation says Match Domains exists to solve:
That option is available on the CLI (
--match-domains, since 0.15.0) but not on Android.Current behaviour (from the public sources)
olm already implements the feature completely:
config.go—MatchDomains []string \json:"matchDomainsDNS"`and the--match-domains-dns` flagdns/dns_proxy.go— wildcard matching, plusSetMatchDomains()for runtime updatesThe Android app never passes it through:
tunnel/…/TunnelConfig.java→toJson()emitsoverrideDNS,tunnelDNSandupstreamDNS,which map exactly onto olm's JSON tags — but there is no
matchDomainsDNSkeyapp/…/util/TunnelManager.kt→ builds the config withsetOverrideDNS()/setTunnelDNS(),no equivalent setter exists
matchDomainreturns no resultsConfirmed on a running install (client 0.7.0): the Settings screen offers exactly
Show persistent VPN notification, Enable Aliases (DNS Override), DNS Over Tunnel,
Primary Upstream DNS Server, Secondary Upstream DNS Server, Enable Log Collection
and MTU. There is no Match Domains field.
Additionally,
tunnel/…/NetworkSettingsPoller.javacallsbuilder.addSearchDomain(".")wheneverat least one DNS server is configured, commented "to ensure all DNS queries go into the tunnel".
As far as I can tell this does not conflict with the feature — queries still reach the in-app
proxy, which would then decide per domain whether to forward upstream or hand them to the system
resolvers it already tracks via
setSystemDNS. I have not verified that experimentally, though.Suggested change
Pass the value through, mirroring how
upstreamDNSis already handled:TunnelConfig.java— field, getter, builder setter,json.put("matchDomainsDNS", …)TunnelManager.kt— pass the configured value into the builderConfigManager.kt— persist/read the preferenceSettingsActivity.kt— visibility handling, alongsideprimaryDNSServerres/xml/…+strings.xml— anEditTextPreferenceand its stringsNo Go or JNI changes appear to be required, since the config crosses the boundary as a JSON
string and olm already understands the key. One thing I cannot check from the public sources is
which olm version the shipped native library embeds — if it predates 1.8.0 the field would be
ignored silently.
Related
Domains documentation, which would not have helped on Android
Environment
All reactions