Commit Graph

13 Commits

Author SHA1 Message Date
Laurence
146e7835eb fix(http): populate Request.TLS for private HTTPS via httpConnCtx
net/http only sets Request.TLS for *tls.Conn or conns implementing ConnectionState(). Our listener wrapped tls.Server in httpConnCtx with an embedded net.Conn, so TLS was never surfaced and r.TLS stayed nil. That triggered the HTTP→HTTPS permanent redirect on every request for HTTPS rules.

Add ConnectionState() on httpConnCtx delegating to the underlying TLS conn.
Add tests for TLS forwarding and plain TCP.
2026-05-08 15:17:31 +01:00
Owen
5090907307 Update status code 2026-04-30 15:55:52 -07:00
Owen
a6533b3fa0 Fix incorrect redirect logic 2026-04-29 21:11:07 -07:00
Laurence
8e19e475bf Support websocket upgrades in private HTTP proxy
Preserve optional ResponseWriter interfaces through statusCapture so httputil.ReverseProxy can hijack upgraded websocket connections. Add a regression test covering websocket traffic through the HTTP handler path.
2026-04-29 07:12:35 +01:00
Owen
23caf57bf4 Quiet message 2026-04-27 20:10:35 -07:00
Owen
bfd61ca511 Fix transport issue 2026-04-22 21:36:16 -07:00
Owen
294f99e024 Try to add redirect 2026-04-22 20:12:51 -07:00
Owen
26de268466 Add x-forwarded-for 2026-04-20 15:04:59 -07:00
Owen
12776d65c1 Add logging 2026-04-11 21:56:28 -07:00
Owen
342af9e42d Switch to scheme 2026-04-09 17:21:36 -04:00
Owen
092535441e Pass the new data down from the websocket 2026-04-09 16:13:19 -04:00
Owen
5848c8d4b4 Adjust to use data saved inside of the subnet rule 2026-04-09 16:04:11 -04:00
Owen
47c646bc33 Basic http is working 2026-04-09 11:43:26 -04:00