librespeed / speedtest-go

Go backend for LibreSpeed
GNU Lesser General Public License v3.0
706 stars 153 forks source link

Support Proxy Protocol #9

Closed mildis closed 3 years ago

mildis commented 3 years ago

ProxyProtocol is a light and fast way for an upstream reverse-proxy to talk to its downstream servers.
Plus, it properly adds client IP address.
Supporting ProxyProtocol could provide more accurate results and less error in the client IP address detection.

A GO implementation is available at https://github.com/pires/go-proxyproto

maddie commented 3 years ago

Can you provide a use-case for implementing proxy protocol in the backend? Which frontend is going to be sending the proxy protocol headers?

mildis commented 3 years ago

We are using haproxy, whose author is also the Proxy Protocol author.
AWS Network Load Balancer sends ProxyProtocol : users running librespeed-go backend in AWS would benefit this.

maddie commented 3 years ago

Implemented. Thanks for your suggestion.

maddie commented 3 years ago

Released under tag v1.1.0