You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Support for Customizable Remote and Local DNS Resolvers in UI/Backend #287
Description
Currently, the ecosystem lacks a dedicated way to manage DNS settings directly through the UI. I would like to propose adding the capability to configure both Remote DNS and Local DNS settings. This would allow users to switch between various resolvers (e.g., AdGuard, Pi-hole, Cloudflare) seamlessly.
Why is this needed?
Integrating customizable DNS settings provides several key benefits:
Ad-Blocking & Privacy: By using ad-blocking resolvers, users can filter out unwanted traffic at the DNS level.
Bandwidth Management: Blocking ads and trackers significantly reduces data consumption, which is crucial for VPN/Relay users.
Flexibility: Users can easily switch between different providers based on their network conditions or censorship-circumvention needs.
Persistence: The ability to save these configurations within the ecosystem ensures a consistent experience across sessions.
Proposed Implementation
Backend (Rust): Add logic to handle custom DNS upstream for both local lookups and remote resolution.
UI: * Input fields for "Remote DNS" and "Local DNS" IP addresses.
A "Save" button to persist these settings in the configuration file.
(Optional) A dropdown menu with presets for popular providers (Cloudflare, Google, AdGuard).
Additional Context
This feature would make MasterHttpRelayVPN-RUST much more robust by giving users full control over their DNS traffic, leading to a faster and cleaner browsing experience.
@w0l4i — reasonable feature request. Let me explain current DNS handling so we know what's already there vs what's new:
Current DNS handling (per mode):
Mode
DNS path
Configurable?
apps_script desktop
OS resolver (whatever your network/system uses)
Via system settings, not mhrv-rs
apps_script Android Tunnel mode
tun2proxy --dns virtual (intercepts UDP/53, returns synthetic IPs that map back to hostnames in the SOCKS5 path)
Hardcoded virtual strategy
full desktop
Same as apps_script desktop (OS resolver)
Same
full Android Tunnel mode
tun2proxy --dns virtual
Same
What "Remote DNS" would mean for us:
Right now mhrv-rs doesn't do DNS interception at the network level — it just listens on 127.0.0.1:8080/1081 for HTTP/SOCKS5 traffic. DNS happens upstream (OS/browser). To add "Remote DNS", we'd need to:
For desktop: spawn a local DNS resolver (UDP/53 on 127.0.0.1) that proxies queries through the tunnel (Apps Script for apps_script mode, or tunnel-node for full). User would configure their OS/browser to use 127.0.0.1 as DNS.
For Android Tunnel mode: tun2proxy already handles DNS via the --dns flag. We'd add the dns_strategy and dns_upstream fields to mhrv-rs config and pass through to tun2proxy's CLI args.
Implementation thoughts:
Backend: hickory-dns (formerly trust-dns) is the canonical Rust DNS library. ~1k LOC for a simple resolver that forwards queries through a configurable upstream.
Config fields: dns_local_addr (default 127.0.0.1:53 if enabled), dns_remote (e.g. https://cloudflare-dns.com/dns-query for DoH, tcp://1.1.1.1:53 for DoT, plain 1.1.1.1), dns_strategy for tun2proxy (virtual/over_tcp/system).
UI: dropdown for known providers (Cloudflare/AdGuard/Quad9), text field for custom, validation.
Tradeoffs:
Privacy benefit: legitimate. ISP-level DNS is the easiest snooping point. Routing DNS through tunnel + DoH/DoT eliminates that.
Ad blocking: users can pick AdGuard's resolver and get filter-list ad blocking at DNS level for free.
Setup complexity: most users don't care about DNS. Default-off is correct.
Compatibility: a DNS resolver running on UDP/53 needs admin/CAP_NET_BIND_SERVICE on Linux/Mac. Or we listen on a non-standard port and tell users to configure it as a "DNS over UDP custom port" — fewer clients support that. This is the bit that'll make the UI tricky.
Decision:
This is real v1.8.0 (or beyond) work — substantial new code surface, new config field group, new UI section, requires careful design around system DNS coexistence. Accepting as a feature on the roadmap; not v1.7.x.
If you'd like to take a stab at the backend (hickory-dns wiring + Config fields + thread it through tunnel-node for the Full-mode case), I'd review. It's bigger than the batching fields PR you tried earlier — probably 200–400 LOC + 1–2 days of design discussion. Worth doing well, not fast.
In the meantime, for desktop ad blocking: configure your OS DNS to AdGuard's resolver (94.140.14.14) — the OS-level config bypasses mhrv-rs entirely for DNS, so it works regardless of what we do at the proxy layer.
Tracking this issue as the umbrella for "Customizable DNS in mhrv-rs."
[reply via Anthropic Claude | reviewed by @therealaleph]
Activity
therealaleph commentedon Apr 26, 2026
@w0l4i — reasonable feature request. Let me explain current DNS handling so we know what's already there vs what's new:
Current DNS handling (per mode):
apps_scriptdesktopapps_scriptAndroid Tunnel mode--dns virtual(intercepts UDP/53, returns synthetic IPs that map back to hostnames in the SOCKS5 path)virtualstrategyfulldesktopfullAndroid Tunnel mode--dns virtualWhat "Remote DNS" would mean for us:
Right now mhrv-rs doesn't do DNS interception at the network level — it just listens on
127.0.0.1:8080/1081for HTTP/SOCKS5 traffic. DNS happens upstream (OS/browser). To add "Remote DNS", we'd need to:apps_scriptmode, or tunnel-node forfull). User would configure their OS/browser to use 127.0.0.1 as DNS.--dnsflag. We'd add thedns_strategyanddns_upstreamfields to mhrv-rs config and pass through to tun2proxy's CLI args.Implementation thoughts:
hickory-dns(formerly trust-dns) is the canonical Rust DNS library. ~1k LOC for a simple resolver that forwards queries through a configurable upstream.dns_local_addr(default127.0.0.1:53if enabled),dns_remote(e.g.https://cloudflare-dns.com/dns-queryfor DoH,tcp://1.1.1.1:53for DoT, plain1.1.1.1),dns_strategyfor tun2proxy (virtual/over_tcp/system).Tradeoffs:
Decision:
This is real v1.8.0 (or beyond) work — substantial new code surface, new config field group, new UI section, requires careful design around system DNS coexistence. Accepting as a feature on the roadmap; not v1.7.x.
If you'd like to take a stab at the backend (hickory-dns wiring + Config fields + thread it through
tunnel-nodefor the Full-mode case), I'd review. It's bigger than the batching fields PR you tried earlier — probably 200–400 LOC + 1–2 days of design discussion. Worth doing well, not fast.In the meantime, for desktop ad blocking: configure your OS DNS to AdGuard's resolver (
94.140.14.14) — the OS-level config bypasses mhrv-rs entirely for DNS, so it works regardless of what we do at the proxy layer.Tracking this issue as the umbrella for "Customizable DNS in mhrv-rs."
[reply via Anthropic Claude | reviewed by @therealaleph]