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
NodePass client mode 1 supports automatic NAT traversal using the STUN (Session Traversal Utilities for NAT) protocol. When the client cannot bind to the specified tunnel address, it automatically enables hybrid mode with STUN support.
332
+
333
+
### How STUN NAT Traversal Works
334
+
335
+
1.**Automatic Fallback**: When binding to the tunnel address fails, NodePass attempts STUN discovery
336
+
2.**STUN Server Discovery**: The tunnel address in the client URL is used as the STUN server address
337
+
3.**Public Endpoint Discovery**: Client queries the STUN server to discover its public IP and port
338
+
4.**Local Binding**: Client binds to a random local port and logs the NAT mapping
339
+
5.**External Access**: External clients can connect to the discovered public endpoint
340
+
341
+
### Recommended STUN Servers
342
+
343
+
Google provides free public STUN servers that work well with NodePass:
344
+
345
+
-`stun.l.google.com:19302` (Primary)
346
+
-`stun1.l.google.com:19302`
347
+
-`stun2.l.google.com:19302`
348
+
-`stun3.l.google.com:19302`
349
+
-`stun4.l.google.com:19302`
350
+
351
+
### STUN Configuration Examples
352
+
353
+
```bash
354
+
# Use Google's primary STUN server for NAT traversal
-**Home Servers**: Access home services without router port forwarding
370
+
-**IoT Devices**: Connect to devices behind carrier-grade NAT (CGNAT)
371
+
-**Peer-to-Peer Applications**: Direct connections between clients behind NAT
372
+
-**Development Testing**: Test applications with external accessibility
373
+
-**Remote Access**: Secure access to services in restricted network environments
374
+
375
+
### Important Notes
376
+
377
+
- STUN only discovers the public endpoint; the NAT must allow incoming connections
378
+
- Symmetric NAT may prevent successful connections even with STUN discovery
379
+
- The discovered public endpoint is logged: `External endpoint: <public_ip:port> -> <local_ip:port> -> <target>`
380
+
- STUN traffic is unencrypted; only used for endpoint discovery, not data transfer
381
+
- Other mode 1 features remain fully functional with STUN
382
+
324
383
## URL Query Parameter Scope and Applicability
325
384
326
385
NodePass allows flexible configuration via URL query parameters. The following table shows which parameters are applicable in server, client, and master modes:
0 commit comments