You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can download the latest pre-built binary for your platform — no Python installation required.
58
53
59
-
#### 🔌 Offline Installation (Server Without Internet Access)
54
+
**Client Downloads:**
60
55
61
-
If your **server has no internet access** and you cannot run `pip install` directly, follow these steps from a machine that **does** have internet access:
56
+
| Platform | Download |
57
+
|----------|----------|
58
+
| 🪟 Windows (AMD64) |[MasterDnsVPN_Client_Windows_AMD64.zip](https://github.com/masterking32/MasterDnsVPN/releases/latest/download/MasterDnsVPN_Client_Windows_AMD64.zip)|
59
+
| 🐧 Linux (AMD64) |[MasterDnsVPN_Client_Linux_AMD64.zip](https://github.com/masterking32/MasterDnsVPN/releases/latest/download/MasterDnsVPN_Client_Linux_AMD64.zip)|
# Transfer it to your offline server using scp, USB, or any available method
68
-
scp Python-3.11.9.tgz user@your-server:/tmp/
69
-
```
62
+
**Server Downloads:**
70
63
71
-
**Step 2 — Install Python from source on the offline server:**
72
-
```bash
73
-
# On the offline server
74
-
cd /tmp
75
-
tar xzf Python-3.11.9.tgz
76
-
cd Python-3.11.9
77
-
./configure --enable-optimizations
78
-
make -j$(nproc)
79
-
sudo make altinstall
80
-
# Verify
81
-
python3.11 --version
82
-
```
64
+
| Platform | Download |
65
+
|----------|----------|
66
+
| 🪟 Windows (AMD64) |[MasterDnsVPN_Server_Windows_AMD64.zip](https://github.com/masterking32/MasterDnsVPN/releases/latest/download/MasterDnsVPN_Server_Windows_AMD64.zip)|
67
+
| 🐧 Linux (AMD64) |[MasterDnsVPN_Server_Linux_AMD64.zip](https://github.com/masterking32/MasterDnsVPN/releases/latest/download/MasterDnsVPN_Server_Linux_AMD64.zip)|
# Transfer the entire folder to your offline server
90
-
scp -r pip_packages user@your-server:/tmp/
91
-
```
70
+
Each client ZIP contains the executable and a `client_config.toml` template file. Each server ZIP contains the executable and a `server_config.toml` template file.
92
71
93
-
**Step 4 — Install packages from the downloaded folder on the offline server:**
Edit `server_config.py` to include your domain and target forwarding IP/Port:
112
-
- Install a proxy server (e.g., SOCKS5, VLESS, VMESS, SSH, MTProto, OpenVPN TCP, etc.) on the server machine to forward traffic to the internet.
113
-
- Configure `FORWARD_IP` and `FORWARD_PORT` in `server_config.py` to point to your proxy server.
114
-
- Configure `DOMAIN` to match the subdomain you set up in your DNS records (e.g., `v.example.com`). You can add multiple domains for redundancy.
115
-
- Set `UDP_HOST` to `"0.0.0.0"` to listen on all interfaces (required for a public server).
116
-
- After the first run, note the optimal MTU values for download and upload, then set `MAX_UPLOAD_MTU` and `MAX_DOWNLOAD_MTU` accordingly. This will significantly speed up subsequent runs.
102
+
Edit `server_config.toml` to include your domain and target forwarding IP/Port.
103
+
- Install a proxy server (e.g., SOCKS5, VLESS, VMESS, SSH, MTProto, OpenVPN TCP and etc) on the server machine to forward traffic to the internet.
104
+
- Configure `FORWARD_IP` and `FORWARD_PORT` in `server_config.toml` to point to your proxy server.
105
+
- Configure `DOMAIN` to match the subdomain you set up in your DNS records (e.g., `v.example.com`).
117
106
118
-
### 3. Run the Server
107
+
####3. Run the Server
119
108
120
109
```bash
121
110
python server.py
122
111
```
123
112
124
113
On the first run, the server will generate an encryption key. **Save this key**; you will need it to configure the client.
125
114
126
-
### 4. Configure the Client
115
+
####4. Configure the Client
127
116
128
117
Copy the sample client configuration:
129
118
130
119
```bash
131
-
cp client_config.py.simple client_config.py
120
+
cp client_config.toml.simple client_config.toml
132
121
```
133
122
134
-
Edit `client_config.py`:
123
+
Edit `client_config.toml`:
124
+
125
+
-`DOMAINS`: Your tunnel subdomain (e.g., `v.example.com`).
126
+
127
+
-`ENCRYPTION_KEY`: The key displayed in the server log.
135
128
136
-
-**`DOMAINS`**: Your tunnel subdomain(s) (e.g., `v.example.com`). Add multiple for redundancy.
137
-
-**`ENCRYPTION_KEY`**: The key printed by your server on first run.
138
-
-**`RESOLVER_DNS_SERVERS`**: List of public DNS resolvers to use (e.g., `8.8.8.8`, `1.1.1.1`, `9.9.9.9`). Add as many as possible for better reliability.
139
-
-**`PACKET_DUPLICATION_COUNT`**: How many resolver+domain paths to use per packet (see emergency tip below).
129
+
-`RESOLVER_DNS_SERVERS`: List of public DNS resolvers (e.g., `8.8.8.8`, `1.1.1.1`).
140
130
141
-
### 5. Run the Client
131
+
####5. Run the Client
142
132
143
133
```bash
144
134
python client.py
@@ -152,9 +142,9 @@ The client starts a local SOCKS5 proxy on `127.0.0.1:1080` (configurable via `LI
152
142
153
143
> **When the network is almost completely down and only DNS queries are getting through (extremely high packet loss and disruption):**
154
144
155
-
1.**Collect as many DNS resolver IP addresses as possible.** Add them all to `RESOLVER_DNS_SERVERS` in `client_config.py`. You can use public resolvers from Google (`8.8.8.8`, `8.8.4.4`), Cloudflare (`1.1.1.1`, `1.0.0.1`), Quad9 (`9.9.9.9`), OpenDNS (`208.67.222.222`, `208.67.220.220`), and others.
145
+
1.**Collect as many DNS resolver IP addresses as possible.** Add them all to `RESOLVER_DNS_SERVERS` in `client_config.toml`. You can use public resolvers from Google (`8.8.8.8`, `8.8.4.4`), Cloudflare (`1.1.1.1`, `1.0.0.1`), Quad9 (`9.9.9.9`), OpenDNS (`208.67.222.222`, `208.67.220.220`), and others.
156
146
157
-
2.**Increase `PACKET_DUPLICATION_COUNT`** in `client_config.py`. This parameter controls how many different resolver+domain paths each packet is sent through **simultaneously**.
147
+
2.**Increase `PACKET_DUPLICATION_COUNT`** in `client_config.toml`. This parameter controls how many different resolver+domain paths each packet is sent through **simultaneously**.
158
148
159
149
- With 6 resolvers and 2 domains, you have **12 potential paths**.
160
150
- Setting `PACKET_DUPLICATION_COUNT = 6` means every packet is sent across 6 different paths at once.
@@ -166,6 +156,46 @@ The client starts a local SOCKS5 proxy on `127.0.0.1:1080` (configurable via `LI
166
156
167
157
---
168
158
159
+
## ⚙️ Configuration Reference
160
+
161
+
### 🖥️ Server — `server_config.toml`
162
+
163
+
> 🔑 The encryption key is **auto-generated** on first run and saved to `encrypt_key.txt` next to the server executable. It is also printed in the server log. Copy it to the client's `ENCRYPTION_KEY` field. Delete `encrypt_key.txt` and restart to rotate the key.
|`RESOLVER_DNS_SERVERS`|`["8.8.8.8"]`| Public DNS resolvers that tunnel queries are forwarded through. Add multiple for redundancy and load balancing. |
183
+
|`MIN_UPLOAD_MTU`|`40`| Minimum upload MTU (bytes) a resolver must achieve to be used. Set to `0` to disable. |
184
+
|`MIN_DOWNLOAD_MTU`|`40`| Minimum download MTU (bytes) a resolver must achieve to be used. Set to `0` to disable. |
185
+
|`MAX_UPLOAD_MTU`|`160`| Upper bound (bytes) for upload MTU auto-probing. |
186
+
|`MAX_DOWNLOAD_MTU`|`200`| Upper bound (bytes) for download MTU auto-probing. |
187
+
|`RESOLVER_BALANCING_STRATEGY`|`1`| Load-balancing strategy across resolvers: `1`=Random, `2`=Round-Robin, `3`=Least-Loss |
188
+
|`DOMAINS`|`["t.example.com"]`| Tunnel domain(s) pointing to your server via NS records. Add multiple for multi-path redundancy. |
189
+
|`DATA_ENCRYPTION_METHOD`|`1`| Encryption algorithm. **Must match the server.**`0`=None, `1`=XOR, `2`=ChaCha20, `3`=AES-128-CTR, `4`=AES-192-CTR, `5`=AES-256-CTR |
190
+
|`ENCRYPTION_KEY`|`""`| Key from the server's `encrypt_key.txt` or first-run log. Must match the server. |
191
+
|`DNS_QUERY_TIMEOUT`|`5`| Seconds to wait for a DNS response before considering a query failed. |
192
+
|`LISTEN_IP`|`"127.0.0.1"`| Local IP the SOCKS5 proxy listens on. |
193
+
|`LISTEN_PORT`|`1080`| Local port for the SOCKS5 proxy. Point your application to this address. |
194
+
|`NUM_DNS_WORKERS`|`4`| Number of concurrent async DNS worker tasks. Increase for higher traffic. |
195
+
|`PACKET_DUPLICATION_COUNT`|`3`| How many resolver+domain paths each packet is sent through simultaneously. Higher = more reliable but more bandwidth. |
0 commit comments