3x-ui/sub
biohazardous-man 97f88fb1a9
feat(sub): modern xray JSON format with unified finalmask editor (#4912)
* feat(sub): add finalmask support to JSON subscriptions

* feat(sub): modern xray JSON format with unified finalmask editor

Drop the legacy JSON subscription format entirely and always emit the
modern xray shape:

- Flatten proxy outbounds (no vnext/servers) for vless/vmess/trojan/
  shadowsocks; hysteria was already flat.
- Express fragment/noise via streamSettings.finalmask instead of the
  legacy direct_out freedom dialer + dialerProxy sockopt.

The global finalmask (tcp/udp masks + quicParams) is stored as a single
setting (subJsonFinalMask) and merged into every generated stream,
replacing the separate subJsonFragment/subJsonNoises/subJsonQuicParams
settings.

Reuse the existing FinalMaskForm (used by inbound/outbound) for the
settings UI via a small bridge component; add a showAll prop so all
TCP/UDP/QUIC sections render for the global case. This supersedes the
hand-rolled Fragment/Noises/quicParams tabs with the full mask editor
(all mask types).

Note: this is a breaking change — JSON subscriptions now require a
recent xray client on the consumer side.

* fix

---------

Co-authored-by: biohazardous-man <biohazardous-man@users.noreply.github.com>
Co-authored-by: MHSanaei <ho3ein.sanaei@gmail.com>
2026-06-04 23:51:48 +02:00
..
build_urls_test.go fix(sub): keep listen/bind IP out of subscription page URLs 2026-06-01 05:47:18 +02:00
default.json dokodemo-door, socks renamed to mixed, tunnel 2025-09-09 13:57:40 +02:00
dist.go feat(inbounds): add sub/client link endpoints; hide panel version on login 2026-05-11 15:03:47 +02:00
links.go feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
links_test.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
sub.go feat(sub): modern xray JSON format with unified finalmask editor (#4912) 2026-06-04 23:51:48 +02:00
subClashService.go feat(Clash): Add routing rules and enable routing option for Clash subscriptions (#4904) 2026-06-04 21:55:51 +02:00
subClashService_test.go fix(sub): ensure unique Clash proxy names (#4641) 2026-06-01 18:07:01 +02:00
subController.go feat(sub): modern xray JSON format with unified finalmask editor (#4912) 2026-06-04 23:51:48 +02:00
subJsonService.go feat(sub): modern xray JSON format with unified finalmask editor (#4912) 2026-06-04 23:51:48 +02:00
subJsonService_test.go feat(sub): modern xray JSON format with unified finalmask editor (#4912) 2026-06-04 23:51:48 +02:00
subService.go feat(inbounds): per-proxy Pinned Peer Cert SHA-256 + labeled External Proxy form 2026-06-03 13:46:54 +02:00
subService_test.go feat(inbounds): per-proxy Pinned Peer Cert SHA-256 + labeled External Proxy form 2026-06-03 13:46:54 +02:00
subService_userinfo_test.go fix(sub): source Userinfo total/expiry from client config in multi-node (#4645) 2026-06-01 21:27:50 +02:00