OpenWRT / LEDE:Websockets 支持不适用于 mosquitto

OpenWRT / LEDE: Websockets support not available for mosquitto

我正在尝试 运行 mosquitto 配置:

listener 1884
listener 9001
protocol websockets

我得到一个错误:

Error: Websockets support not available.

我正在 运行ning mosquitto 版本 1.4.14,我还安装了 libwebsockets-full (2.4.1-2)。我以为我可以获得源代码并使用 confik.mk 中设置的 WITH_WEBSOCKETS:=yes 进行编译(在 中的一个答案中找到了解决方案)但是在我的路由器上我没有 enaugh space 安装 gcc ;)

我正在 运行 正在重启 LEDE(快照,r5392-bc50a97)。

关于如何在我的设备上为 mosquitto 启用 websockets 的任何想法?

如果预构建版本没有启用 websockets 并且您没有空间安装构建工具以在设备上重建它那么您唯一的选择是按照 openwrt 交叉编译instructions 并在另一台机器上构建它,然后将 binaries/package 复制到路由器。

最新的预构建版本支持 websockets。

opkg install mosquitto-ssl mosquitto-client-ssl libmosquitto-ssl

选择包的 -ssl 版本。现在您的配置将起作用。