MasterDnsVPN README

The project's README from github.com/masterking32/MasterDnsVPN. As one markdown file: README.md.

MasterDnsVPN Project 🔐

| 🇮🇷 فارسی | 🇬🇧 English | 🇷🇺 Русский | 🇨🇳 中文 | 🇪🇸 Español | 🇮🇹 Italiano |

MasterDnsVPN is a scientific and research-oriented project for carrying TCP traffic through DNS queries and responses. In broad goal, it is similar to projects such as DNSTT or SlipStream, but it follows a fundamentally different structure and implementation approach. This system is designed around compatibility with many resolver behaviors and harsh network conditions, with the goal of preserving the highest possible stability and data delivery even in the worst cases.

Ask DeepWiki

masterking32%2FMasterDnsVPN | Trendshift masterking32%2FMasterDnsVPN | Trendshift masterking32%2FMasterDnsVPN | Trendshift masterking32%2FMasterDnsVPN | Trendshift MasterDnsVPN | SourceForge

📊 MasterDnsVPN Compared with Similar Projects

Feature SlipStream DNSTT MasterDnsVPN
Protocol type Advanced DNS tunnel Classic DNS tunnel Advanced DNS tunnel / VPN
Transport protocol QUIC KCP + Noise Custom protocol + ARQ
Transport header overhead 🟠 ~24B 🔴 ~59B 🟢 ~5–7B
≈88% lower than DNSTT
≈71% lower than SlipStream
Encryption style TLS 1.3 (inside QUIC) Noise (Curve25519) AES / ChaCha20 / XOR (if XOR is used: lightweight with lower security and no extra overhead)
Architecture Unified (QUIC handles everything) Multi-layered (KCP + SMUX + Noise) 🟢 Lightweight custom design optimized for DNS
Speed 🟡 High (up to ~5× faster than DNSTT) 🔴 Medium 🟢 Faster than others
Up to ~9× faster than DNSTT
Up to ~3.6× faster than SlipStream
Stability under packet loss 🟡 Good 🟠 Medium 🟢 Very high (Multipath + ARQ)
Multi-resolver support Yes (multipath) ❌ Yes — advanced (multi-resolver + duplication)
Resilience under heavy censorship Good Medium Very strong (a core project goal)
Setup complexity Medium Simple Easier installation
More complex only if you heavily customize advanced settings
SOCKS5 support Yes Yes Optimized for SOCKS5 / SOCKS4 with reduced SOCKS overhead
Shadowsocks support ✅ ❌ Indirectly: TCP Forwarding mode can carry TCP-based protocols
e.g. Shadowsocks, VLESS/VMess, etc.
Real multipath Yes (QUIC multipath) ❌ Yes (multi-resolver + duplication)
Adaptive routing Limited ❌ Advanced (latency/loss based)
Design goal High speed and efficiency Simplicity and stability Surviving the harshest networks — stability, speed, and efficiency
Implementation language Rust Go Main version is Go
Legacy Python version also exists
Built-in balancer 🔴 ❌ 🟢 (8 built-in balancing modes)
Duplication system ❌ ❌ Yes — increases traffic to improve reliability (configurable or can be disabled)
MTU tolerance Better than DNSTT - Works even with very small MTU because protocol overhead is very low
Failover system ❌ ❌ ✅
Download speed 10MB (Local) 🟡 0.978s 🔴 2.492s 🟢 0.270s
Upload speed 10MB (Local) 🟡 3.249s 🔴 16.207s 🟢 1.746s
Resolver health checks and auto-disable ❌ ❌ ✅
Background reactivation of healthy resolvers ❌ ❌ ✅
Local DNS service on client (to reduce DNS hijacking) ❌ ❌ ✅ (with strong DNS caching)
DNS resolving through SOCKS5 ❌ ❌ ✅ (with DNS caching)
Fine-grained professional configuration 🟠 🟠 🟢 Almost every subsystem is configurable
No external helper software required ❌ ❌ 🟢 No extra software is required; if needed, you can still combine it with SOCKS or tools such as Shadowsocks or OpenVPN

❌ Disclaimer

MasterDnsVPN is provided as an educational and research project only.


Announcement and Support Channel 📢

For the latest news, releases, and project updates, follow our Telegram channel: Telegram Channel


If you like this project, please support it by starring it on GitHub (⭐). It helps the project get discovered.


Optional Financial Support 💸

masterking32.ton

0x517f07305D6ED781A089322B6cD93d1461bF8652

TLApdY8APWkFHHoxebxGY8JhMeChiETqFH

Every contribution and every piece of feedback is appreciated. Support directly helps ongoing development and improvement.


Key Features and Advantages ✨

