vert-x3/vertx-mqtt

does it support proxy_protocol of haproxy or nginx

Closed this issue · 4 comments

Does it support proxy_protocol of haproxy or nginx ?

can you elaborate your needs a little bit more please?

deploy several mqtt server after haproxy(or nginx), mqtt server cannot get the real client ip.
haproxy supports proxy_protocol and can transfer the real ip

It's not about MQTT server it's about MQTT 3.1.1 protocol. It's a protocol on top of TCP as well as PROXY protocol right and it's not supported by specification. An example of additional protocol supported in the MQTT world is about SASL for the authentication but it was added in the v5.0 (anyway not related to PROXY protocol but just for highlighting that it's about protocol).
Maybe the MQTT server could add this kind of support but it's not supported and tbh not on the roadmap but any community addition is always welcome.

vietj commented

@sdvdxl now it should support proxy protocol, since it is implemented in master. See https://vertx-web-site.github.io/docs/vertx-core/java/#_using_ha_proxy_protocol . Since MqttServerOptions extends NetServerOptions setting the setUseProxyProtocol boolean should work