仓库历史提交含约 1.2GB 旧 Go 二进制,建议用 blobless clone 避免全量下载;默认从 GitHub Releases 拉取预编译 tunnel.aar,只有改 Go 代码才需 Go 1.23+ 与 gomobile;HTTPS 过滤需安装并验证 CA 证书,证书固定应用会绕过 MITM
blockads-android
pass-with-high-scoreGPL-3.0活跃维护基于本地 VPN 的 DNS 过滤,在 Android 上全局拦截广告,无需 root、不收集数据,适合想彻底去广告又不想折腾的用户。
Block ads system-wide on Android using local VPN-based DNS filtering. No root needed. No data collection.
git clone --filter=blob:limit=1m https://github.com/pass-with-high-score/blockads-android.git
cd blockads-android
./gradlew assembleDebugREADME 未说明硬件要求;这是 Android 应用,需 Android 系统(min SDK 24),构建需 Android SDK 36 与 JDK 17+
安卓免 root 全局去广告工具,用本地 VPN 做 DNS 过滤,拦截广告、追踪和恶意域名
基于本地 VPN 的 DNS 过滤,在 Android 上全局拦截广告,无需 root、不收集数据,适合想彻底去广告又不想折腾的用户。
核心能力
- 通过本地 VpnService 做 DNS 过滤,无需 root
- 可选 Root Proxy 模式,经 iptables 重定向
- 内置 StevenBlack、AdGuard DNS、EasyList 等过滤列表
- HTTPS 过滤用 gVisor netstack 按应用 UID 做 MITM
- 284 域名直通名单保障银行、支付、政务应用
容易踩的坑
- tunnel-2026.11.08.63123206Go tunnel 2026.11.08.63123206pre-release2026-11-08 · 2026-11-08 09:09 UTC
查看更新说明
Reproducible
tunnel.aarbuilt fromtunnel/at f582acaf82b38e84d8b44f6d6527fed31c8d127f.sha256:
312200933dffd36d84a1664fb13fbe4baa605b561f53a5b460c3597b160e59abConsumed as
app.pwhs:tunnel:2026.11.08.63123206; see docs/TUNNEL.md. - v7.1.1最新正式版2026-11-05 · 2026-11-05 06:39 UTC
• Android TV: Added root proxy and VPN proxy support • Fixed HTTPS filtering issues (white screen & WebSocket stability) • Fixed Domain Rules management and CA certificate wizard in light mode • Enhanced Go tunnel engine performance and connection stability • General bug fixes and stability improvements
- tunnel-2026.11.02.a661770fGo tunnel 2026.11.02.a661770fpre-release2026-11-02 · 2026-11-02 16:08 UTC
查看更新说明
Reproducible
tunnel.aarbuilt fromtunnel/at 4591cb7ef1c014ec68dc24a9329ae4163ce0c4bf.sha256:
1dc3993e83bf56c97aeb6dc03b77ade2b1cb8821f444d0d26a46f4a95bafc631Consumed as
app.pwhs:tunnel:2026.11.02.a661770f; see docs/TUNNEL.md. - v7.1.02026-11-01 · 2026-11-01 09:55 UTC
查看更新说明
• Unified Proxy & VPN mode: AmneziaWG, Shadowsocks 2022, VLESS, VMess, Trojan, Hysteria 2, TUIC & MASQUE with subscription links • DNS Stamps (sdns://), DoH3 (HTTP/3) & WebRTC leak protection • On-device filter compilation, multi-URL filter merging & custom tags • Upgraded HTTPS filtering pipeline with OTA modular rules • Android TV: custom DNS, per-app firewall, themes & compact D-pad UI • Reset Settings, Support & Bug Report sheet, and stability fixes
- tunnel-2026.10.27.2b2a570eGo tunnel 2026.10.27.2b2a570epre-release2026-10-27 · 2026-10-27 01:19 UTC
查看更新说明
Reproducible
tunnel.aarbuilt fromtunnel/at 200e6cbade83bd763c04b8ee2392d91e2b90e362.sha256:
43009b4ba4493200ecc48d13699f9b1e7528d99cf2a9324eea83e954eaebbee0Consumed as
app.pwhs:tunnel:2026.10.27.2b2a570e; see docs/TUNNEL.md.
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Screenshots
Features
- Dual Routing Modes: System-wide ad blocking via VPN (no root needed) OR Root Proxy Mode (via iptables)
- Privacy-first Optional Crash Reporting & Manual Local Logs Export
- Comprehensive Onboarding Flow (Permissions, Battery Optimization, Opt-in telemetry)
- WireGuard Profile Import
- HTTPS Filtering with userspace TCP/IP stack — per-app MITM, cosmetic CSS, JS scriptlets
- CA cert install verification (auto-refresh after returning from Settings)
- 284-domain curated passthrough list keeps banking, payments and gov apps working
- Multiple built-in filter lists (StevenBlack, AdGuard DNS, EasyList, and more)
- Region-aware defaults — auto-enables filters for your language
- Real-time DNS query logs with search & filtering
- Security protection — blocks phishing, malware, and malvertising domains
- Dark / Light / System theme with Material 3 dynamic colors
- 7 accent color options + Material You dynamic theming
- Quick Settings tile & home screen widget
- Custom block/allow rules and whitelisting
- Per-app filtering (bypass VPN for selected apps)
- DNS-over-HTTPS (DoH) support with multiple providers
- Auto-update filter lists on schedule (6h / 12h / 24h / 48h)
- Export / Import settings backup
- Auto-reconnect on boot
- Multi-language support (English, Vietnamese, Japanese, Korean, Chinese, Thai, Spanish)
- 100% local — all data stays on your device
Community
Sponsor
If you enjoy BlockAds, consider supporting the project! Your sponsorship helps us maintain and improve the app.
Build Instructions
Requirements
- Android Studio Ladybug or newer
- JDK 17 or higher
- Android SDK 36 (min SDK 24)
- (Optional - only needed if modifying Go tunnel) Go 1.23+ and gomobile
Steps
[!TIP] Historical versions of the Go binary (
tunnel.aar) were committed in the past before being moved to GitHub Releases. To avoid downloading ~1.2GB of old binaries, use blobless clone (--filter=blob:limit=1m) to download only ~20MB.
-
Clone the repository:
git clone --filter=blob:limit=1m https://github.com/pass-with-high-score/blockads-android.git cd blockads-android(Or for a shallow clone:
git clone --depth=1 https://github.com/pass-with-high-score/blockads-android.git) -
(Optional) Build the Go tunnel AAR/JAR from source (with Android 15 16KB page size support):
./scripts/build_tunnel.sh # Or ./gradlew -Ptunnel.source=local buildGoTunnelNote: This is completely optional. Gradle automatically resolves a prebuilt, checksum-pinned
tunnel.aarfrom GitHub Releases by default. You do not need Go or NDK unless you are modifying Go code intunnel/. See docs/TUNNEL.md. -
Open the project in Android Studio
-
Sync Gradle and run the app on a device or emulator
-
Build from command line:
./gradlew assembleDebug ./gradlew bundleRelease # requires signing key
How It Works
BlockAds routes DNS queries locally either through a VpnService (Vpn Mode) or via iptables redirection (Root Proxy Mode). These queries are matched against loaded filter lists using a memory-efficient Trie data structure. Matching queries are blocked locally, while all other traffic passes through normally — no data leaves your device.
When HTTPS Filtering is enabled, a userspace TCP/IP stack (gVisor netstack via tun2socks) terminates each TCP/UDP flow in Go, looks up the owning app UID via Android's ConnectivityManager.getConnectionOwnerUid(), and only MITMs flows from selected browsers. Cert-pinned apps and the 284-domain curated passthrough list bypass MITM cleanly. Cosmetic CSS rules and EasyList ##+js(…) / AdGuard #%#//scriptlet(…) scriptlets are injected into HTML responses via a tiny in-memory local asset host.
License
This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute it under the terms of the license.
See the full LICENSE file for details.
Credits
- Developed and maintained by Nguyen Quang Minh
- Built with Jetpack Compose, Koin, and Compose Destinations
Contributing
Pull requests and issue reports are welcome.
Help us improve BlockAds!
Help us translate BlockAds
Want to see BlockAds in your language?
Open an issue or submit a PR with your translations.