A brief overview of the main capabilities of MasterDnsVPN:

This list is only a high-level summary. The related sections below explain each area in more detail.


🌐 Battle-Tested During a Total Internet Blackout

MasterDnsVPN isn't just a theoretical project. It is battle-tested and proven to work in environments where the global internet is completely severed.

Recently, during the 88-day internet blackout in Iran, authorities didn't just block VPNs or filter websites—they completely pulled the plug on international bandwidth. With 99% of the connection to the outside world physically cut off, users were trapped inside a closed, local intranet.

Standard circumvention tools are useless when there is no international internet to connect to. Yet, during this massive shutdown, MasterDnsVPN stood out as one of the very few lifelines that actually kept users connected to the global web.

How did it survive a total shutdown? Instead of acting like a standard VPN, MasterDnsVPN relies on smart DNS tunneling techniques to pierce through the blackout:

This exact combination is what allowed MasterDnsVPN to maintain a stable connection when the outside world was completely blocked.


Setup and Getting Started 🧑‍💻

Section 1: 🖥️ Server Setup

Section 1.1: 🌐 Domain Setup and Preparation (Prerequisite)

To receive DNS requests directly on your server, you must delegate a subdomain to it. In short, create two records: one A record that points to your server IP, and one NS record that delegates the tunnel subdomain to that A record.

Step 1.1.1: 🅰️ Create an A Record (Server Address)

Example: ns.example.com -> 1.2.3.4

Cloudflare note: if the domain uses Cloudflare, open the DNS page and click the cloud icon next to the A record so it becomes gray (DNS only). It must not remain proxied.

Step 1.1.2: 🏷️ Create an NS Record (Delegate the Subdomain)

Example: v.example.com -> ns.example.com

Cloudflare note: add the NS record normally. Cloudflare does not proxy NS records, but make sure the ns A record is already set to DNS only.

Section 1.1.3: 💡 A Short Note About MTU

Shorter domain names leave more space for actual data inside each DNS request. For better throughput, keep names short. If you use Cloudflare, still keep the relevant records in DNS only mode.


Section 1.2: 🐧 Quick Linux Server Installation

Step 1.2.1: Automatic Installation (Script)

If you want to deploy the server on Linux, the easiest method is the automatic installer script. Run this command on the server:

