dotnet / MQTTnet

MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
MIT License
4.51k stars 1.07k forks source link

Proxy Protocol #1647

Open JTrotta opened 1 year ago

JTrotta commented 1 year ago

Describe the feature request

Would be very useful when using the server behind a reverse proxy. Now it's not possible to read the client endpoint

Which project is your feature request related to?

Describe the solution you'd like

I think we should implement Proxy Protocol as stated here: Proxy protocol documentation https://www.haproxy.com/blog/use-the-proxy-protocol-to-preserve-a-clients-ip-address/ https://github.com/haproxy/haproxy/blob/master/doc/proxy-protocol.txt

Describe alternatives you've considered

No alternatives are possible

Additional context

alberk8 commented 3 months ago

Would be very helpful to have Proxy Protocol support especially when the server is hosted behind a Reverse Proxy Server like traefik or Kubernetes.

Proxy Protocol Specs