maos: point captive-portal check at maproj.org
- Commit
4c26f4aac72e5d5f3165b08f81765915b68b9cc9- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-09 01:04 UTC (27 days ago)
- Parents
8e22932
Repoint the GrapheneOS connectivity-check defaults in packages/modules/NetworkStack (default_captive_portal_http/https_url_grapheneos and the fallback-URL array) to https://maproj.org/generate_204, applied as a build-time patch like the other GrapheneOS-source customizations. An RRO cannot do this: the overlayable config_captive_portal_* hooks are not consulted by NetworkMonitor in this tree (it switches on ConnChecksSetting between the default_* values), and the default_* resources are deliberately not overlayable. Standard (Google) and Disabled choices are untouched.
Diff
build-maos.sh
diff --git a/build-maos.sh b/build-maos.shindex 7bb775a..a4db16e 100755--- a/build-maos.sh+++ b/build-maos.sh@@ -277,7 +277,8 @@ apply_maos_patches() { "packages/apps/Settings:settings.patch" \ "packages/apps/SetupWizard2:setupwizard2.patch" \ "external/roboto-fonts:roboto_fonts.patch" \- "packages/apps/GmsCompat:gmscompat.patch"; do+ "packages/apps/GmsCompat:gmscompat.patch" \+ "packages/modules/NetworkStack:networkstack_captive_portal.patch"; do apply_spec "${spec%%:*}" "${spec##*:}" done # Per-app Sensors-OPTOUT markers for inherited system apps (one patch per project;
patches/networkstack_captive_portal.patch
diff --git a/patches/networkstack_captive_portal.patch b/patches/networkstack_captive_portal.patchnew file mode 100644index 0000000..a6600be--- /dev/null+++ b/patches/networkstack_captive_portal.patch@@ -0,0 +1,37 @@+diff --git a/res/values/config.xml b/res/values/config.xml+index 65767cc..473e6f3 100644+--- a/res/values/config.xml++++ b/res/values/config.xml+@@ -13,7 +13,10 @@+ config_captive_portal_http_url and *NOT* by changing or overlaying+ this resource. It will break if the enforcement of overlayable starts.+ -->+- <string name="default_captive_portal_http_url_grapheneos" translatable="false">http://connectivitycheck.grapheneos.network/generate_204</string>++ <!-- MAOS: self-hosted endpoint. The overlayable config_captive_portal_http_url hook++ is not consulted by NetworkMonitor in this tree (it switches on ConnChecksSetting++ between the default_* values below), so the GrapheneOS default is repointed here. -->++ <string name="default_captive_portal_http_url_grapheneos" translatable="false">https://maproj.org/generate_204</string>+ <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string>+ <!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->+ <!-- default_captive_portal_https_url is not configured as overlayable so+@@ -22,7 +25,8 @@+ config_captive_portal_https_url and *NOT* by changing or overlaying+ this resource. It will break if the enforcement of overlayable starts.+ -->+- <string name="default_captive_portal_https_url_grapheneos" translatable="false">https://connectivitycheck.grapheneos.network/generate_204</string>++ <!-- MAOS: self-hosted endpoint (same note as above). -->++ <string name="default_captive_portal_https_url_grapheneos" translatable="false">https://maproj.org/generate_204</string>+ <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string>+ + <!-- List of fallback URLs to use for detecting captive portals. -->+@@ -33,8 +37,8 @@+ this resource. It will break if the enforcement of overlayable starts.+ -->+ <string-array name="default_captive_portal_fallback_urls_grapheneos" translatable="false">+- <item>http://grapheneos.online/gen_204</item>+- <item>http://grapheneos.online/generate_204</item>++ <!-- MAOS: self-hosted endpoint (same note as above). -->++ <item>https://maproj.org/generate_204</item>+ </string-array>+ <string-array name="default_captive_portal_fallback_urls" translatable="false">+ <item>http://www.google.com/gen_204</item>