bash <(curl -Ls https://raw.githubusercontent.com/masterking32/MasterDnsVPN/main/server_linux_install.sh)

The script handles installation and configuration automatically. When it finishes, the server starts and the encryption key is shown in the terminal log and also written to encrypt_key.txt next to the executable. Keep this key safe.

Step 1.2.2: Important Notes After Installation

sudo ufw allow 53/udp
sudo ufw reload

For firewalld:

sudo firewall-cmd --add-port=53/udp --permanent
sudo firewall-cmd --reload

Section 2: 🚀 Installation and Launch (Client and Server)

You can install and run this project in two ways:

  1. Use the prebuilt binaries (recommended for most users)
  2. Run directly from source with Go (recommended for developers)

For convenience, prebuilt client and server binaries are published in the release page. Download the correct archive for your operating system and extract it.

💡 Note: Release archives usually include the binary plus sample configuration files.

Operating System Architecture Suitable For Direct Download
Windows 🪟 AMD64 (64-bit) Windows 10 and 11 Download Windows Client ⬇️
Windows 🪟 x86 (32-bit) Older 32-bit Windows systems Download Windows x86 Client ⬇️
Windows 🪟 ARM64 Windows on ARM devices Download Windows ARM64 Client ⬇️
macOS 🍎 ARM64 Apple Silicon Macs (M1 / M2 / M3) Download macOS Client ⬇️
macOS 🍎 AMD64 Intel Macs Download macOS Intel Client ⬇️
Linux 🐧 AMD64 (64-bit) Modern distributions (Ubuntu 22.04+, Debian 12+) Download Linux Client ⬇️
Linux 🐧 x86 (32-bit) Older 32-bit Linux systems Download Linux x86 Client ⬇️
Linux (Legacy) 🐧 AMD64 (64-bit) Older distributions (Ubuntu 20.04, Debian 11) Download Linux Legacy Client ⬇️
Linux (Legacy) 🐧 ARM64 Older ARM64 Linux systems that need broader compatibility Download Linux Legacy ARM64 Client ⬇️
Linux (ARM) 🐧 ARM64 ARM servers, Raspberry Pi, and similar boards Download Linux ARM Client ⬇️
Linux (ARM) 🐧 ARMv7 32-bit ARM boards and older embedded Linux devices Download Linux ARMv7 Client ⬇️
Linux (ARM) 🐧 ARMv6 Older ARM boards and lightweight Linux devices Download Linux ARMv6 Client ⬇️
Linux (ARM) 🐧 ARMv5 Very old ARM devices and embedded Linux systems Download Linux ARMv5 Client ⬇️
Linux 🐧 RISCV64 RISC-V Linux boards and servers Download Linux RISCV64 Client ⬇️
Linux (MIPS) 🐧 MIPS Big-endian MIPS Linux and router platforms Download Linux MIPS Client ⬇️
Linux (MIPS) 🐧 MIPSLE Little-endian MIPS Linux and router platforms Download Linux MIPSLE Client ⬇️
Linux (MIPS) 🐧 MIPS64 64-bit big-endian MIPS Linux systems Download Linux MIPS64 Client ⬇️
Linux (MIPS) 🐧 MIPS64LE 64-bit little-endian MIPS Linux systems Download Linux MIPS64LE Client ⬇️
Termux / Android 📱 ARM64 Modern Android phones running Termux Download Termux ARM64 Client ⬇️
Termux / Android 📱 ARMv7 Older Android phones running 32-bit Termux environments Download Termux ARMv7 Client ⬇️

(Use these if you do not want the automated Linux installer.)

Operating System Architecture Suitable For Direct Download
Windows 🪟 AMD64 (64-bit) Windows Server, Windows 10 and 11 Download Windows Server ⬇️
Windows 🪟 x86 (32-bit) Older 32-bit Windows systems Download Windows x86 Server ⬇️
Windows 🪟 ARM64 Windows on ARM devices [Download Windows ARM64 Server ⬇️](https://github.com/masterking32/MasterDnsVPN/releases/latest/download/MasterDnsVPN_Server_W

MasterDnsVPN (masterking32/MasterDnsVPN)

Searching Database…

这是什么?MasterDnsVPN 是一款 DNS 隧道 VPN,它把 TCP 流量藏在 DNS 查询和响应中传输,在常规连接被封锁时帮你上网。它的目标与 DNSTT 或 SlipStream 相同,但采用了自己开销更低的协议。
这是 VPN 应用还是网络库?它是一个独立的客户端/服务端工具,以 Windows 和 Linux 的预编译二进制文件发布,不是可以导入的代码库。你可以直接运行服务端和客户端程序,也可以用 Go 自己编译。
我该怎么让它运行起来?先用 A 记录加 NS 记录把一个子域名委派到你的服务器,然后在服务器上运行自动安装的 Linux 脚本,它会完成所有配置并输出一个加密密钥。最后,下载适合你操作系统的客户端二进制文件,并使用该密钥连接。
使用它需要我自己的域名和 DNS 记录吗?需要。你必须拥有一个域名,并通过 A 记录和 NS 记录把一个隧道子域名委派到你的服务器,服务器才能接收 DNS 流量。如果不使用预编译二进制文件,而是从源码构建,还需要安装 Go。
设置它有什么坑吗?创建记录后,DNS 生效(传播)可能需要几分钟到最长 48 小时,具体取决于 TTL 和服务商。如果 UDP 53 端口已被 systemd-resolved 之类的程序占用,你必须先释放它,服务器才能绑定该端口。
客户端能在哪些平台上运行?客户端提供 Windows 10/11 的预编译二进制文件,同时有 64 位和 32 位版本。服务端主要通过安装脚本部署在 Linux 上,其他平台可以用 Go 从源码构建。
它会加密我的流量吗?会。它支持多种加密方式:AES 和 ChaCha20 用于保障安全,另外还有一个可选的轻量级 XOR 模式,以安全性换取更低的开销。
它的速度和 DNSTT、SlipStream 比起来怎么样?项目宣称其下载速度最高约为 DNSTT 的 9 倍,是 SlipStream 的 3.6 倍。得益于其自研的基于 ARQ 的传输层,它的协议头开销比 DNSTT 低约 88%。
它在真实的审查事件中真的管用吗?管用。README 中称,它在伊朗长达 88 天的全面断网期间被使用。当时国际带宽被物理切断,它仍是少数能把流量伪装成普通 DNS 查询、并连通外部世界的工具之一。
解析器负载均衡具体是做什么的?它通过 8 种内置的均衡模式,把流量分散到多个 DNS 解析器上。它还会进行健康检查,自动禁用出现故障的解析器,并在其恢复后于后台重新启用。
它能承载 Shadowsocks 或 VLESS 之类的其他代理协议吗?间接可以。它的 TCP 转发模式可以通过 DNS 通道隧道传输任何基于 TCP 的协议,包括 Shadowsocks、VLESS 或 VMess。
Size
3.5 MB
Stars
7.1K
Age
8mo
Commits · 90 Days