Repository navigation
Home
A local DNS resolver, ad/tracker sinkhole, and live traffic dashboard for Android.
Private, open source, and built in pure Java. No Firebase, no Google Play Services, no tracking.
Repository: m-farhan-hamim/NetShield-DNS-Resolver-by-PSBDx
NetShield sits between your apps and the internet's DNS servers:
Apps βββΊ NetShield (local sinkhole) βββΊ Upstream DNS (DoH / DoT / UDP)
β
ββ blocked domain? β answered locally, never leaves the device
ββ allowed domain? β forwarded upstream, logged in the dashboard
- π VPN mode: A local VPN interface captures system DNS queries and hands them to the resolver. No traffic is tunneled to a remote server.
- π» Local server mode: The resolver listens on
127.0.0.1as a UDP DNS server that you can point apps or system settings at. - π§© Split tunneling: Exclude specific apps so their DNS queries skip NetShield entirely.
| Feature | Description |
|---|---|
| π DNS sinkhole | Blocks ads, trackers, and unwanted domains at the DNS level, for everything from browsers to apps. |
| π VPN mode | Routes all system DNS queries through a local sinkhole using Android's VPN service, without needing a separate proxy app. |
| π» Local server mode | Prefer no VPN? Run as a local UDP DNS server on 127.0.0.1. |
| π Encrypted upstreams | Resolve through DoH (DNS over HTTPS), DoT (DNS over TLS), or plain UDP with optional TLS validation. |
| π Custom blocklists | Add your own blocklists and rules. |
| π§© Per-app split tunneling | Choose which apps go through NetShield and which bypass it. |
| π Real-time traffic logs | Live dashboard with query logs and stats so you can see exactly what is being blocked and resolved. |
| β‘ Quick Settings tile | Toggle NetShield from the notification shade in one tap. |
| π± Home-screen widget | Resizable card with live status, query stats, and a power button to toggle instantly. |
| π‘ Lightweight and clean | Pure Java, only AndroidX and Material. No Kotlin, no Compose, no Firebase, and no Google Play Services. |
| Source | Link |
|---|---|
| π F-Droid | Get it on F-Droid |
| π¦ APKPure |
com.netshield.dns.psbdx on APKPure |
| π GitHub Releases | Latest signed APK |
| π VirusTotal | Scan report |
β οΈ APKPure note: Versions hosted on APKPure might be outdated. They are supported by me, but I can't guarantee them. For the latest verified build, always prefer GitHub Releases or F-Droid.
Package name: com.netshield.dns.psbdx
Current version: 3.1.1
π Whichever source you use, you can verify the APK's signing certificate before installing.
Beyond the in-app Start/Stop button, the resolver can be toggled with a single tap from:
- π± Quick Settings: Add the "NetShield" tile from the panel's edit screen. It reflects the Active/Inactive state live.
- π¨ Home-screen widget: A resizable card showing live status and query stats, with a dedicated power button to toggle instantly. Tapping the rest of the card opens the app.
Both use the same underlying ServiceManager.ACTION_STOP self-stop mechanism as the in-app button, so behavior stays consistent everywhere. If VPN mode hasn't been granted permission yet, tapping the tile/widget will prompt for it.
On launch, the app checks GET /repos/m-farhan-hamim/NetShield-DNS-Resolver-by-PSBDx/releases/latest and compares the release tag against the installed versionName. If a newer version exists, it offers a direct APK download.
π‘ Disabled for F-Droid installs, on purpose. F-Droid's client already verifies and delivers updates from its own build, so self-updating apps aren't wanted there.
UpdateChecker.isSelfUpdateAllowed()short-circuits the feature when the app was installed via F-Droid.
Official releases are signed with the same key. The SHA-256 fingerprint of the signing certificate is:
21:53:E6:6A:EA:E3:09:50:5C:8A:1C:21:76:66:B2:E4:64:01:28:29:0C:81:FF:E2:A4:0D:FF:75:E4:ED:62:A9
Check an APK with the Android SDK's apksigner:
apksigner verify --print-certs app-release.apkThe SHA-256 digest line in the output should match the fingerprint above. If it doesn't, don't install the file. A build signed with a different key is not an official release. Besides the security risk, it might break remote features such as update checks, the VPN service, log saving, and remote notifications.
You should only install packages from the project's official sources: GitHub Releases, F-Droid, and APKPure.
Pure Java, no Kotlin, no Compose, no Firebase or Google Play Services. Just AndroidX and Material.
git clone https://github.com/m-farhan-hamim/NetShield-DNS-Resolver-by-PSBDx.git
cd NetShield-DNS-Resolver-by-PSBDx
./gradlew :app:assembleDebugA release build works without any secrets configured (it just produces an unsigned APK):
./gradlew :app:assembleReleaseFor a locally signed release build, set these environment variables:
| Variable | Purpose |
|---|---|
KEYSTORE_PATH |
Path to your keystore file |
RELEASE_STORE_PASSWORD |
Keystore password |
RELEASE_KEYALIAS |
Key alias inside the keystore |
RELEASE_KEY_PASSWORD |
Key password |
- π App update checks
- π VPN service
- π Log saving
- π Remote notifications
Android also refuses to update an installed app that was signed with a different key, so switching between official and self-signed builds means uninstalling first (and losing app data). For non-official builds, the project may still run locally but receive limited or no remote functionality.
The release job in .github/workflows/build.yml builds a signed production APK and AAB on every push to main/master (and on manual workflow_dispatch runs), using these GitHub Actions secrets:
-
KEYSTORE_BASE64: your upload keystore, base64-encoded (base64 -w0 your-key.jks > keystore.b64on Linux/macOS) -
RELEASE_KEYALIAS: the key alias inside that keystore -
RELEASE_KEY_PASSWORD: the key's password -
RELEASE_STORE_PASSWORD: the keystore's password
Pull requests from forks can't access these secrets, so they only get the unsigned debug build. That's expected. Push a tag matching versionName in app/build.gradle.kts (for example 3.0.0) and the workflow also publishes a GitHub Release with the signed APK attached. That's what the in-app update checker compares against.
Contributions are welcome.
- Fork the repo and create a branch:
git checkout -b feature/my-change - Make your changes and test with
./gradlew :app:assembleDebug - Open a pull request describing what you changed and why.
Found a bug or have an idea? Open an issue.
Licensed under the GNU General Public License v3.0 or later.
See LICENSE for the full text.
Free and open source.
This app was built by PSBDx (M. Farhan Hamim).
Significant use of β¨ Google AI (Gemini) and π§ Anthropic Claude was made in its development.
Made with β€οΈ by PSBDx
NetShield DNS Resolver Β· A local DNS resolver, ad/tracker sinkhole, and live traffic dashboard for Android.
π Home Β· π₯ Download Β· π Wiki Β· π Issues Β· π Releases
Licensed under GNU GPL v3.0 or later Β· Built with β€οΈ by PSBDx
Β© 2025-2026 PSBDx Β· M. Farhan Hamim Β· This wiki is community-maintained.
π Getting Started
π οΈ Setup & Usage
π Security
π§° Developer
π Help
π Links
Version 3.1.1 Β· GPL-3.0-or-later