I have an MQTTS client that cannot communicate (due to new company policies) directly with the cloud. I can only change some client settings via a webpage and do not have access to the server. For this reason, I thought of creating a kind of transparent proxy with just a couple of firewall rules for traffic redirection. The "proxy" works fine with MQTT but not with MQTTS.
With TLS, I am encountering a series of issues that I cannot decipher. Initially, I thought it was related to SNI: I resolved this problem by pointing the DNS resolution to the proxy’s IP instead of the one associated with the SNI. However, MQTTS still does not work because, from Wireshark traffic, I see an unjustified server-side closure. As a result, the client sends an Encrypted Alert, which I obviously cannot decipher. I then tried to simulate the client with MQTT.fx, but I received a fairly cryptic error message: "
INFO --- MqttFXClient: Broker disconnected: Broker connection is disconnected. Server closed connection without DISCONNECT."
What can I do?