Security
- X-Real-IP spoofing: Strip any client-supplied
X-Real-IPheader before processing so the upstream only ever sees the value wisegate computed. - Authorization leakage: When wisegate has performed authentication, the
Authorizationheader is now stripped before forwarding. Opt back in withCC_FORWARD_AUTH_HEADER=true(orAuthenticationProvider::forward_authorization_header()in the library) when the upstream genuinely needs the credentials. - IPv6 rate-limit bypass: Extracted IPs are canonicalised (RFC 5952), so
2001:0db8::1and2001:db8::1now key the same rate-limit bucket. Blocked/allowed IP lists are also matched on canonical form, so non-canonical IPv6 spellings in config still apply.
Added
wisegate_core::DefaultConfig: ready-to-use struct implementing every configuration trait with the same defaults as the CLI, so library users can drop wisegate-core in without trait boilerplate.- Startup warnings: warn when
CC_REVERSE_PROXY_IPScontains the bind sentinel0.0.0.0, and when wisegate listens on0.0.0.0with no auth and no IP blocklist (a common open-proxy misconfiguration). - Full env-var reference in
--help: every recognised variable is now listed, grouped by purpose (proxy security / filtering / rate limiting / authentication / proxy behaviour). CC_FORWARD_AUTH_HEADERenv var to opt into upstream Authorization forwarding.
Changed
- Library example: README and
wisegate-corecrate docs now showcase theDefaultConfigpath instead of the 5-trait implementation snippet. ConnectionTracker::track(): returnsimpl Dropinstead of the concreteConnectionGuard; binary callers only ever depended on the drop side anyway.- Doc:
request_handler::handle_requestrustdoc now spells out the Tokio runtime requirement, the permissive-mode header-trust caveat, and that strict mode requires bothX-Forwarded-ForandForwardedheaders (theby=field is what gets matched against the proxy allowlist).
Refactored
ip_filter: deduplicated the canonical-IP equality path into a privateips_matchhelper and dropped the deadis_valid_ip_formatwrapper.
Full Changelog: v0.11.0...v0.12.0