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
The proxy listener is a local ingress point for both HTTP and SOCKS traffic. Binding that listener to a wildcard address or LAN address exposes the relay surface to other devices on the network. Without inbound proxy authentication, that exposure can turn a local client into an unauthenticated shared proxy and allow unrelated devices to consume the operator's Apps Script quota.
The default listen_host is now 127.0.0.1, matching the local-only behavior expected for a desktop proxy. Config validation now accepts IPv4 loopback, IPv6 loopback, bracketed IPv6 loopback, and localhost. It rejects wildcard binds, LAN addresses, public hostnames, and other non-loopback values with a hard configuration error before any listener socket is opened.
The guard is implemented at configuration validation time rather than at bind time so TOML loading, JSON migration, CLI startup, and UI save paths all observe the same fail-closed rule. Existing explicit loopback profiles continue to load unchanged. Profiles that rely on 0.0.0.0 or a LAN address must wait for an authenticated LAN-sharing mode rather than silently opening an unauthenticated listener.
TOML examples now show the loopback listener and call out that non-loopback binds are rejected until inbound proxy authentication exists. The English and Persian guides no longer instruct users to set listen_host to 0.0.0.0 for hotspot or OpenWRT sharing; they describe the current local-only safety behavior instead.
Focused config tests cover the repaired default, accepted loopback forms, rejected wildcard and non-loopback forms, TOML network defaults, and JSON-to-TOML migration preserving the loopback listen_host.
Copy file name to clipboardExpand all lines: docs/guide.fa.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,7 +269,9 @@ HTTP / HTTPS مثل قبل از Apps Script میرود (تغییری نمی
269
269
270
270
## اشتراکگذاری هاتاسپات
271
271
272
-
mhrv-rs بهطور پیشفرض روی `0.0.0.0` گوش میدهد، پس هر دستگاه روی همان شبکه میتواند ازش استفاده کند. سناریوی رایج: اشتراک تونل از گوشی اندروید به آیفون / آیپد / لپتاپ از هاتاسپات:
272
+
mhrv-rs حالا بهطور پیشفرض فقط روی `127.0.0.1` گوش میدهد و تا وقتی احراز هویت HTTP/SOCKS برای ورودی پیادهسازی نشده باشد، bind غیر loopback را رد میکند. این کار جلوی open proxy ناخواسته و مصرف شدن quota Apps Script توسط دستگاههای دیگر شبکه را میگیرد.
273
+
274
+
اشتراکگذاری هاتاسپات/LAN بعداً بهصورت یک حالت صریح و دارای احراز هویت برمیگردد. در نسخهٔ فعلی `listen_host` را به `0.0.0.0` تغییر نده؛ اعتبارسنجی کانفیگ fail-closed میشود. workflow قدیمی این بود:
273
275
274
276
۱. **اندروید:** هاتاسپات موبایل را روشن کن + اپ را استارت کن
275
277
۲. **دستگاه دیگر:** به Wi-Fi هاتاسپات اندروید وصل شو
دستگاههای LAN HTTP proxy را روی IP روتر (پورت پیشفرض `8085`) یا SOCKS5 روی `<router-ip>:8086` تنظیم میکنند. در `/etc/mhrv-rs/config.toml`مقدار `listen_host` را به `0.0.0.0`بگذار تا روتر اتصال LAN را بپذیرد.
311
+
نسخهٔ فعلی فقط روی loopback گوش میدهد. اجرای CLI روی OpenWRT برای تست محلی همچنان کار میکند، اما استفاده از روتر بهعنوان proxy برای کل LAN به حالت authenticated LAN-sharing آینده نیاز دارد. در این نسخه `listen_host` را در `/etc/mhrv-rs/config.toml` به `0.0.0.0`تغییر نده؛ اعتبارسنجی کانفیگ این bind ناامن را رد میکند.
310
312
311
313
مصرف حافظه ~۱۵–۲۰ مگابایت — روی هر روتری با ۱۲۸ مگابایت RAM به بالا اجرا میشود. UI روی musl نیست (روترها headlessاند).
Copy file name to clipboardExpand all lines: docs/guide.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,7 +269,9 @@ The destination sees the exit node's IP, not Google's, so the anti-bot heuristic
269
269
270
270
## Sharing via hotspot
271
271
272
-
mhrv-rs listens on `0.0.0.0` by default, so any device on the same network can use it. Common scenario: share the tunnel from an Android phone to an iPhone, iPad, or laptop over hotspot:
272
+
mhrv-rs listens on `127.0.0.1` by default and rejects non-loopback proxy binds until inbound HTTP/SOCKS authentication is implemented. This prevents accidental open-proxy exposure and Apps Script quota theft on shared Wi-Fi or hotspots.
273
+
274
+
Hotspot/LAN sharing will return as an explicit authenticated mode in a later release. On current builds, do not change `listen_host` to `0.0.0.0`; startup validation will fail closed. The old sharing workflow was:
273
275
274
276
1.**Android:** enable mobile hotspot + start the app
275
277
2.**Other device:** connect to the Android hotspot Wi-Fi
@@ -287,7 +289,7 @@ For full device-wide coverage on iOS, use [Shadowrocket](https://apps.apple.com/
287
289
288
290
Set system HTTP proxy to `192.168.43.1:8080`, or per-app SOCKS5 to `192.168.43.1:1081`.
289
291
290
-
> If `listen_host` is `127.0.0.1` in your config, change to `0.0.0.0` to allow other devices.
292
+
> Current safety gate: non-loopback values such as `0.0.0.0`, `::`, or a LAN IP are rejected until proxy authentication is available.
LAN devices then point HTTP proxy at the router's LAN IP (default port `8085`) or SOCKS5 at `<router-ip>:8086`. Set `listen_host` to `0.0.0.0` in `/etc/mhrv-rs/config.toml`so the router accepts LAN connections.
311
+
Current builds listen on loopback only. Running the CLI on OpenWRT for local diagnostics still works, but using the router as a LAN-wide proxy requires the upcoming authenticated LAN-sharing mode. Do not set `listen_host` to `0.0.0.0` in `/etc/mhrv-rs/config.toml`on this version; config validation will reject the unsafe bind.
310
312
311
313
Memory footprint ~15–20 MB resident — fine on anything ≥128 MB RAM. No UI on musl (routers are headless).
0 commit comments