[PR #4441] [CLOSED] chore: Fix/shadowrocket remarks #5694

Closed
opened 2026-11-02 04:03:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/4441
Author: @harryngne
Created: 5/16/2026
Status: ❌ Closed

Base: main ← Head: fix/shadowrocket-url


📝 Commits (3)

  • 37b35fc chore: fix remarks shadowrocket subscription
  • f12535c fix: shadowrocket url
  • 93aa44f Merge branch 'main' into fix/shadowrocket-url

📊 Changes

1 file changed (+5 additions, -0 deletions)

View changed files

📝 frontend/src/pages/sub/SubPage.vue (+5 -0)

📄 Description

What is the pull request?

Fix Shadowrocket subscription import that was broken by #4247.

Commit 9f06bff changed the Shadowrocket deep link from the standard
sub://BASE64 scheme to a non-standard shadowrocket://add/sub/?remark=
format in an attempt to add a remark. This broke import on Shadowrocket because:

  1. shadowrocket://add/ is the deep-link format for single nodes
    (vmess://, vless://, etc.), not subscriptions. The correct subscription
    scheme is sub://BASE64(url).
  2. encodeURIComponent(btoa(...)) percent-encodes the base64 payload, so
    when Shadowrocket decodes it, the result contains % characters and
    parses incorrectly.
  3. ?remark= placed after a path segment containing base64 (which may
    contain +, /, =) creates ambiguous boundaries for URL parsers.
  4. flag=shadowrocket is not a standard xray/v2ray subscription parameter.

Fix

Revert to the standard sub://BASE64#REMARK scheme. The URL fragment (#)
is the documented way to attach a remark to a Shadowrocket subscription and
works on all Shadowrocket versions.

const shadowrocketUrl = computed(() => {
  if (!subUrl) return '';
  const remark = subTitle  sId  'Subscription';
  return sub://${btoa(subUrl)}#${encodeURIComponent(remark)};
});

## What is the pull request?

Fix Shadowrocket subscription import that was broken by #4247.

Commit 9f06bff changed the Shadowrocket deep link from the standard 
sub://BASE64 scheme to a non-standard shadowrocket://add/sub/<base64>?remark=<x> 
format in an attempt to add a remark. This broke import on Shadowrocket because:

1. shadowrocket://add/<scheme> is the deep-link format for single nodes 
   (vmess://, vless://, etc.), not subscriptions. The correct subscription 
   scheme is sub://BASE64(url).
2. encodeURIComponent(btoa(...)) percent-encodes the base64 payload, so 
   when Shadowrocket decodes it, the result contains % characters and 
   parses incorrectly.
3. ?remark= placed after a path segment containing base64 (which may 
   contain +, /, `=`) creates ambiguous boundaries for URL parsers.
4. flag=shadowrocket is not a standard xray/v2ray subscription parameter.

### Fix

Revert to the standard sub://BASE64#REMARK scheme. The URL fragment (`#`) 
is the documented way to attach a remark to a Shadowrocket subscription and 
works on all Shadowrocket versions.

```js
const shadowrocketUrl = computed(() => {
  if (!subUrl) return '';
  const remark = subTitle  sId  'Subscription';
  return sub://${btoa(subUrl)}#${encodeURIComponent(remark)};
});

work wells now bro!

---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/4441 **Author:** [@harryngne](https://github.com/harryngne) **Created:** 5/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/shadowrocket-url` --- ### 📝 Commits (3) - [`37b35fc`](https://github.com/MHSanaei/3x-ui/commit/37b35fc621bfa2154528609fee8d5e5b6a9015ca) chore: fix remarks shadowrocket subscription - [`f12535c`](https://github.com/MHSanaei/3x-ui/commit/f12535c1a100f441ce94bf4b9a4dfa949f15b767) fix: shadowrocket url - [`93aa44f`](https://github.com/MHSanaei/3x-ui/commit/93aa44f440c797e10d596ad0d6c52b0c05e2ef17) Merge branch 'main' into fix/shadowrocket-url ### 📊 Changes **1 file changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/pages/sub/SubPage.vue` (+5 -0) </details> ### 📄 Description ## What is the pull request? Fix Shadowrocket subscription import that was broken by #4247. Commit 9f06bff changed the Shadowrocket deep link from the standard sub://BASE64 scheme to a non-standard shadowrocket://add/sub/<base64>?remark=<x> format in an attempt to add a remark. This broke import on Shadowrocket because: 1. shadowrocket://add/<scheme> is the deep-link format for single nodes (vmess://, vless://, etc.), not subscriptions. The correct subscription scheme is sub://BASE64(url). 2. encodeURIComponent(btoa(...)) percent-encodes the base64 payload, so when Shadowrocket decodes it, the result contains % characters and parses incorrectly. 3. ?remark= placed after a path segment containing base64 (which may contain +, /, `=`) creates ambiguous boundaries for URL parsers. 4. flag=shadowrocket is not a standard xray/v2ray subscription parameter. ### Fix Revert to the standard sub://BASE64#REMARK scheme. The URL fragment (`#`) is the documented way to attach a remark to a Shadowrocket subscription and works on all Shadowrocket versions. ```js const shadowrocketUrl = computed(() => { if (!subUrl) return ''; const remark = subTitle sId 'Subscription'; return sub://${btoa(subUrl)}#${encodeURIComponent(remark)}; }); ## What is the pull request? Fix Shadowrocket subscription import that was broken by #4247. Commit 9f06bff changed the Shadowrocket deep link from the standard sub://BASE64 scheme to a non-standard shadowrocket://add/sub/<base64>?remark=<x> format in an attempt to add a remark. This broke import on Shadowrocket because: 1. shadowrocket://add/<scheme> is the deep-link format for single nodes (vmess://, vless://, etc.), not subscriptions. The correct subscription scheme is sub://BASE64(url). 2. encodeURIComponent(btoa(...)) percent-encodes the base64 payload, so when Shadowrocket decodes it, the result contains % characters and parses incorrectly. 3. ?remark= placed after a path segment containing base64 (which may contain +, /, `=`) creates ambiguous boundaries for URL parsers. 4. flag=shadowrocket is not a standard xray/v2ray subscription parameter. ### Fix Revert to the standard sub://BASE64#REMARK scheme. The URL fragment (`#`) is the documented way to attach a remark to a Shadowrocket subscription and works on all Shadowrocket versions. ```js const shadowrocketUrl = computed(() => { if (!subUrl) return ''; const remark = subTitle sId 'Subscription'; return sub://${btoa(subUrl)}#${encodeURIComponent(remark)}; }); work wells now bro! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:03:24 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5694
No description provided.