Skip to content

v0.12.0

Latest

Choose a tag to compare

@davlgd davlgd released this 13 May 15:09

Security

  • X-Real-IP spoofing: Strip any client-supplied X-Real-IP header before processing so the upstream only ever sees the value wisegate computed.
  • Authorization leakage: When wisegate has performed authentication, the Authorization header is now stripped before forwarding. Opt back in with CC_FORWARD_AUTH_HEADER=true (or AuthenticationProvider::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::1 and 2001:db8::1 now 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_IPS contains the bind sentinel 0.0.0.0, and when wisegate listens on 0.0.0.0 with 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_HEADER env var to opt into upstream Authorization forwarding.

Changed

  • Library example: README and wisegate-core crate docs now showcase the DefaultConfig path instead of the 5-trait implementation snippet.
  • ConnectionTracker::track(): returns impl Drop instead of the concrete ConnectionGuard; binary callers only ever depended on the drop side anyway.
  • Doc: request_handler::handle_request rustdoc now spells out the Tokio runtime requirement, the permissive-mode header-trust caveat, and that strict mode requires both X-Forwarded-For and Forwarded headers (the by= field is what gets matched against the proxy allowlist).

Refactored

  • ip_filter: deduplicated the canonical-IP equality path into a private ips_match helper and dropped the dead is_valid_ip_format wrapper.

Full Changelog: v0.11.0...v0.12.0