mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
- Android: clash://install-config (Clash Meta for Android) - iOS: shadowrocket://add/sub/ (Shadowrocket) - Desktop: clash-verge://install-config (Clash Verge) - Extended API to return subEnable/subUrl for standard subscription
1.3 KiB
1.3 KiB
2026-04-25 — User Panel: Quick Import URL Schemes
Summary
Wired up the 3 Quick Import dropdown buttons (Android/iOS/Desktop) with deep link URL schemes to launch proxy client apps directly from the user panel.
Changes
Backend (web/controller/inbound.go)
- Extended
getUserSubscriptionsAPI to also returnsubEnableandsubUrl(standard subscription URL) - Previously only returned
subClashEnableandsubClashUrl
Frontend (web/html/user.html)
- Added
subEnableandsubUrldata fields - Updated
loadSubscriptions()to save the new fields - Added 3 URL scheme methods:
- Android →
clash://install-config?url=<encoded_url>(Clash Meta for Android) - iOS →
shadowrocket://add/sub/<base64_url>?remark=<name>(Shadowrocket) - Desktop →
clash-verge://install-config?url=<encoded_url>&name=<name>(Clash Verge)
- Android →
- Added
@clickhandlers on the 3 dropdown menu items - Each method validates subscription availability before opening the URL scheme
URL Scheme Priority
- Android/Desktop: prefers Clash URL (
subClashUrl), falls back to standard URL (subUrl) - iOS (Shadowrocket): prefers standard URL (
subUrl), falls back to Clash URL
Files Modified
web/controller/inbound.go— extended API response with subEnable/subUrlweb/html/user.html— added URL scheme methods and click handlers