pires / go-proxyproto

A Go library implementation of the PROXY protocol, versions 1 and 2.
Apache License 2.0
488 stars 109 forks source link

Add an helper for proxied HTTP/2 #102

Closed emersion closed 1 year ago

emersion commented 1 year ago

The standard library's http.Server supports HTTP/2, but only for tls.Conn. This doesn't work when serving connections behind a reverse proxy which terminates TLS and uses the PROXY protocol.

Supporting this requires some glue code, which the new helper provides.

The example was tested with tlstunnel.

Closes: https://github.com/pires/go-proxyproto/issues/90

coveralls commented 1 year ago

Coverage Status

coverage: 95.017%. remained the same when pulling 5343f12c907a1531b8361b5c94a81bd3679d0011 on emersion:h2 into 864358a1e7a141febccde06762a1643bf872ff80 on pires:main.

emersion commented 1 year ago

Hopefully this addresses your comments. Let me know if something is still unclear.

pires commented 1 year ago

Thanks a ton, @emersion 🙇🏻