3x-ui/sub
MHSanaei 3df0ed2143
feat(clash): emit xhttp and httpupgrade transports in subscription (#4531)
applyTransport's switch only covered tcp/ws/grpc; xhttp and
httpupgrade inbounds fell through to the default branch and returned
false. buildProxy then returned a nil map and the inbound was dropped
from the Clash subscription. When the subscription only contained
xhttp/httpupgrade inbounds, the proxies list ended up empty and the
client saw a 404 (or an "Error!" body on older builds), then refused
to parse.

Add a case for each, mapping the inbound's stream settings onto the
Mihomo-format opts blocks:

  xhttp        -> xhttp-opts: { path, host, mode }
  httpupgrade  -> http-upgrade-opts: { path, headers: { Host } }

Host falls back to the headers map when the dedicated `host` field is
empty, matching the existing ws behavior.

Closes #4531
2026-05-24 23:23:49 +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 feat(clash): emit xhttp and httpupgrade transports in subscription (#4531) 2026-05-24 23:23:49 +02:00
subClashService_test.go feat(clash): emit xhttp and httpupgrade transports in subscription (#4531) 2026-05-24 23:23:49 +02:00
subController.go Frontend rewrite: React + TypeScript with AntD v6 (#4498) 2026-05-23 15:21:45 +02:00
subJsonService.go fix(expiry): show delayed-start countdown in subscribe and client info (#4535) 2026-05-24 23:15:44 +02:00
subService.go fix(expiry): show delayed-start countdown in subscribe and client info (#4535) 2026-05-24 23:15:44 +02:00
subService_test.go fix(expiry): show delayed-start countdown in subscribe and client info (#4535) 2026-05-24 23:15:44 +02:00