mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 20:54:14 +00:00
fix: shadowrocket url
This commit is contained in:
parent
37b35fc621
commit
f12535c1a1
2 changed files with 376 additions and 142 deletions
510
frontend/package-lock.json
generated
510
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -106,12 +106,10 @@ function linkName(link, idx) {
|
||||||
// client expects the sub URL in a slightly different param name.
|
// client expects the sub URL in a slightly different param name.
|
||||||
const shadowrocketUrl = computed(() => {
|
const shadowrocketUrl = computed(() => {
|
||||||
if (!subUrl) return '';
|
if (!subUrl) return '';
|
||||||
const separator = subUrl.includes('?') ? '&' : '?';
|
const remark = subTitle || sId || 'Subscription';
|
||||||
const rawUrl = subUrl + separator + 'flag=shadowrocket';
|
return `sub://${btoa(subUrl)}#${encodeURIComponent(remark)}`;
|
||||||
const base64Url = encodeURIComponent(btoa(rawUrl));
|
|
||||||
const remark = encodeURIComponent(subTitle || sId || 'Subscription');
|
|
||||||
return `shadowrocket://add/sub/${base64Url}?remark=${remark}`;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const v2boxUrl = computed(() => `v2box://install-sub?url=${encodeURIComponent(subUrl)}&name=${encodeURIComponent(sId)}`);
|
const v2boxUrl = computed(() => `v2box://install-sub?url=${encodeURIComponent(subUrl)}&name=${encodeURIComponent(sId)}`);
|
||||||
const streisandUrl = computed(() => `streisand://import/${encodeURIComponent(subUrl)}`);
|
const streisandUrl = computed(() => `streisand://import/${encodeURIComponent(subUrl)}`);
|
||||||
const v2raytunUrl = computed(() => subUrl);
|
const v2raytunUrl = computed(() => subUrl);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue