Skip to content

Preserve custom DNS addresses when switching to network DNS - #995

Closed
kasnder wants to merge 2 commits into
masterfrom
codex/custom-dns-toggle
Closed

kasnder wants to merge 2 commits into
masterfrom
codex/custom-dns-toggle

Conversation

@kasnder

@kasnder kasnder commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Users who temporarily configure public DNS servers must currently delete and retype them to return to their home network's DNS. Add a “Use custom DNS” switch beside the two saved DNS addresses. Turning it off reloads the VPN with network DNS, disables the address fields and preserves their values for later reuse.

The switch defaults to enabled so existing installations and older backups retain their behaviour. IPv6-only resolver selection and public fallback remain unchanged. Secure DNS and WireGuard DNS keep their existing precedence, explained in the setting summary. Disabled saved local resolvers no longer count towards local-network permission prompts.

Closes #969 via the requested simple toggle option.

Validation: 43 focused JVM tests passed (CustomDnsTest, LocalNetworkAccessTest, ServiceSinkholeSecureDnsTest, ActivitySettingsTest); :app:lintGithubDebug and git diff --check passed. New coverage exercises switching away and back without losing either address, old settings, IPv6-only network DNS, preference dependencies and local-network permission detection. No physical-device DNS handover test performed.

CI also exposed an existing scheduler-dependent WireGuard test: 1,000 Thread.yield() calls could finish before the stopping thread ran. The two affected race tests now wait for lifecycle invalidation with a monotonic deadline and always release their callback gates during cleanup. Production WireGuard code is unchanged. The full testFdroidDebugUnitTest --offline suite subsequently passed locally: 507 tests, no failures or skips.

@kasnder kasnder closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Easily changeable DNS settings.

1 participant