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
Migrates the project configuration format from JSON to TOML with automatic legacy JSON upgrade support, updates docs/examples/scripts, and keeps Android + UI paths on the new format.
Verified locally on the current GitHub merge ref:
- `cargo test --lib`
- `cargo build --release`
- `cargo build --bin mhrv-rs-ui --release --features ui`
- Android `:app:assembleDebug` with Android Studio JBR and local Android SDK
---
Answered via LLM, Supervised @therealaleph
Copy file name to clipboardExpand all lines: SF_README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ Click **Connect** (or **Start** on desktop). Done. Your browser, Telegram, etc.
49
49
### Common issues (most people hit at least one)
50
50
51
51
**YouTube videos look "restricted" or comments are missing? ([#61](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/issues/61))**
52
-
Turn on **"Send YouTube through relay (no SNI rewrite)"** in the desktop UI's Advanced section, or set `youtube_via_relay: true` in `config.json`. YouTube then goes through the Apps Script relay instead of the direct Google tunnel, which avoids YouTube's SafeSearch-on-SNI behaviour. Trade-off: slightly slower video, and it counts against your daily quota.
52
+
Turn on **"Send YouTube through relay (no SNI rewrite)"** in the desktop UI's Advanced section, or set `youtube_via_relay = true` in `config.toml`. YouTube then goes through the Apps Script relay instead of the direct Google tunnel, which avoids YouTube's SafeSearch-on-SNI behaviour. Trade-off: slightly slower video, and it counts against your daily quota.
53
53
54
54
**"Verify you are human" loop on Cloudflare-protected sites?**
55
55
This can't be fixed in this app. Every Apps Script request comes from a different Google datacenter IP, and Cloudflare's challenge cookie is locked to one IP — so the next request fails the check and re-challenges you. Sites that only check once per session work fine. Sites that check every page won't.
@@ -58,7 +58,7 @@ This can't be fixed in this app. Every Apps Script request comes from a differen
58
58
Your Apps Script deployment isn't responding. Go back to <https://script.google.com>, **Deploy → Manage deployments → Edit (pencil)**, change "Version" to **New version**, click Deploy. Copy the **new** Deployment ID and paste it into the app.
59
59
60
60
**Hit your daily limit?**
61
-
Free Google accounts get **20,000 relay requests per day**. The desktop and Android apps show a "Usage today" card with how many you've used. Add multiple Deployment IDs (one per line in the UI, or a JSON array in `config.json`) — each ID has its own quota and they're rotated automatically. You can also click "View quota on Google" to see the official number on Google's dashboard.
61
+
Free Google accounts get **20,000 relay requests per day**. The desktop and Android apps show a "Usage today" card with how many you've used. Add multiple Deployment IDs (one per line in the UI, or an array in `config.toml`) — each ID has its own quota and they're rotated automatically. You can also click "View quota on Google" to see the official number on Google's dashboard.
62
62
63
63
**App says it's connected but websites don't load?**
64
64
- Open the **SNI pool** section and click **Test all**. If everything fails, your `google_ip` value is unreachable from your network — click **Auto-detect google_ip** to fix.
@@ -120,7 +120,7 @@ This project is free and run by volunteers. If it helped you and you can spare a
120
120
### مشکلات رایج (اکثر کاربران حداقل یکی از اینها را میبینند)
121
121
122
122
**ویدیوهای یوتیوب «محدود» نشان داده میشوند یا کامنتها دیده نمیشوند؟ ([#61](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/issues/61))**
123
-
در بخش Advanced دسکتاپ گزینهٔ **«Send YouTube through relay (no SNI rewrite)»** را روشن کنید، یا در `config.json` مقدار `youtube_via_relay: true` بگذارید. در این حالت یوتیوب از مسیر ریلهٔ Apps Script رد میشود و فیلتر SafeSearch-on-SNI گوگل دور میخورد. تریدآف: ویدیو کمی کندتر و مصرف از سهمیهٔ روزانه.
123
+
در بخش Advanced دسکتاپ گزینهٔ **«Send YouTube through relay (no SNI rewrite)»** را روشن کنید، یا در `config.toml` مقدار `youtube_via_relay = true` بگذارید. در این حالت یوتیوب از مسیر ریلهٔ Apps Script رد میشود و فیلتر SafeSearch-on-SNI گوگل دور میخورد. تریدآف: ویدیو کمی کندتر و مصرف از سهمیهٔ روزانه.
124
124
125
125
**روی سایتهای پشت Cloudflare loop «Verify you are human» میخورد؟**
126
126
این مشکل در این ابزار قابل حل نیست. هر درخواست Apps Script از یک IP متفاوت دیتاسنتر گوگل خارج میشود و کوکی challenge کلودفلر به یک IP خاص قفل است — درخواست بعدی از IP دیگر دوباره چالش میخورد. سایتهایی که فقط یکبار در ابتدای session چک میکنند درست کار میکنند. سایتهایی که هر صفحه چک میکنند، نه.
@@ -129,7 +129,7 @@ This project is free and run by volunteers. If it helped you and you can spare a
129
129
Apps Script شما پاسخ نمیدهد. به <https://script.google.com> برگردید، **Deploy → Manage deployments → Edit (آیکن مداد)** را بزنید، گزینهٔ "Version" را روی **New version** بگذارید و Deploy کنید. **آیدی جدید** Deployment را کپی کنید و در برنامه جایگذاری کنید.
130
130
131
131
**سهمیهٔ روزانه تمام شده؟**
132
-
هر حساب گوگل رایگان روزانه **۲۰٬۰۰۰ درخواست ریله** دارد. کارت «مصرف امروز» در دسکتاپ و اندروید مقدار مصرف فعلی را نشان میدهد. میتوانید چند Deployment ID (هر کدام در یک خط، یا بهصورت JSON array در `config.json`) اضافه کنید — هر آیدی سهمیهٔ خودش را دارد و بهصورت چرخشی استفاده میشوند. دکمهٔ «مشاهدهٔ سهمیه در گوگل» شما را به داشبورد رسمی گوگل میبرد.
132
+
هر حساب گوگل رایگان روزانه **۲۰٬۰۰۰ درخواست ریله** دارد. کارت «مصرف امروز» در دسکتاپ و اندروید مقدار مصرف فعلی را نشان میدهد. میتوانید چند Deployment ID (هر کدام در یک خط، یا در `config.toml`) اضافه کنید — هر آیدی سهمیهٔ خودش را دارد و بهصورت چرخشی استفاده میشوند. دکمهٔ «مشاهدهٔ سهمیه در گوگل» شما را به داشبورد رسمی گوگل میبرد.
133
133
134
134
**برنامه میگوید وصل است ولی سایتها باز نمیشوند؟**
135
135
- بخش **SNI pool** را باز کنید و **Test all** بزنید. اگر همه fail شدند، یعنی `google_ip` فعلی از شبکهٔ شما در دسترس نیست — روی **Auto-detect google_ip** بزنید تا اصلاح شود.
پشتیبان استاندارد ([`assets/apps_script/Code.gs`](../apps_script/Code.gs)) خودِ `Apps Script` کار `fetch` به مقصد را انجام میدهد. این نسخهٔ جایگزین، `Apps Script` را به یک رلهٔ نازک تبدیل میکند و کارِ اصلی را به لبهٔ `Cloudflare` میسپارد. **خود `mhrv-rs` تغییر نمیکند** — همان پاکت `JSON` روی سیم، همان `mode: "apps_script"` در `config.json`، همان `script_id`. تنها تفاوت این است که `Apps Script` مستقر شدهٔ شما بعد از احراز هویت چه میکند.
14
+
پشتیبان استاندارد ([`assets/apps_script/Code.gs`](../apps_script/Code.gs)) خودِ `Apps Script` کار `fetch` به مقصد را انجام میدهد. این نسخهٔ جایگزین، `Apps Script` را به یک رلهٔ نازک تبدیل میکند و کارِ اصلی را به لبهٔ `Cloudflare` میسپارد. **خود `mhrv-rs` تغییر نمیکند** — همان پاکت `JSON` روی سیم، همان `mode = "apps_script"` در `config.toml`، همان `script_id`. تنها تفاوت این است که `Apps Script` مستقر شدهٔ شما بعد از احراز هویت چه میکند.
15
15
16
16
ایدهٔ اصلی: <https://github.com/denuitt1/mhr-cfw>. این کپی یک بررسی `AUTH_KEY` روی خود `Worker` اضافه میکند، رفتار «صفحهٔ تقلبی برای کلید نامعتبر» را از `Code.gs` به ارث میبرد، و یک محافظ در برابر حلقهشدن دارد.
سه رشتهٔ همخوان نیاز دارید: یک `AUTH_KEY` که بین `worker.js`، `Code.cfw.gs` و `config.json` خود `mhrv-rs` مشترک است. یک رمز تصادفی قوی انتخاب کنید و در هر سه جا paste کنید.
36
+
سه رشتهٔ همخوان نیاز دارید: یک `AUTH_KEY` که بین `worker.js`، `Code.cfw.gs` و `config.toml` خود mhrv-rs مشترک است. یک رمز تصادفی قوی انتخاب کنید و در هر سه جا paste کنید.
تمام. `mhrv-rs` لازم نیست بداند `Cloudflare` در کار است؛ از نگاه او این `script_id` مثل هر `Deployment` دیگری رفتار میکند. اگر چند `Deployment` دارید (بعضی استاندارد، بعضی `CFW`)، میتوانید همه را در `script_ids: [...]` بگذارید — `round-robin` و `parallel-relay` همچنان روی همهشان کار میکند.
The standard backend (`assets/apps_script/Code.gs`) does the outbound fetch from inside Apps Script directly. This variant makes Apps Script a thin relay and pushes the actual fetch to Cloudflare's edge. **mhrv-rs itself is unchanged** — same JSON envelope on the wire, same `mode: "apps_script"` in `config.json`, same `script_id`. The only thing that's different is what your deployed Apps Script does after it authenticates the request.
12
+
The standard backend (`assets/apps_script/Code.gs`) does the outbound fetch from inside Apps Script directly. This variant makes Apps Script a thin relay and pushes the actual fetch to Cloudflare's edge. **mhrv-rs itself is unchanged** — same JSON envelope on the wire, same `mode = "apps_script"` in `config.toml`, same `script_id`. The only thing that's different is what your deployed Apps Script does after it authenticates the request.
13
13
14
14
Original idea: <https://github.com/denuitt1/mhr-cfw>. This copy adds an `AUTH_KEY` check on the Worker, the decoy-on-bad-auth treatment from `Code.gs`, and a hop-loop guard.
15
15
@@ -26,7 +26,7 @@ Original idea: <https://github.com/denuitt1/mhr-cfw>. This copy adds an `AUTH_KE
26
26
27
27
## Setup
28
28
29
-
You need three matching strings: an `AUTH_KEY` shared between `worker.js`, `Code.cfw.gs`, and your `mhrv-rs``config.json`. Pick a strong random secret once and paste it into all three.
29
+
You need three matching strings: an `AUTH_KEY` shared between `worker.js`, `Code.cfw.gs`, and your mhrv-rs `config.toml`. Pick a strong random secret once and paste it into all three.
30
30
31
31
### 1. Deploy the Worker
32
32
@@ -47,14 +47,13 @@ You need three matching strings: an `AUTH_KEY` shared between `worker.js`, `Code
47
47
48
48
### 3. Point mhrv-rs at the Apps Script
49
49
50
-
In `config.json` (or via the UI's config form):
50
+
In `config.toml` (or via the UI's config form):
51
51
52
-
```json
53
-
{
54
-
"mode": "apps_script",
55
-
"script_id": "PASTE_DEPLOYMENT_ID_HERE",
56
-
"auth_key": "SAME_SECRET_AS_BOTH_FILES_ABOVE"
57
-
}
52
+
```toml
53
+
[relay]
54
+
mode = "apps_script"
55
+
auth_key = "YOUR_SHARED_SECRET"
56
+
script_ids = ["YOUR_DEPLOYMENT_ID"]
58
57
```
59
58
60
59
That's it. mhrv-rs doesn't need to know Cloudflare exists; from its perspective, the `script_id` deployment behaves like any other. If you have multiple deployments (some plain, some CFW), `script_ids: [...]` round-robins across all of them and the parallel-relay fan-out still works.
0 commit comments