Repository navigation
Conversation
…N hostnames Each outbound VPN now uses the largest MTU that fits through what the VPN connects via: the WAN for a VPN that connects via the Internet, or the other VPN's tunnel for a chained one. That default is recalculated whenever the WAN or the VPN that it connects via changes, and the default is shown in the VPN's MTU field. An MTU in an imported config file is kept only when that MTU is smaller than the default. The router refuses a chain that would push a VPN's MTU below 1280. A new migration, StoreVpnClientMtus, moves existing configs onto the stored-MTU model. A VPN whose config names its server by hostname can now connect via another VPN. The router looks the hostname up through the tunnel of the VPN that it connects via (tunnel_dns binds the lookup to the tunnel's device), so the lookup never leaves through the WAN. The router asks the resolvers that a profile routed through that VPN would use, and prefers the server's IPv4 address when that tunnel can carry one. A background thread looks the hostname up again when the server stops answering. Diagnostics treat the stored server name as a domain when redacting. A profile routed through a VPN that has no DNS servers, and that has none of its own or in WAN Settings, now resolves through 1.1.1.1 ([reasoning](#2992)) inside the tunnel instead of through the ISP's resolvers outside the tunnel. dns::fallback_dns_servers holds that fallback, so a configurable fallback list can replace the hard-coded 1.1.1.1 without migrating stored VPN settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outbound VPNs now get an MTU that fits through what each VPN connects via, a VPN that names its server by hostname can connect via another VPN, and a VPN-routed profile that has no DNS servers anywhere resolves through 1.1.1.1 inside the tunnel.
MTU sized to fit
StoreVpnClientMtus, moves existing configs onto the stored-MTU model.Chained VPNs that name their server by hostname
tunnel_dnsbinds the lookup to that tunnel's device, so the lookup never leaves through the WAN.dns::tunnel_dns_servers), and prefers the server's IPv4 address when that tunnel can carry IPv4.DNS fallback through the tunnel
A profile routed through a VPN that has no DNS servers, and that has none of its own or in WAN Settings, now resolves through 1.1.1.1 inside the tunnel instead of through the ISP's resolvers outside the tunnel. The reasoning is in #2992.
dns::fallback_dns_serversholds that fallback, so a configurable fallback list can replace the hard-coded 1.1.1.1 later without migrating stored VPN settings.SmartDNS speed checks outside the tunnel
SmartDNS's default speed checks ping each address in an answer, and connect to each address on ports 80 and 443, to pick the fastest one.
-interfacebinds only SmartDNS's upstream DNS sockets, so those probes followed the main routing table out through the WAN. The ISP could then see every address that a VPN-routed client looked up. This affected profiles that resolve through a SmartDNS group: profile custom DNS, WAN Settings DNS, and the new 1.1.1.1 fallback. The generatedsmartdns.confnow setsspeed-check-mode none. On the K1 router, a 20-second capture on the WAN during five lookups showed 12 pings before the change and none after.Interaction with #4882
#4882 moves each VPN's DNS servers from the WireGuard interface to the
startwrt.vpn_clientsection. This PR and #4882 both editdns.rs,vpn_client.rs,profiles.rsandmigrate.rs. Whichever PR merges second needs a rebase that keeps both migrations in merge order at the end ofMIGRATIONS. If #4882 merges first, this PR's chained-hostname test must also set the outer VPN's DNS on itsvpn_clientsection instead of callingset_interface_dns.tunnel_dns_serversreads DNS servers only throughvpn_dns_servers, sotunnel_dns_serversfollows #4882's storage change without edits.Bench results on a K1 router running 1.4.0 plus this build
StoreVpnClientMtus, ran on reboot.🤖 Generated with Claude Code