55 Commits
Author SHA1 Message Date
ginuerzh 832db16afd chain: add HTTP header rewrite settings and HostPattern for mirror routing
Add HTTPHeaderRewriteSettings (regex or plugin-based header rewrite rules)
and RewriteRequestHeader/RewriteResponseHeader fields to HTTPNodeSettings.

Generalize the static Host override into a two-part mechanism:
- HostPattern: regex matched against req.URL.Path whose submatches expand
  into the Host template ($1, $2, ...), restoring the upstream Host from
  an encoded path (e.g. /user.github.io/x -> Host user.github.io). It only
  affects the Host header, never the dial target or TLS SNI, so it targets
  Host-routed origins (GitHub Pages) rather than SNI-routed ones.
- Host: static value when HostPattern is nil; replacement template when set.
2026-08-29 08:37:28 +08:00
ginuerzh e59581b1d7 chain: add FailCodes to HTTPNodeSettings for status-based node fail marking 2026-07-25 14:36:40 +08:00
ginuerzh 35505104c4 chain: add ProbeTypeCmd constant and Command field to ProbeConfig 2026-07-16 17:21:56 +08:00
ginuerzh 3b64d634e2 chain: add node-level liveness probe types
Add ProbeType, ProbeConfig, ProbeResult, ProbeResultReader to core/chain.
Node gains probeResult (atomic.Value), probeCancel (context.CancelFunc),
ProbeResult(), SetProbeResult(), SetProbeCancel(), and Close() method.
2026-07-16 16:44:35 +08:00
ginuerzh 1d9cc3aabe add HTTP request body matching for routing and node selection
Add Body fields to routing.Request and hop.SelectOptions, plus
MatcherBodySize on NodeOptions so handlers can expose a size-capped
request body prefix to body matchers during node selection.
2026-07-03 17:20:18 +08:00
ginuerzh abb9fa00d6 add MaxChunkSize field to HTTPBodyRewriteSettings for bounded buffering of chunked non-streaming bodies 2026-06-30 10:59:33 +08:00
ginuerzh 271bb42fdf add Rewriter field to HTTPBodyRewriteSettings for plugin-based rewriting 2026-06-27 22:51:05 +08:00
ginuerzh 1f04d2e2ea docs(chain/node,observer/stats): fix doc comment formatting, clarify Stats.Reset, add RewriteRequestBody field 2026-05-31 19:32:16 +08:00
ginuerzh 3cdfea5740 Add English documentation comments to all core interfaces and types 2026-05-22 17:23:23 +08:00
ginuerzh d7256280da breaking change: add network param to Admission.Admit, add DialOption to Router.Dial
- Admission.Admit gains network parameter for network-aware access control
- Router.Dial gains variadic DialOption, matching Route.Dial and Router.Bind
- Fix typos: WithHostOption, ResolverNodeOption, ErrClosed message
- Add comprehensive README with architecture diagrams
2026-05-21 21:22:57 +08:00
ginuerzh cb35b34792 rename HTTPNodeSettings.Header to RequestHeader 2024-11-17 16:13:36 +08:00
ginuerzh c9850e3b30 add routing rule for node 2024-11-15 20:20:27 +08:00
ginuerzh b6d34322d3 add response header option for HTTP node settings 2024-11-07 11:01:45 +08:00
ginuerzh 0ae0c4d4c2 add alpn option for node tls config 2024-09-23 22:05:19 +08:00
ginuerzh 2697697552 add rewrite body http node setting 2024-07-19 20:42:33 +08:00
ginuerzh 48d070d345 add router interface 2024-07-08 22:28:21 +08:00
ginuerzh 4e831b95e8 fix timeout for router 2024-06-25 20:37:08 +08:00
ginuerzh 5aede9a2b3 add support for linux network namespace 2024-06-21 23:34:12 +08:00
ginuerzh 8d554ddcf7 add filter node option 2024-05-08 21:20:29 +08:00
ginuerzh a06608ccaf added http url rewrite setting for forwarder node 2024-01-31 23:17:24 +08:00
ginuerzh 04314fa084 added auther option for node http settings 2024-01-27 21:06:04 +08:00
ginuerzh 8e4fc06cf1 add more node options 2023-11-09 20:33:12 +08:00
ginuerzh 4525630abb add network for node 2023-10-09 21:26:41 +08:00
ginuerzh bf3b76a273 add network for bypass 2023-09-30 17:48:40 +08:00
ginuerzh b0bd45c1b8 move hop out of chain 2023-09-28 21:01:25 +08:00
ginuerzh 801f835e9a fix domain name resolution for router 2023-09-16 21:46:12 +08:00
ginuerzh a2115a3d38 add context for modules 2023-04-18 20:46:44 +08:00
ginuerzh f3482d7cd8 fix nil route panic 2023-01-31 18:05:36 +08:00
ginuerzh ff3b77ac28 add auther option for node 2023-01-31 13:37:58 +08:00
ginuerzh 1a643651c0 add new options for chain node 2023-01-29 20:45:13 +08:00
ginuerzh 8effb0b8b9 add protocol option for node 2022-11-30 10:47:27 +08:00
ginuerzh c2a1dd2a89 add vhost for node 2022-11-11 22:21:29 +08:00
ginuerzh 6e7a8f4619 mv metrics/service to x 2022-09-28 11:46:32 +08:00
ginuerzh 41ff9835a6 add chain hop 2022-09-20 11:48:30 +08:00
ginuerzh e7a104651a add dialer for connector 2022-09-08 22:39:17 +08:00
ginuerzh 99adf4bb06 update selector 2022-09-04 13:22:34 +08:00
ginuerzh 7136710673 add context for selector 2022-09-02 17:23:28 +08:00
ginuerzh 2835a5d44a add Route and Selector interfaces 2022-09-02 14:59:34 +08:00
ginuerzh 201edf2de5 add backup filter 2022-09-02 11:52:29 +08:00
ginuerzh b88ab3acdc add chain group 2022-09-02 10:54:42 +08:00
ginuerzh e77908a89e remove invalidFilter for selector 2022-08-31 10:09:31 +08:00
ginuerzh 04b4a79b80 add new funcs for NodeGroup 2022-08-25 21:33:41 +08:00
ginuerzh 81bf7b985a improve chain node bypass 2022-08-24 23:12:20 +08:00
ginuerzh ff51aef518 add some helper structs 2022-08-23 21:46:27 +08:00
ginuerzh 85e799802e fix default selector 2022-08-18 09:44:30 +08:00
ginuerzh 03988fee0b add recorder 2022-04-11 22:53:02 +08:00
ginuerzh a117222cde fix panic in router metrics 2022-04-08 21:17:22 +08:00
ginuerzh aeda8b11ca fix metrics 2022-04-07 23:01:35 +08:00
ginuerzh c2f49e9444 mv metrics to github.com/go-gost/x 2022-04-05 17:55:20 +08:00
ginuerzh d6e6efb093 add new metrics for chain node 2022-04-04 21:00:02 +08:00