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
- Optional SOCKS5 authentication for DNS tunnel proxies (microsocks -u/-P)
- --manage: unified post-setup TUI menu with SIGINT-safe subshell isolation
- --status: display all tunnels, share URLs, SOCKS auth, DNS resolvers
- --add-tunnel: interactive wizard for adding individual tunnels
- --remove-tunnel [tag]: remove tunnels with interactive picker or direct tag
- Exact tag matching (awk field-exact + grep -qxF) prevents substring collisions
- Safe awk ENVIRON approach for systemd ExecStart credential injection
- EOF-safe menu loops, hash cache clearing after uninstall
- Smart router restart (skip if zero tunnels remain)
- README updated in English and Farsi with all new features
@@ -114,7 +115,7 @@ When someone queries `t2.yourdomain.com`, the global DNS system follows this cha
114
115
| 🔑 **slip-ssh**|`s2.domain`| Slipstream (QUIC) | SSH | When you need per-user authentication |
115
116
| 🔑 **dnstt-ssh**|`ds2.domain`| DNSTT (Noise) | SSH | SSH fallback if Slipstream is blocked |
116
117
117
-
> 🧦 **SOCKS backend:**Anyone who knows the domain can connect. Simpler, faster, no login required.
118
+
> 🧦 **SOCKS backend:**Optionally secured with SOCKS5 username/password authentication. Without auth, anyone who knows the domain can connect.
118
119
>
119
120
> 🔑 **SSH backend:** Requires username + password. Provides per-user access control. The SSH user is restricted — even if credentials leak, no one can access your server.
120
121
@@ -247,8 +248,13 @@ The wizard has **12 steps**. Here's what each one does:
@@ -513,6 +550,54 @@ If `sshtun-user` is not installed, the script will automatically download and co
513
550
514
551
---
515
552
553
+
## 🔐 SOCKS Proxy Authentication
554
+
555
+
During setup (Step 9), the wizard asks whether to enable SOCKS5 authentication on the microsocks proxy. This controls access to the **SOCKS tunnels** (`t2` and `d2` subdomains).
556
+
557
+
### With Authentication (Recommended)
558
+
559
+
When enabled, microsocks requires a **username and password** for every SOCKS5 connection. This means:
560
+
- Only clients with the correct credentials can use the tunnel
561
+
- The `slipnet://` share URLs automatically include the credentials (clients auto-configure)
562
+
- The `authMode` field in SlipNet is set to `1` (username/password)
563
+
564
+
The credentials are applied by adding `-u user -P pass` flags to the microsocks systemd service.
565
+
566
+
### Without Authentication
567
+
568
+
When disabled, the proxy is **open** — anyone who can resolve the DNS tunnel domain can connect. Security relies solely on the domain being secret.
569
+
570
+
### Changing Auth After Setup
571
+
572
+
To **add** authentication to an existing open proxy:
573
+
574
+
```bash
575
+
# 1. Edit the microsocks service
576
+
sudo systemctl edit --full microsocks.service
577
+
578
+
# 2. Find the ExecStart line and append: -u youruser -P yourpass
# 1. Edit the service and remove the -u and -P flags from ExecStart
590
+
sudo systemctl edit --full microsocks.service
591
+
592
+
# 2. Reload and restart
593
+
sudo systemctl daemon-reload
594
+
sudo systemctl restart microsocks
595
+
```
596
+
597
+
> **Note:** When adding a backup domain with `--add-domain`, the script auto-detects existing SOCKS authentication from the microsocks service and includes the credentials in the generated share URLs.
0 commit comments