3x-ui/sub
MHSanaei d843014461
refactor(backend): retire hysteria2 as a top-level protocol
Hysteria v2 is not a separate xray protocol — it is plain "hysteria"
with streamSettings.version = 2. The frontend already dropped hysteria2
from the protocol enum in 5a90f7e3; the backend was still carrying the
literal as a compat alias.

Removed:
- model.Hysteria2 constant
- model.IsHysteria helper (only callers were buildProxy + genHysteriaLink)
- TestIsHysteria
- "hysteria2" from the Inbound.Protocol validate oneof enum
- All `case model.Hysteria, model.Hysteria2:` and `case "hysteria",
  "hysteria2":` branches across client.go, inbound.go, outbound.go,
  xray.go, port_conflict.go, xray/api.go, subService.go,
  subJsonService.go, subClashService.go
- Stale #4081 comments

Kept (correctly — these are client-side URI/config schemes that are
independent of the xray protocol type):
- hysteria2:// share-link URI in subService.genHysteriaLink
- "hysteria2" Clash proxy type in subClashService.buildHysteriaProxy
- Comments referring to Hysteria v2 as a transport version

Note: this change does not include a DB migration. Existing rows with
protocol = 'hysteria2' will fall through to the default switch arms
after upgrade. A separate `UPDATE inbounds SET protocol = 'hysteria'
WHERE protocol = 'hysteria2'` is required for installs that still hold
legacy data.
2026-05-27 00:58:37 +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/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
links_test.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
sub.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
subClashService.go refactor(backend): retire hysteria2 as a top-level protocol 2026-05-27 00:58:37 +02:00
subClashService_test.go fix: address open bug reports (#4539, #4538, #4535, #4531, #4515) (#4545) 2026-05-25 00:08:06 +02:00
subController.go Frontend rewrite: React + TypeScript with AntD v6 (#4498) 2026-05-23 15:21:45 +02:00
subJsonService.go refactor(backend): retire hysteria2 as a top-level protocol 2026-05-27 00:58:37 +02:00
subService.go refactor(backend): retire hysteria2 as a top-level protocol 2026-05-27 00:58:37 +02:00
subService_test.go fix: address open bug reports (#4539, #4538, #4535, #4531, #4515) (#4545) 2026-05-25 00:08:06 +02:00