[GH-ISSUE #6715] [Feature]: Serve Xray JSON only for expired/depleted Happ subscriptions #4474

Open
opened 2026-10-31 20:39:55 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Fiksit on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6715

Yes.

In 3x-ui v3.8.5, the "Separate info config / dummy node" feature works well for showing an informational node when a subscription expires.

However, on mobile Happ (Android/iOS), when an expired subscription contains only the dummy SOCKS node in the normal raw/Base64 format, Happ may return "Unknown content type".

The workaround is to enable Xray JSON auto-detection for Happ using:

(?i)\bhapp\b

This makes the expired dummy node work, but then all active Happ subscriptions are also returned as JSON.

For active JSON servers in Happ, TCP ping may show N/A, while "Via Proxy (GET)" works normally and the servers themselves connect and work.

Describe the solution you'd like

Please add an option to return Xray JSON only when the subscription is expired or traffic-depleted, while keeping the normal raw/Base64 format for active subscriptions.

Desired behavior for Happ on the same subscription URL:

  • Active subscription -> raw/Base64
  • Expired subscription -> Xray JSON with the dummy/info node
  • Traffic depleted -> Xray JSON with the dummy/info node

A possible UI option could be:

Use JSON only for expired/depleted subscriptions

or

Auto-detect JSON only when expired/depleted

Alternatives you've considered

Currently I use JSON auto-detection for Happ with:

(?i)\bhapp\b

This fixes the expired dummy node on mobile Happ, but forces all active servers into JSON format.

Another workaround would be a custom build of 3x-ui that checks the subscription state before selecting JSON, but maintaining a custom binary after every update is inconvenient.

Concrete use case

I provide one subscription URL to users.

While the subscription is active, Happ should receive normal VLESS/Hysteria links so TCP ping and normal server handling work as usual.

When the subscription expires, the same URL should automatically return a JSON dummy node such as:

⛔ Subscription expired: {{EXPIRE_DATE}}

This allows the user to clearly see that the subscription has expired without changing the subscription URL.

Mockups, screenshots, or examples

Environment:

  • 3x-ui: v3.8.5
  • Happ Android: 4.6.x
  • Same behavior observed on iOS
  • JSON subscription enabled
  • JSON auto-detect enabled
  • Happ User-Agent regex: (?i)\bhapp\b

Which parts of the panel would this affect?

Subscription (share links / Clash / JSON)

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @Fiksit on GitHub (Oct 1, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6715 ### Is your feature request related to a problem? Yes. In 3x-ui v3.8.5, the "Separate info config / dummy node" feature works well for showing an informational node when a subscription expires. However, on mobile Happ (Android/iOS), when an expired subscription contains only the dummy SOCKS node in the normal raw/Base64 format, Happ may return "Unknown content type". The workaround is to enable Xray JSON auto-detection for Happ using: `(?i)\bhapp\b` This makes the expired dummy node work, but then all active Happ subscriptions are also returned as JSON. For active JSON servers in Happ, TCP ping may show N/A, while "Via Proxy (GET)" works normally and the servers themselves connect and work. ### Describe the solution you'd like Please add an option to return Xray JSON only when the subscription is expired or traffic-depleted, while keeping the normal raw/Base64 format for active subscriptions. Desired behavior for Happ on the same subscription URL: - Active subscription -> raw/Base64 - Expired subscription -> Xray JSON with the dummy/info node - Traffic depleted -> Xray JSON with the dummy/info node A possible UI option could be: `Use JSON only for expired/depleted subscriptions` or `Auto-detect JSON only when expired/depleted` ### Alternatives you've considered Currently I use JSON auto-detection for Happ with: `(?i)\bhapp\b` This fixes the expired dummy node on mobile Happ, but forces all active servers into JSON format. Another workaround would be a custom build of 3x-ui that checks the subscription state before selecting JSON, but maintaining a custom binary after every update is inconvenient. ### Concrete use case I provide one subscription URL to users. While the subscription is active, Happ should receive normal VLESS/Hysteria links so TCP ping and normal server handling work as usual. When the subscription expires, the same URL should automatically return a JSON dummy node such as: `⛔ Subscription expired: {{EXPIRE_DATE}}` This allows the user to clearly see that the subscription has expired without changing the subscription URL. ### Mockups, screenshots, or examples Environment: - 3x-ui: v3.8.5 - Happ Android: 4.6.x - Same behavior observed on iOS - JSON subscription enabled - JSON auto-detect enabled - Happ User-Agent regex: `(?i)\bhapp\b` ### Which parts of the panel would this affect? Subscription (share links / Clash / JSON) ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [ ] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
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#4474
No description provided.