|
| 1 | +<!-- see docs/changelog/v1.1.0.md for the file format: Persian, then `---`, then English. --> |
| 2 | +• چکباکس **«Share with other devices on my Wi-Fi / network»** به UI دسکتاپ اضافه شد. بهجای اینکه کاربر `listen_host` را بهصورت دستی روی `0.0.0.0` تنظیم کند (که اکثر کاربران نمیدانستند)، حالا فقط یک چکباکس ساده روی فرم اصلی است. وقتی روشن میشود: |
| 3 | + - Bind بهطور خودکار به `0.0.0.0` تغییر میکند (تمام interfaceها) |
| 4 | + - IP محلی شبکهات با `detect_lan_ip()` تشخیص داده میشود (یک trick UDP `connect` که از kernel میپرسد source-IP outbound کدام است — هیچ ترافیک شبکهای واقعی فرستاده نمیشود) و در زیر چکباکس همراه با پورتها نمایش داده میشود تا بتوانی مستقیم به گوشی / لپتاپ مهمان بدهی: `Other devices: HTTP 192.168.x.y:8085 · SOCKS5 192.168.x.y:8086` |
| 5 | + - tooltip توضیح میدهد macOS اولین بار prompt firewall میاندازد |
| 6 | + - اگر کاربر از قبل یک bind IP خاص (مثلاً `192.168.1.50` یک NIC مشخص) در `config.json` نوشته باشد، چکباکس قفل میشود + برچسب «Custom bind: 192.168.1.50» نشان میدهد تا تنظیم دستی توسط Save بعدی پاک نشود. |
| 7 | + ماژول جدید `src/lan_utils.rs` با ۳ تست (تشخیص wildcard، تشخیص loopback، تست detect واقعی). |
| 8 | +• Code.gs / CodeFull.gs hardening + باگفیکس (هیچ تغییری در کانفیگ کاربر لازم نیست — فقط Code.gs خودتان را با [`assets/apps_script/Code.gs`](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/blob/main/assets/apps_script/Code.gs) (یا `CodeFull.gs` برای حالت full) جایگزین کنید + در Apps Script editor: `Manage deployments → ✏️ → Version: New version → Deploy`. Deployment ID همان قبلی میماند): |
| 9 | + - **`Code.gs` doGet تکراری حذف شد**: نسخهای که با `HtmlService.createHtmlOutput` تعریف شده بود بهخاطر hoisting جاوااسکریپت روی نسخهٔ صحیح `ContentService` overwrite میکرد. در نتیجه هر GET به URL deployment پاسخ سندباکس `goog.script.init` iframe برمیگرداند بهجای HTML پلیسهولدر ساده. |
| 10 | + - **`CodeFull.gs` `doGet` به `ContentService` تغییر کرد** (قبلاً `HtmlService` بود) — به همان دلیل بالا. |
| 11 | + - **هدرهای IP-leak در `SKIP_HEADERS` اضافه شد** (`X-Forwarded-For`, `X-Forwarded-Host`, `X-Forwarded-Proto`, `X-Forwarded-Port`, `X-Real-IP`, `Forwarded`, `Via`) — لایهٔ دفاع دوم به stripping سمت کلاینت v1.2.9 (#104). |
| 12 | + - **`_doBatch` دارای fallback شد**: اگر `UrlFetchApp.fetchAll()` بهعنوان یک کل throw کند، حالا برای متدهای امن (GET / HEAD / OPTIONS) per-item fetch میکند بهجای صفر کردن کل پاسخ batch. port از `masterking32/MasterHttpRelayVPN@3094288`. |
| 13 | +• `parse_relay_json` (سمت Rust): unwrapper برای `goog.script.init("...userHtml...")` اضافه شد — اگر هر deploymentای پاسخ HtmlService-wrapped برگرداند (legacy Code.gs قبل از v1.9.6، یا redirect که doGet را GET بزند)، client حالا JSON داخلی را استخراج میکند بهجای fail کردن با `key must be a string at line 2 column 1`. |
| 14 | +• README بازنویسی شد: نسخهٔ کوتاه دوزبانه (انگلیسی + فارسی RTL) برای کاربر معمولی + راهنمای کامل پیشرفته در [`docs/guide.md`](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/blob/main/docs/guide.md) و [`docs/guide.fa.md`](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/blob/main/docs/guide.fa.md). جدا کردن "راهاندازی ۵ دقیقهای" از "همهٔ گزینهها و troubleshooting" راهنما را خیلی قابلفهمتر کرد. در guide.fa.md task list با `[x]` با جدول جایگزین شد چون رندر RTL در GitHub با چکباکس مارکداون خراب میشد. |
| 15 | +• تست: ۶ regression test جدید (۳ برای unwrap goog.script.init + ۳ برای lan_utils). **۱۷۹ lib test + ۳۳ tunnel-node test همه pass.** |
| 16 | +--- |
| 17 | +• Added a **"Share with other devices on my Wi-Fi / network"** checkbox to the desktop UI. Instead of asking users to know they can set `listen_host` to `0.0.0.0` (which almost no one did), it's now a single checkbox on the main form. When enabled: |
| 18 | + - Bind address auto-flips to `0.0.0.0` (all interfaces) |
| 19 | + - Your LAN IP is detected via `detect_lan_ip()` (UDP `connect` trick — asks the kernel which source IP it would use for an outbound packet, no actual network traffic sent) and shown alongside the proxy ports so you can hand them to the guest device directly: `Other devices: HTTP 192.168.x.y:8085 · SOCKS5 192.168.x.y:8086` |
| 20 | + - Tooltip explains macOS will pop a Firewall prompt the first time |
| 21 | + - If you've already written a specific bind IP (e.g. `192.168.1.50` for one NIC) into `config.json`, the checkbox locks itself and shows a "Custom bind: 192.168.1.50" badge so the next Save can't clobber your manual setting. |
| 22 | + New `src/lan_utils.rs` module with 3 unit tests (wildcard detection, loopback detection, live detect smoke). |
| 23 | +• Code.gs / CodeFull.gs hardening + bug fixes (no client config change needed — just replace your own Code.gs with [`assets/apps_script/Code.gs`](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/blob/main/assets/apps_script/Code.gs) (or `CodeFull.gs` for full mode) and in the Apps Script editor: `Manage deployments → ✏️ → Version: New version → Deploy`. Your Deployment ID stays the same): |
| 24 | + - **Removed duplicate `doGet` in `Code.gs`**: a second copy declared with `HtmlService.createHtmlOutput` was silently overriding the correct `ContentService` one due to JS function hoisting. Result: every GET to the deployment URL was returning the `goog.script.init` sandbox iframe instead of the simple placeholder HTML. |
| 25 | + - **`CodeFull.gs` `doGet` switched to `ContentService`** (was `HtmlService`) — same reason as above. |
| 26 | + - **Added IP-leak headers to `SKIP_HEADERS`** (`X-Forwarded-For`, `X-Forwarded-Host`, `X-Forwarded-Proto`, `X-Forwarded-Port`, `X-Real-IP`, `Forwarded`, `Via`) — second line of defense to v1.2.9's client-side stripping (#104). |
| 27 | + - **`_doBatch` got a fallback path**: if `UrlFetchApp.fetchAll()` throws as a whole, it now per-item-fetches safe methods (GET / HEAD / OPTIONS) instead of zeroing the entire batch's responses. Ported from `masterking32/MasterHttpRelayVPN@3094288`. |
| 28 | +• `parse_relay_json` (Rust client): added unwrapper for `goog.script.init("...userHtml...")` iframe — if any deployment ever returns an HtmlService-wrapped response (legacy Code.gs, or a redirect that GET-hits doGet), the client now extracts the inner JSON instead of failing with `key must be a string at line 2 column 1`. |
| 29 | +• Rewrote the README: short bilingual landing page (English + Persian RTL) for normal users, with the full advanced reference moved to [`docs/guide.md`](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/blob/main/docs/guide.md) and [`docs/guide.fa.md`](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/blob/main/docs/guide.fa.md). Splitting "5-minute quick start" from "every option + troubleshooting" makes the docs much more approachable. In guide.fa.md the `[x]` task list was replaced with a table because GitHub's RTL renderer mangled the checkbox positions inside `<div dir="rtl">`. |
| 30 | +• Tests: 6 new regression tests (3 for goog.script.init unwrap + 3 for lan_utils). **179 lib tests + 33 tunnel-node tests all passing.** |
0 commit comments