Feature request: enforce Private DNS (DNS-over-TLS host) per configuration
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- android, java, kotlin, react, typescript
調査の方向性
Start by reading the existing configuration revision and policy flows for factory reset and Safe Mode, then trace how config.apply outcomes reach the console and device telemetry. The issue calls for changes across server, Android agent, and console, including validation and API 29+ behavior. Done means the selected mode and lock are applied and reported, unsupported or failed outcomes are visible, and unmanaged mode restores the default.
索引モデルが issue の本文から書いたものです。
説明
Area
Server / REST API
The problem
Problem
We run MDMesh in a boarding school dormitory (~50 student phones, QR-enrolled as Device Owner, kiosk mode with an allowlist of study and communication apps). Kiosk keeps students inside the allowed apps, but several allowed apps open links in an in-app browser (Chrome Custom Tabs or a WebView): Gemini, ChatGPT, Telegram and others. A Custom Tab opens inside the calling app's task, so LockTask doesn't stop it, and students can reach any website from there.
The app itself is legitimate and needed (AI assistants for homework, messengers to reach parents). What we need to restrict is the open web behind it, and kiosk can't do that.
The practical fix is DNS filtering (NextDNS, AdGuard DNS, Cloudflare Family, a self-hosted resolver…). DNS filtering covers every app, in-app browsers included. Today we set Private DNS by hand on each phone, which:
- doesn't scale: every new or re-enrolled phone needs a manual step, and a missed phone is unfiltered;
- isn't enforced: if a student ever reaches Settings, they can switch Private DNS off;
- can't be audited: the console doesn't show which phones actually have it.
A router-level DNS only covers the dorm Wi-Fi, not mobile data.
I checked v0.4.0: the agent has no Private DNS policy yet.
Why it belongs in MDMesh
Android provides this for Device Owners directly (API 29+, Android 10). No VPN app or root is needed:
DevicePolicyManager.setGlobalPrivateDnsModeSpecifiedHost(admin, host)forces DNS-over-TLS to a given host for the whole device, on Wi-Fi and mobile data.DevicePolicyManager.setGlobalPrivateDnsModeOpportunistic(admin)restores the Android default.UserManager.DISALLOW_CONFIG_PRIVATE_DNSstops the user from changing it.
It fits the existing desired-state model the same way Block factory reset and Safe Mode do. I'd expect schools, kiosks and frontline fleets to want it as well.
Proposed solution
Proposed solution
Configuration (e.g. under Configuration → Network, next to the new connectivity mode):
- Private DNS:
Not managed(default) /Automatic(opportunistic) /Host - Private DNS host: text field, shown when
Hostis chosen, e.g.abc123.dns.nextdns.io - Lock Private DNS setting: on/off (
DISALLOW_CONFIG_PRIVATE_DNS)
Server
- New configuration columns (e.g.
privateDnsMode,privateDnsHost,lockPrivateDns), included in the configuration revision. - Validate the host on save: a hostname only, no scheme, port or path.
Agent (new policy module, like the factory-reset and Safe Mode ones)
Host: callsetGlobalPrivateDnsModeSpecifiedHost. Report the result in theconfig.applyoutcomes:PRIVATE_DNS_SET_NO_ERROR→appliedPRIVATE_DNS_SET_ERROR_HOST_NOT_SERVING→failed, with a reason, so the console shows it, and retry at the next check-in. The host can fail its check while the phone is offline.- API < 29 →
unsupported
Automatic: callsetGlobalPrivateDnsModeOpportunistic.Not managed: leave the device as it is. If the agent applied a mode before, restoreAutomaticonce and clear the lock, the same way the Safe Mode block is lifted when nothing asks for it.- Apply the lock restriction independently of the mode.
- Report the current mode and host (
getGlobalPrivateDnsMode/getGlobalPrivateDnsHost) in telemetry, so the device page can show it.
Console
- Show the Private DNS mode and host on the device page.
- Flag devices where it's
failedorunsupportedin Needs attention.
Notes
- Private DNS doesn't stop an app that does its own DNS-over-HTTPS. Admins should also block bypass methods on the resolver side (NextDNS has a "Block bypass methods" option). A sentence in the docs would help.
- Older agents should ignore the new keys, as with other additive protocol changes.
Happy to test a build on our fleet (Samsung, Redmi/Xiaomi, Honor, TECNO; Android 12–16) before release.
Alternatives considered
No response
Before submitting
- I searched existing issues and discussions for the same idea.
- 主要言語
- Java
- スター
- 44
- フォーク
- 25
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 80
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MDMesh-app/MDMesh のほかの issue
-
enhancement
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
MDMesh-app/MDMesh#252 ·
メンテナーはふだん 2 日以内に返信
-
Change Kiosk Titleオープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
MDMesh-app/MDMesh#253 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
MDMesh-app/MDMesh#232 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 3/5 半日 初心者へのやさしさ 45/100
MDMesh-app/MDMesh#205 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
MDMesh-app/MDMesh#204 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
MDMesh-app/MDMesh の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug devops low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
aphtech/brailleblaster#209 ·
メンテナーはふだん 1 日以内に返信