Repository navigation
fix(bulk): expand encoded subscriptions pasted into the URL box - #9
Merged
Hidden-Node merged 8 commits intoOct 17, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The bulk URL box ("Paste VLESS or Trojan URL(s)...") 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 -- andnew 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").The Subscription sub-tab decoder (
extractSubConfigs) already handled the blob correctly; this fixes the URL box path.Changes
pure.js: addexpandBulkLines()so the URL box expands a whole-body, line-wrapped or per-line base64 body into its config lines first.pure.js: guardparseProxyURLSingle()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) useexpandBulkLines().tests: 8 new cases (expandBulkLinesshapes + the parse guard).README.md/README-fa.md: note the URL box accepts encoded subscriptions.Verification
node --check pure.js,node --check script.js: cleannode --test tests/pure.test.js: 163/163 pass (was 155)