mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6756] [Feature]: Add Support for JSON subscription based Encrypted HAPP Link #4503
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4503
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @farid220 on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6756
Is your feature request related to a problem?
Hi,
It would be really great to have support for HAPP Encrypted Subscription links based on JSON subscriptions in 3x-ui.
As you may know, the method introduced by Patterniha is not fully supported through a standard share link, so a custom JSON subscription is required to properly define all the necessary values.
I run a small, non-commercial server used only by a few friends and relatives. With the recent internet blackouts, everyone has apparently become an expert in this field! 😄
Their modifications have caused many domains to be blacklisted so I have decided to use Encrypted Subs, Although I know it is possible to decipher, but it is enough to stop them from playing around.
I would like to use HAPP Encrypted Subscriptions, but currently it seems that only
v2ray://-based share links are supported, while JSON-based subscription links are not.Using the standard sub links does not appear to be an option either, since some of the required fields are not currently available.
Therefore, having the ability to generate encrypted HAPP subscription links directly from a JSON subscription would be extremely useful.
Thank you for considering this feature!
Describe the solution you'd like
Provide encrypted HAPP subscription links from a JSON subscription
Alternatives you've considered
No response
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
No response
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Oct 6, 2026):
This is a valid feature request: the panel's built-in Happ encrypted link (
happ://crypt5/...) only ever wraps the standard subscription URL. It cannot currently wrap the JSON subscription URL.How it works today
The Encrypted subscription links setting (
happLinkEnable, off by default) adds a Happ variant to the client QR code window. The link is built inHappService.currentSource(internal/web/service/happ.go:115-120), which reads onlysubURIand appends the client's subscription ID:The endpoint
POST /panel/api/clients/happLink/:id(internal/web/controller/client.go:60) takes no parameter for picking a format.subJsonURI/subJsonPathare never used there. So when Happ decrypts the link, it fetches the raw subscription path (gLink.GET(":subid", a.subs),internal/sub/controller.go:334) and not the JSON one (gJson.GET(":subid", a.subJsons), line 340). This has been the behaviour since the feature was introduced in6a5b4fab"feat(happ): generate Crypt5 subscription links locally (#6494)" (request #6381).What the request needs
To support this, the generator would have to accept a choice between the standard and the JSON subscription. For the JSON option it would use the
subJsonURIvalue already computed inGetDefaultSettings(internal/web/service/setting.go:1985-1986), and it should only be offered whensubJsonEnableis on. The QR modal would also need a way to choose between the two. The 8192-byte source limit (ErrHappSourceTooLong) would not be a problem, because only the URL is encrypted, not the JSON body.Until then, a manual workaround: enable the JSON subscription, copy the client's JSON subscription URL, and encrypt it with Happ's own crypt link tool outside the panel. I haven't verified that tool against this panel's output, so please test it with one client first.
Related: #6381 (the original request for Crypt5 generation, which covered only the standard subscription URL). I found no existing request for the JSON variant.
Verdict: Feature request
This reply was generated automatically; a maintainer may follow up.