DivestOS/Patches/LineageOS-14.1/android_frameworks_base/0006-DNS_Cloudflare.patch

78 lines
3.9 KiB
Diff
Raw Normal View History

2018-05-03 07:38:32 -04:00
From 511b38c6a2807417893d5c21cbc27335bf6bead7 Mon Sep 17 00:00:00 2001
2017-12-19 17:03:38 -05:00
From: Tad <tad@spotco.us>
2018-05-03 07:38:32 -04:00
Date: Thu, 3 May 2018 07:35:30 -0400
Subject: [PATCH] Change fallback, tethering, and test DNS servers to
Cloudflare
2017-12-19 17:03:38 -05:00
2018-05-03 07:38:32 -04:00
Change-Id: I8031cce58003a45d9b6947ecdcc4d642ef192f52
2017-12-19 17:03:38 -05:00
---
2018-05-03 07:38:32 -04:00
core/res/res/values/config.xml | 2 +-
packages/SettingsLib/res/values/strings.xml | 4 ++--
.../com/android/server/connectivity/NetworkDiagnostics.java | 4 ++--
.../core/java/com/android/server/connectivity/Tethering.java | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
2017-12-19 17:03:38 -05:00
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
2018-05-03 07:38:32 -04:00
index c29ff3c90a9..49f6c04a5e7 100755
2017-12-19 17:03:38 -05:00
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1608,7 +1608,7 @@
<bool name="config_bluetooth_default_profiles">true</bool>
<!-- IP address of the dns server to use if nobody else suggests one -->
- <string name="config_default_dns_server" translatable="false">8.8.8.8</string>
2018-05-03 07:38:32 -04:00
+ <string name="config_default_dns_server" translatable="false">1.0.0.1</string>
2017-12-19 17:03:38 -05:00
<!-- The default mobile provisioning apn. Empty by default, maybe overridden by
an mcc/mnc specific config.xml -->
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
2018-05-03 07:38:32 -04:00
index f9bd24ba69f..67ef212f795 100644
2017-12-19 17:03:38 -05:00
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -837,9 +837,9 @@
<!-- Hint text for the IP address -->
<string name="wifi_ip_address_hint" translatable="false">192.168.1.128</string>
<!-- Hint text for DNS -->
- <string name="wifi_dns1_hint" translatable="false">8.8.8.8</string>
2018-05-03 07:38:32 -04:00
+ <string name="wifi_dns1_hint" translatable="false">1.0.0.1</string>
2017-12-19 17:03:38 -05:00
<!-- Hint text for DNS -->
- <string name="wifi_dns2_hint" translatable="false">8.8.4.4</string>
2018-05-03 07:38:32 -04:00
+ <string name="wifi_dns2_hint" translatable="false">1.1.1.1</string>
2017-12-19 17:03:38 -05:00
<!-- Hint text for the gateway -->
<string name="wifi_gateway_hint" translatable="false">192.168.1.1</string>
<!-- Hint text for network prefix length -->
2018-05-03 07:38:32 -04:00
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
index 5f9efe704f7..ea308ca231b 100644
--- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
+++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
@@ -84,9 +84,9 @@ import libcore.io.IoUtils;
public class NetworkDiagnostics {
private static final String TAG = "NetworkDiagnostics";
- private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("8.8.8.8");
+ private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("1.0.0.1");
private static final InetAddress TEST_DNS6 = NetworkUtils.numericToInetAddress(
- "2001:4860:4860::8888");
+ "2606:4700:4700::1111");
// For brevity elsewhere.
private static final long now() {
2017-12-19 17:03:38 -05:00
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
2018-05-03 07:38:32 -04:00
index f0cf0d98882..9240f5ffdfd 100644
2017-12-19 17:03:38 -05:00
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -181,8 +181,8 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
};
private String[] mDefaultDnsServers;
- private static final String DNS_DEFAULT_SERVER1 = "8.8.8.8";
- private static final String DNS_DEFAULT_SERVER2 = "8.8.4.4";
2018-05-03 07:38:32 -04:00
+ private static final String DNS_DEFAULT_SERVER1 = "1.0.0.1";
+ private static final String DNS_DEFAULT_SERVER2 = "1.1.1.1";
2017-12-19 17:03:38 -05:00
private final StateMachine mTetherMasterSM;
private final UpstreamNetworkMonitor mUpstreamNetworkMonitor;
--
2018-05-03 07:38:32 -04:00
2.17.0
2017-12-19 17:03:38 -05:00