fix(sub): use standard sub://BASE64#REMARK scheme for Shadowrocket
Some checks are pending
CI / go-test (push) Waiting to run
CI / govulncheck (push) Waiting to run
CI / frontend (push) Waiting to run
CodeQL Advanced / Analyze (go) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run

This commit is contained in:
MHSanaei 2026-05-19 17:21:52 +02:00
parent 1b436bb3e0
commit 9f80cfedab
No known key found for this signature in database
GPG key ID: 7E4060F2FBE5AB7A

View file

@ -125,7 +125,7 @@ const shadowrocketUrl = computed(() => {
if (!subUrl) return ''; if (!subUrl) return '';
const separator = subUrl.includes('?') ? '&' : '?'; const separator = subUrl.includes('?') ? '&' : '?';
const rawUrl = subUrl + separator + 'flag=shadowrocket'; const rawUrl = subUrl + separator + 'flag=shadowrocket';
const base64Url = encodeURIComponent(btoa(rawUrl)); const base64Url = btoa(rawUrl).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
const remark = encodeURIComponent(subTitle || sId || 'Subscription'); const remark = encodeURIComponent(subTitle || sId || 'Subscription');
return `shadowrocket://add/sub/${base64Url}?remark=${remark}`; return `shadowrocket://add/sub/${base64Url}?remark=${remark}`;
}); });