http-proxy

HTTP/1.1 reverse proxy on raw TCP sockets
GoTCPHTTP/1.1

A reverse proxy written in Go on raw TCP sockets, without Go's HTTP server, to learn how nginx works under the hood.

I wrote the HTTP/1.1 parser from scratch, including chunked encoding and hop-by-hop header stripping, and made it reject requests with ambiguous Content-Length and Transfer-Encoding headers to block request smuggling. Upstream connections are pooled with keep-alive and balanced round-robin across backends.