Skip to content

Commit b4ca0a6

Browse files
authored
Change default DNS to Quad9 and MTU to 1500
Merge PR #36: update fresh-install defaults for DNS and MTU.
2 parents 502c28d + a3eb787 commit b4ca0a6

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/src/main/java/io/nekohasekai/sagernet/database/DataStore.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ object DataStore : OnPreferenceDataStoreChangeListener {
109109
var trafficSniffing by configurationStore.stringToInt(Key.TRAFFIC_SNIFFING) { 1 }
110110
var resolveDestination by configurationStore.boolean(Key.RESOLVE_DESTINATION)
111111

112-
var mtu by configurationStore.stringToInt(Key.MTU) { 9000 }
112+
var mtu by configurationStore.stringToInt(Key.MTU) { 1500 }
113113

114114
var bypassLan by configurationStore.boolean(Key.BYPASS_LAN)
115115
var bypassLanInCore by configurationStore.boolean(Key.BYPASS_LAN_IN_CORE)
@@ -125,8 +125,8 @@ object DataStore : OnPreferenceDataStoreChangeListener {
125125

126126
var globalCustomConfig by configurationStore.string(Key.GLOBAL_CUSTOM_CONFIG) { "" }
127127

128-
var remoteDns by configurationStore.string(Key.REMOTE_DNS) { "https://dns.google/dns-query" }
129-
var directDns by configurationStore.string(Key.DIRECT_DNS) { "https://223.5.5.5/dns-query" }
128+
var remoteDns by configurationStore.string(Key.REMOTE_DNS) { "https://dns.quad9.net/dns-query" }
129+
var directDns by configurationStore.string(Key.DIRECT_DNS) { "https://1.1.1.1/dns-query" }
130130
var enableDnsRouting by configurationStore.boolean(Key.ENABLE_DNS_ROUTING) { true }
131131
var enableFakeDns by configurationStore.boolean(Key.ENABLE_FAKEDNS) { true }
132132

app/src/main/res/xml/global_preferences.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
app:title="@string/tun_implementation"
4646
app:useSimpleSummaryProvider="true" />
4747
<moe.matsuri.nb4a.ui.MTUPreference
48-
app:defaultValue="9000"
48+
app:defaultValue="1500"
4949
app:entries="@array/mtu_select"
5050
app:entryValues="@array/mtu_select"
5151
app:icon="@drawable/baseline_public_24"
@@ -195,7 +195,7 @@
195195

196196
<PreferenceCategory app:title="@string/cag_dns">
197197
<EditTextPreference
198-
app:defaultValue="https://dns.google/dns-query"
198+
app:defaultValue="https://dns.quad9.net/dns-query"
199199
app:icon="@drawable/ic_action_dns"
200200
app:key="remoteDns"
201201
app:title="@string/remote_dns"
@@ -208,7 +208,7 @@
208208
app:title="@string/domain_strategy_for_remote"
209209
app:useSimpleSummaryProvider="true" />
210210
<EditTextPreference
211-
app:defaultValue="https://223.5.5.5/dns-query"
211+
app:defaultValue="https://1.1.1.1/dns-query"
212212
app:icon="@drawable/ic_action_dns"
213213
app:key="directDns"
214214
app:title="@string/direct_dns"

0 commit comments

Comments
 (0)