Skip to content

About

No description, website, or topics provided.

Resources

Stars

13 stars

Watchers

0 watching

Forks

Repository files navigation

MasterDnsVPN Android Plugin

Client-only SIP003 plugin for shadowsocks-android, built from the upstream MasterDnsVPN client.

The repository pins the MasterDnsVPN submodule to the upstream release v2026.06.13.234407-7de2476 (7de2476f1c33e69eec35360c52810dab43c5c986).

VPN mode requires a shadowsocks-android build containing #3227, first released as v5.3.5-nightly. Older builds that route the host process through the VPN are not supported.

Server setup

Use the upstream MasterDnsVPN server release. Its configuration must match the plugin profile:

DOMAIN = ["tunnel.example.com"]
PROTOCOL_TYPE = "TCP"
FORWARD_IP = "shadowsocks.example.com"
FORWARD_PORT = 8388
DATA_ENCRYPTION_METHOD = 1
ENCRYPTION_KEY_FILE = "encrypt_key.txt"

FORWARD_IP and FORWARD_PORT are the fixed Shadowsocks server endpoint. The plugin therefore intentionally ignores SS_REMOTE_HOST and SS_REMOTE_PORT; those values must match the target configured on the MasterDnsVPN server.

Put the exact contents of encrypt_key.txt in the plugin's key field. If the file is missing or has the wrong method-specific length, the upstream server generates and writes a new key; copy that generated value rather than inventing a separate client key.

Plugin options

Configure these fields through shadowsocks-android's plugin screen:

  • domains: comma-separated MasterDnsVPN tunnel domains; required.
  • key: exact contents of the server's encryption key file; 16 bytes for method 3, 24 for method 4, and 32 for the other methods.
  • encryption-method: integer from 0 through 5; defaults to 1.
  • resolvers: comma-separated DNS resolver IPs, CIDRs, or IP:port entries; required.

The generated client configuration uses the upstream sample's 4000-byte download MTU discovery ceiling. MasterDnsVPN probes the resolver path and selects a working size up to that ceiling; it does not force every path to use 4000 bytes. It also disables control-packet batching so that download acknowledgements continue to generate pull requests. This improves throughput at the cost of more DNS traffic and battery use.

Build

Requirements: JDK 17 or newer, Android SDK 36, Android NDK 27.2.12479018, and Go 1.25 or newer.

git submodule update --init
./gradlew assembleDebug

The build copies the pinned submodule into app/build, applies a small client-embedding patch there, and cross-compiles libmasterdnsvpn.so for armeabi-v7a, arm64-v8a, x86, and x86_64. The patch lets the plugin own the SIP003 listener while the upstream client owns the tunnel runtime; the submodule checkout itself remains pristine.

Run the Go and Android checks with:

./gradlew goTest testDebugUnitTest lintDebug

License

This project is licensed under the Apache License 2.0. MasterDnsVPN and other dependencies retain their respective licenses.

About

No description, website, or topics provided.

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages