Feature request: enforce Private DNS (DNS-over-TLS host) per configuration
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- android, java, kotlin, react, typescript
- Lĩnh vực
- backend-api-design, devops, mobile
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 44
- Fork
- 25
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 80
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MDMesh-app/MDMesh
-
enhancement
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
MDMesh-app/MDMesh#252 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Change Kiosk TitleĐang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
MDMesh-app/MDMesh#253 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
MDMesh-app/MDMesh#232 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
MDMesh-app/MDMesh#205 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
MDMesh-app/MDMesh#204 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của MDMesh-app/MDMesh
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug devops low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
aphtech/brailleblaster#209 ·
Maintainer thường phản hồi trong vòng 1 ngày