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
readme: explain the MITM CA step (local CA, private key stays local, how to revoke)
Users reasonably get nervous when an installer adds a root CA. Spell
out what the install actually does and does not do, in both the English
and Persian sections:
- CA keypair is generated locally in the user-data dir
- Only the public cert is added to the trust store
- Private key never leaves the machine; no network side is involved
- Clear revocation steps
- Manual CLI fallback if the launcher isn't wanted
- Firefox NSS note in case certutil best-effort misses
# Binaries: target/release/mhrv-rs and target/release/mhrv-rs-ui
97
97
```
98
98
99
-
### Step 3 — First run
99
+
### Step 3 — First run: install the MITM CA
100
100
101
-
The launcher handles the one-time CA install, then starts the UI:
101
+
To route your browser's HTTPS traffic through the Apps Script relay, `mhrv-rs` has to terminate TLS locally on your machine, forward the request through the relay, and re-encrypt the response with a certificate your browser trusts. That requires a small **local** Certificate Authority.
102
+
103
+
**What actually happens on first run:**
104
+
105
+
- A fresh CA keypair (`ca/ca.crt` + `ca/ca.key`) is generated **on your machine**, in your user-data dir.
106
+
- The public `ca.crt` is added to your system trust store so browsers accept the per-site certificates `mhrv-rs` mints on the fly. This is the step that needs sudo / Administrator.
107
+
- The private `ca.key`**never leaves your machine**. Nothing uploads it, nothing phones home, and no remote party — including the Apps Script relay — can use it to impersonate sites to you.
108
+
- You can revoke it at any time by deleting the CA from your OS keychain (macOS: Keychain Access → System → delete `mhrv-rs`) / Windows cert store / `/etc/ca-certificates`, and removing the `ca/` folder.
109
+
110
+
The launcher does all of this for you and then starts the UI:
102
111
103
112
| platform | how |
104
113
|---|---|
105
114
| macOS | double-click `run.command` in Finder (or `./run.command` in a terminal) |
106
115
| Linux |`./run.sh` from a terminal |
107
116
| Windows | double-click `run.bat`|
108
117
109
-
It will ask for your password (sudo / UAC) to add the MITM root to the system trust store. After that the CA is trusted and you can launch the UI directly next time.
118
+
It will ask for your password (sudo / UAC) **only** to trust the CA. After that the launcher also starts `mhrv-rs-ui`. On later runs you don't need the launcher — the CA is already trusted, so you can open `mhrv-rs.app` / `mhrv-rs-ui.exe` / `mhrv-rs-ui` directly.
119
+
120
+
If you prefer to do the CA step by hand:
121
+
122
+
```bash
123
+
# Linux / macOS
124
+
sudo ./mhrv-rs --install-cert
125
+
126
+
# Windows (Administrator)
127
+
mhrv-rs.exe --install-cert
128
+
```
129
+
130
+
Firefox keeps its own cert store; the installer also drops the CA into Firefox's NSS database via `certutil` (best-effort). If Firefox still complains, import `ca/ca.crt` manually via Settings → Privacy & Security → Certificates → View Certificates → Authorities → Import.
110
131
111
132
### Step 4 — Configure in the UI
112
133
@@ -291,13 +312,36 @@ Config و ریشهٔ MITM در پوشهٔ کاربر سیستمعامل قر
291
312
292
313
آرشیو پلتفرم خود را از [صفحهٔ releases](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/releases) بگیرید و extract کنید.
293
314
294
-
#### ۳. اجرای بار اول
315
+
#### ۳. اجرای بار اول: نصب گواهی MITM
316
+
317
+
برای اینکه ترافیک HTTPS مرورگر از طریق Apps Script رد شود، `mhrv-rs` باید TLS را **روی سیستم خودتان** باز کند، درخواست را از رله بفرستد، و پاسخ را با یک گواهی که مرورگر شما trust میکند دوباره رمزگذاری کند. این کار یک **Certificate Authority محلی** کوچک نیاز دارد.
318
+
319
+
**چه اتفاقی در اجرای بار اول میافتد:**
320
+
321
+
- یک keypair تازهٔ CA (`ca/ca.crt` + `ca/ca.key`) **روی سیستم شما** در پوشهٔ user-data ساخته میشود.
322
+
- فایل عمومی `ca.crt` به trust store سیستم اضافه میشود تا مرورگر گواهیهای per-site که `mhrv-rs` on-the-fly میسازد را بپذیرد. همین مرحله است که sudo / Administrator میخواهد.
323
+
- کلید خصوصی `ca.key`**هرگز از سیستم شما خارج نمیشود**. جایی آپلود نمیشود، با هیچ سرور راه دوری تماس گرفته نمیشود، و هیچ طرف دیگری — از جمله رلهٔ Apps Script — نمیتواند با آن خودش را جای سایتها جا بزند.
324
+
- هر وقت خواستید میتوانید حذفش کنید: keychain مک (Keychain Access → System → `mhrv-rs` را حذف کنید) / cert store ویندوز / `/etc/ca-certificates` در لینوکس، بهعلاوهٔ پاک کردن پوشهٔ `ca/`.
325
+
326
+
اسکریپت راهانداز همهٔ این کارها را برایتان انجام میدهد و بعد UI را باز میکند:
295
327
296
328
-**مک**: روی `run.command` دو بار کلیک کنید (یا از ترمینال `./run.command`).
297
329
-**لینوکس**: در ترمینال `./run.sh`.
298
330
-**ویندوز**: روی `run.bat` دو بار کلیک کنید.
299
331
300
-
اسکریپت رمز شما را میخواهد (sudo یا UAC) تا CA داخل trust store سیستم نصب شود. بعد از این کار UI باز میشود و در اجراهای بعدی میتوانید مستقیماً خود UI یا `mhrv-rs.app` را اجرا کنید.
332
+
اسکریپت **فقط** برای trust کردن CA رمز شما را میخواهد (sudo یا UAC). بعد از آن UI هم باز میشود، و در اجراهای بعدی دیگر لازم نیست از launcher استفاده کنید — مستقیماً `mhrv-rs.app` یا `mhrv-rs-ui.exe` یا `mhrv-rs-ui` را اجرا کنید.
333
+
334
+
اگر ترجیح میدهید مرحلهٔ CA را دستی انجام دهید:
335
+
336
+
```bash
337
+
# لینوکس/مک
338
+
sudo ./mhrv-rs --install-cert
339
+
340
+
# ویندوز (بهعنوان Administrator)
341
+
mhrv-rs.exe --install-cert
342
+
```
343
+
344
+
Firefox cert store خودش را جدا دارد؛ installer تلاش میکند از طریق `certutil` گواهی را داخل NSS فایرفاکس هم بیندازد (best-effort). اگر فایرفاکس هنوز شکایت کرد، خودتان دستی `ca/ca.crt` را از Settings → Privacy & Security → Certificates → View Certificates → Authorities → Import اضافه کنید.
0 commit comments