Modern Apps git

← MAOS.git

maos: pre-fill dot.maproj.org in the Private DNS hostname dialog

Commit
8309e90e0f6cb9288997168bf5f1d800a92a32be
Author
Vayun Mathur <[email protected]>
When
2026-11-17 15:01 UTC (18 days ago)
Parents
1d5dffa
Amend the Private DNS prefill patch (previously doh.maproj.org) to
seed dot.maproj.org instead. Android Private DNS is DNS-over-TLS
(RFC 7858, TCP :853), not DNS-over-HTTPS, so the doh.maproj.org
value could never connect: Android reports couldnt connect, and
Cloudflare does not proxy :853. dot.maproj.org is the new DoT proxy
(companion server commit adds src/bin/dot_proxy.rs terminating TLS
on :853 with an ACME-issued certificate and relaying the
length-prefixed DNS stream byte-for-byte to 1.1.1.1:853).
doh.maproj.org remains the Cloudflare-proxied DoH endpoint for
browsers and other DoH clients; it must not be used as a Private
DNS provider hostname.

The patch file was regenerated with git diff against the pristine
~/maos tree (the in-file comment now explains the DoT/DoH split),
so the hunk header and blob index are exact.

Verification: git apply --check on the pristine
PrivateDnsModeDialogPreference.java passes, git apply followed by
git apply --reverse --check and a full reverse apply passes, the
tree was restored clean afterwards, and bash -n build-maos.sh
passes. The existing hostname validation in doSaveButton
(InternetDomainName.isValid) accepts dot.maproj.org. Not verified:
an on-device open of Settings > Network & internet > Private DNS
showing the pre-filled field — that needs a flashed MAOS build with
this patch.

Owner DNS note: this prefill is only useful once dot.maproj.org
resolves to the server: that needs the DNS-only (grey-cloud, NOT
proxied) dot A record -> 87.86.80.39 from the server commit. Until
then, choosing the pre-filled hostname yields a resolver that does
not answer yet.

Diff

patches/packages_apps_Settings_private_dns_prefill.patch
diff --git a/patches/packages_apps_Settings_private_dns_prefill.patch b/patches/packages_apps_Settings_private_dns_prefill.patchindex 73176c0..189f9d5 100644--- a/patches/packages_apps_Settings_private_dns_prefill.patch+++ b/patches/packages_apps_Settings_private_dns_prefill.patch@@ -1,5 +1,5 @@ diff --git a/src/com/android/settings/network/PrivateDnsModeDialogPreference.java b/src/com/android/settings/network/PrivateDnsModeDialogPreference.java-index b9836f1b86d..0b8a3ed2ede 100644+index b9836f1b86d..75c4e10e185 100644 --- a/src/com/android/settings/network/PrivateDnsModeDialogPreference.java +++ b/src/com/android/settings/network/PrivateDnsModeDialogPreference.java @@ -31,6 +31,7 @@ import android.net.ConnectivitySettingsManager;@@ -10,21 +10,23 @@ index b9836f1b86d..0b8a3ed2ede 100644  import android.text.TextWatcher;  import android.text.method.LinkMovementMethod;  import android.util.AttributeSet;-@@ -154,7 +155,16 @@ public class PrivateDnsModeDialogPreference extends CustomDialogPreferenceCompat+@@ -154,7 +155,18 @@ public class PrivateDnsModeDialogPreference extends CustomDialogPreferenceCompat          mHostnameLayout = view.findViewById(R.id.private_dns_mode_provider_hostname_layout);          mHostnameText = view.findViewById(R.id.private_dns_mode_provider_hostname);          if (mHostnameText != null) { -            mHostnameText.setText(ConnectivitySettingsManager.getPrivateDnsHostname(context)); +            final String currentHostname = +                    ConnectivitySettingsManager.getPrivateDnsHostname(context);-+            // MAOS: pre-fill our DoH resolver (doh.maproj.org, RFC 8484-+            // DNS-over-HTTPS) so choosing "Private DNS provider hostname"-+            // needs no typing. This is only a suggestion in the text++            // MAOS: pre-fill our DoT resolver (dot.maproj.org, RFC 7858++            // DNS-over-TLS on :853) so choosing "Private DNS provider++            // hostname" needs no typing. Android Private DNS is DoT, not++            // DoH: doh.maproj.org stays for browsers/DoH clients and must++            // NOT be used here. This is only a suggestion in the text +            // field: it is persisted solely when the user keeps that mode +            // and taps Save (see doSaveButton), and a hostname the user +            // already set is never overwritten. +            mHostnameText.setText(-+                    TextUtils.isEmpty(currentHostname) ? "doh.maproj.org" : currentHostname);++                    TextUtils.isEmpty(currentHostname) ? "dot.maproj.org" : currentHostname);              mHostnameText.addTextChangedListener(this);          }