mirror of
https://github.com/go-gost/core.git
synced 2026-10-19 16:16:17 +00:00
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.