更改 PHP 服务器上的默认 Mosquitto MQTT 端口
我正在 PHP 上运行 MQTT 服务器并使用 Android 来连接它。我面临的问题是,由于服务器限制,我无法获取为 MQTT 打开的默认端口 1883。仅开放常用端口(21、80、3306、8080)。是否有任何“黑客”可以让我将这些端口用于我的 MQTT?我尝试过端口 80、3306 和 8080,但不起作用。
I am running a MQTT server on PHP and using Android to connect to it. The problem I faced is that I am unable to get the default port 1883 opened for MQTT due to server restrictions. Only common ports (21, 80, 3306, 8080) are opened. Is there any 'hack' that will allow me to use these ports for my MQTT? I have tried ports 80, 3306 and 8080 but it doesn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,通常 1000 以上的端口无论如何都会受到特权和限制。当您调整代理设置以在不同端口上启动时会发生什么?您列出的这些端口是否已被其他应用程序打开?
从 MQTT 的角度来看,这只是在代理配置中设置端口号并启动代理的情况。我看不出还有什么可以帮助这里?
Well, typically the ports above 1000 are privileged and restricted anyway. What is happening when you adjust the broker settings to start on a different port? are those ports you list already opened by other applications?
From the perspective of MQTT it will just be a case of setting the port number in the broker configuration and starting the broker. I can't see what else can help here?