mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 13:14:11 +00:00
fix: align Desktop quick import with official Clash Verge Rev URL scheme to v1.8.0.8
This commit is contained in:
parent
605bdf1f96
commit
fdd00758fb
3 changed files with 26 additions and 2 deletions
|
|
@ -1 +1 @@
|
|||
v1.8.0.7
|
||||
v1.8.0.8
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
# Task Record
|
||||
|
||||
Date: 2026-04-27
|
||||
Related Module: web/html/user.html
|
||||
Change Type: Fix
|
||||
|
||||
## Background
|
||||
The Desktop quick import button used `clash-verge://install-config` with a `name` query parameter, but Clash Verge Rev official documentation only specifies `clash://install-config?url=<encoded_url>` with no `name` parameter. Additionally, the Clash Verge Rev `extract_subscription_url` function takes everything from `url=` to end of query string, causing corruption when extra params follow.
|
||||
|
||||
## Changes
|
||||
- `web/html/user.html`: Changed the Desktop quick import URL scheme from `clash-verge://install-config?name=...&url=...` to `clash://install-config?url=...`, matching the official Clash Verge Rev URL Schemes documentation exactly. Removed the undocumented `name` parameter.
|
||||
|
||||
## Impact
|
||||
- Only affects the Desktop (Clash Verge Rev) quick import button
|
||||
- No API, database, or build impact
|
||||
- Android (`clash://install-config`) and iOS (`shadowrocket://`) buttons unchanged
|
||||
|
||||
## Verification
|
||||
- `gofmt -l -w .` passed
|
||||
- `go vet ./...` passed
|
||||
- Official docs confirmed: https://www.clashverge.dev/guide/url_schemes.html specifies `clash://install-config?url=<URI编码后url>`
|
||||
|
||||
## Risks And Follow-Up
|
||||
- The removed `name` parameter means the imported profile in Clash Verge Rev will use the default name from the subscription response instead of the username; this can be restored if Clash Verge Rev fixes their URL parser
|
||||
|
|
@ -235,7 +235,7 @@
|
|||
this.$message.warning('{{ i18n "pages.user.noSubscription" }}');
|
||||
return;
|
||||
}
|
||||
window.location.href = 'clash-verge://install-config?name=' + encodeURIComponent(this.username || 'Subscription') + '&url=' + encodeURIComponent(url);
|
||||
window.location.href = 'clash://install-config?url=' + encodeURIComponent(url);
|
||||
},
|
||||
formatExpiryTime(timestamp) {
|
||||
if (timestamp <= 0) return '{{ i18n "unlimited" }}';
|
||||
|
|
|
|||
Loading…
Reference in a new issue