Change default DNS resolvers and MTU to 1500#36
Conversation
📝 WalkthroughWalkthroughDefault values in ChangesDefault Configuration Value Updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/main/java/io/nekohasekai/sagernet/database/DataStore.kt`:
- Line 129: The default DNS provider in the directDns variable is set to
Cloudflare (1.1.1.1) instead of the intended Quad9 provider (9.9.9.9) for DNSSEC
and malicious-domain blocking. Change the hardcoded default value in the
directDns declaration from "https://1.1.1.1/dns-query" to
"https://9.9.9.9/dns-query" to align with the PR objective.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 634601e7-9d20-4b89-947e-b1ec97adf675
📒 Files selected for processing (2)
app/src/main/java/io/nekohasekai/sagernet/database/DataStore.ktapp/src/main/res/xml/global_preferences.xml
| var remoteDns by configurationStore.string(Key.REMOTE_DNS) { "https://dns.google/dns-query" } | ||
| var directDns by configurationStore.string(Key.DIRECT_DNS) { "https://223.5.5.5/dns-query" } | ||
| var remoteDns by configurationStore.string(Key.REMOTE_DNS) { "https://dns.quad9.net/dns-query" } | ||
| var directDns by configurationStore.string(Key.DIRECT_DNS) { "https://1.1.1.1/dns-query" } |
There was a problem hiding this comment.
Direct DNS default does not match the stated Quad9 objective.
directDns is set to Cloudflare (1.1.1.1), but the PR objective specifies Quad9 IP-based DoH (9.9.9.9) for DNSSEC + malicious-domain blocking defaults. Please align both code and XML to the intended provider.
Suggested fix
--- a/app/src/main/java/io/nekohasekai/sagernet/database/DataStore.kt
+++ b/app/src/main/java/io/nekohasekai/sagernet/database/DataStore.kt
@@
- var directDns by configurationStore.string(Key.DIRECT_DNS) { "https://1.1.1.1/dns-query" }
+ var directDns by configurationStore.string(Key.DIRECT_DNS) { "https://9.9.9.9/dns-query" }
--- a/app/src/main/res/xml/global_preferences.xml
+++ b/app/src/main/res/xml/global_preferences.xml
@@
- app:defaultValue="https://1.1.1.1/dns-query"
+ app:defaultValue="https://9.9.9.9/dns-query"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@app/src/main/java/io/nekohasekai/sagernet/database/DataStore.kt` at line 129,
The default DNS provider in the directDns variable is set to Cloudflare
(1.1.1.1) instead of the intended Quad9 provider (9.9.9.9) for DNSSEC and
malicious-domain blocking. Change the hardcoded default value in the directDns
declaration from "https://1.1.1.1/dns-query" to "https://9.9.9.9/dns-query" to
align with the PR objective.
Summary
https://dns.quad9.net/dns-queryhttps://1.1.1.1/dns-query9000to1500Notes
DataStore.ktandglobal_preferences.xml.Validation
git diff --check