19 Commits
Author SHA1 Message Date
ginuerzh c5c8f0903c feat(mux): make mux layer pluggable and add Yamux backend
Convert the concrete *mux.Session into a mux.Session interface backed by
smux and yamux, selected via the `mux.type` metadata key. Empty/unspecified
defaults to "smux", so existing deployments are unchanged. Yamux's stream
window is exposed via `mux.maxStreamWindow`.

Also fix TestHandler_observeStats: the retry_after_observer_error subtest
hung because stats.Events() drains (IsUpdated is Swap(false)) and no fresh
event was generated for the recovery tick's fall-through flush. Inject a real
client2 event so the recovery tick has new data to flush.

Plan: docs/plans/2026-07-13-mux-pluggable-yamux.md
2026-07-13 23:12:27 +08:00
ginuerzh a1fddedcc3 fix(handler/relay): remove remaining Chinese comments missed in conversion
Clean up 12 inline comments across bind.go, conn.go, connect.go,
entrypoint.go, handler.go that were still in Chinese.
2026-06-03 23:09:04 +08:00
ginuerzh d5fd62aa47 docs(handler/relay): convert all comments to English
Translate all Chinese comments in the relay handler package to English:
handler.go, connect.go, bind.go, forward.go, conn.go, entrypoint.go,
observe.go, metadata.go. All inline and doc comments are now in English.

Also set a persistent preference: all future code comments must be
written in English only.
2026-06-03 23:05:08 +08:00
ginuerzh c7d16962ec add service option for plugin 2025-08-29 23:36:31 +08:00
ginuerzh 208d18125c replace xnet.Transport by xnet.Pipe 2025-07-28 20:52:15 +08:00
ginuerzh 31c482c649 add scope param for traffic limiter 2024-08-31 09:30:04 +08:00
ginuerzh 9584bdbf4c rm tunnel from relay 2023-11-14 22:35:46 +08:00
ginuerzh 1759c95e78 add mux config 2023-10-17 21:55:07 +08:00
ginuerzh bf5311ddc3 fix http handler for tunnel 2023-10-16 23:53:58 +08:00
ginuerzh 6a36ebcc9f add proxy protocol support for relay tunnel and rtcp 2023-10-08 19:49:03 +08:00
ginuerzh 32c8188351 add plugin system 2023-04-18 20:52:56 +08:00
ginuerzh 7576651a67 add client label for metrics 2023-04-14 18:51:34 +08:00
ginuerzh b8027864a3 relay: fix routing for http traffic from entrypoint 2023-02-12 20:42:46 +08:00
ginuerzh 6f9f5ce6ab relay: add direct routing for tunnel 2023-02-06 21:16:56 +08:00
ginuerzh e2d5d50b4b relay: use service for rtcp bind handler 2023-02-04 18:38:21 +08:00
ginuerzh 416405b1f0 add UDP support for reverse proxy tunnel 2023-02-02 19:18:10 +08:00
ginuerzh 1c6bc9283e forward non-HTTP traffic based on host 2023-01-30 21:09:21 +08:00
ginuerzh 24037aba7b relay: added private tunnel 2023-01-29 11:55:26 +08:00
ginuerzh 82cd924c86 add tunnel feature for relay 2023-01-14 13:15:15 +08:00