mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-17 10:35:02 +03:00
fix(sub): use standard sub://BASE64#REMARK scheme for Shadowrocket
This commit is contained in:
@@ -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}`;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user