From 1c11adc05b0709c288f52ec7cc13dd6e8cf3eb79 Mon Sep 17 00:00:00 2001 From: pofa10 Date: Fri, 16 Oct 2026 12:57:21 +0330 Subject: [PATCH 1/8] fix(bulk): expand encoded subscriptions pasted into the URL box The bulk URL box parses one line at a time. A pasted base64 subscription is a single line, so it reached parseProxyURLSingle(), whose base64 fallback recursed on the decoded body -- and new URL() strips line breaks, collapsing every config into the first one's remark. A 28-config subscription was enhanced as a single VLESS link ("bulk paste shows one link"). - pure.js: add expandBulkLines() so the URL box expands a whole-body, line-wrapped or per-line base64 body into its config lines first. - pure.js: guard parseProxyURLSingle() so a decoded value carrying more than one config line returns an error instead of silently merging (covers the Chain Builder and any other caller). - script.js: both URL boxes (ECH + Fragment) use expandBulkLines(). - tests: 8 new cases (expandBulkLines shapes + the parse guard). - README.md / README-fa.md: note the URL box accepts encoded subscriptions. Gates: node --check pure.js, node --check script.js, node --test tests/pure.test.js -> 163/163 pass. jsdom: the pasted 28-config blob now yields 28 enhanced URLs in both the ECH and Fragment URL boxes. --- README-fa.md | 6 ++-- README.md | 6 ++-- pure.js | 66 ++++++++++++++++++++++++++++++------- script.js | 6 ++-- tests/pure.test.js | 81 +++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 143 insertions(+), 22 deletions(-) diff --git a/README-fa.md b/README-fa.md index fe8ff72..1de512c 100644 --- a/README-fa.md +++ b/README-fa.md @@ -14,7 +14,7 @@ ### 🛡️ ECH