Change connectivity check URLs

This commit is contained in:
Tad 2018-05-08 20:56:02 -04:00
parent e22d028cbd
commit 966c9c8509
4 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From 0030bc6ef203eb6ffc1300599db1fd48d4a77f78 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Tue, 8 May 2018 20:54:49 -0400
Subject: [PATCH] Change connectivity check URLs to ours
Change-Id: Idd9bfb4a09db763c97d0ea3aabf428176e28d48f
---
.../java/com/android/server/connectivity/NetworkMonitor.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
index 97669d242f0..2a39f90b19b 100644
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
@@ -86,9 +86,9 @@ public class NetworkMonitor extends StateMachine {
// Default configuration values for captive portal detection probes.
// TODO: append a random length parameter to the default HTTPS url.
// TODO: randomize browser version ids in the default User-Agent String.
- private static final String DEFAULT_HTTPS_URL = "https://www.google.com/generate_204";
+ private static final String DEFAULT_HTTPS_URL = "https://divestos.xyz/gen204.php";
private static final String DEFAULT_HTTP_URL =
- "http://connectivitycheck.gstatic.com/generate_204";
+ "http://divestos.xyz/gen204.php";
private static final String DEFAULT_FALLBACK_URL = "http://www.google.com/gen_204";
private static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) "
+ "AppleWebKit/537.36 (KHTML, like Gecko) "
--
2.17.0

View File

@ -0,0 +1,34 @@
From 883366830fc3af50d2232fc0b6d885f92c5d53ce Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Tue, 8 May 2018 20:53:07 -0400
Subject: [PATCH] Change connectivity check URLs to ours
Change-Id: I2dac7210f9c7e953d5ee88e2871bd26c234dfce6
---
.../com/android/server/connectivity/NetworkMonitor.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
index d3a93542c74..32918aa3cdc 100644
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
@@ -91,12 +91,12 @@ public class NetworkMonitor extends StateMachine {
// Default configuration values for captive portal detection probes.
// TODO: append a random length parameter to the default HTTPS url.
// TODO: randomize browser version ids in the default User-Agent String.
- private static final String DEFAULT_HTTPS_URL = "https://www.google.com/generate_204";
+ private static final String DEFAULT_HTTPS_URL = "https://divestos.xyz/gen204.php";
private static final String DEFAULT_HTTP_URL =
- "http://connectivitycheck.gstatic.com/generate_204";
- private static final String DEFAULT_FALLBACK_URL = "http://www.google.com/gen_204";
+ "http://divestos.xyz/gen204.php";
+ private static final String DEFAULT_FALLBACK_URL = "https://www.google.com/generate_204";
private static final String DEFAULT_OTHER_FALLBACK_URLS =
- "http://play.googleapis.com/generate_204";
+ "http://connectivitycheck.gstatic.com/generate_204";
private static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) "
+ "AppleWebKit/537.36 (KHTML, like Gecko) "
+ "Chrome/60.0.3112.32 Safari/537.36";
--
2.17.0

View File

@ -84,6 +84,7 @@ patch -p1 < $patches"android_frameworks_base/0003-Signature_Spoofing.patch"; #Al
patch -p1 < $patches"android_frameworks_base/0005-Harden_Sig_Spoofing.patch"; #Restrict signature spoofing to system apps signed with the platform key
#patch -p1 < $patches"android_frameworks_base/0006-DNS_Cloudflare.patch"; #Switch to Cloudflare DNS
patch -p1 < $patches"android_frameworks_base/0006-DNS_OpenNIC.patch"; #Switch to OpenNIC DNS
patch -p1 < $patches"android_frameworks_base/0007-Connectivity.patch"; #Change connectivity check URLs to ours
rm -rf packages/PrintRecommendationService; #App that just creates popups to install proprietary print apps
rm core/res/res/values/config.xml.orig core/res/res/values/strings.xml.orig;

View File

@ -81,6 +81,7 @@ patch -p1 < $patches"android_frameworks_base/0002-Signature_Spoofing.patch"; #Al
patch -p1 < $patches"android_frameworks_base/0003-Harden_Sig_Spoofing.patch"; #Restrict signature spoofing to system apps signed with the platform key
#patch -p1 < $patches"android_frameworks_base/0004-DNS_Cloudflare.patch"; #Switch to Cloudflare DNS
patch -p1 < $patches"android_frameworks_base/0004-DNS_OpenNIC.patch"; #Switch to OpenNIC DNS
patch -p1 < $patches"android_frameworks_base/0005-Connectivity.patch"; #Change connectivity check URLs to ours
if [ "$NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < $patches"android_frameworks_base/Copperhead/0005-Deny_USB.patch"; fi; #Deny USB support (Copperhead CC BY-NC-SA)
rm -rf packages/PrintRecommendationService; #App that just creates popups to install proprietary print apps
rm core/res/res/values/config.xml.orig core/res/res/values/strings.xml.orig;