- Shell 66.2%
- Python 33.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Build and Release CODESYS App / create-release (push) Successful in 3s
|
||
| .forgejo/workflows | ||
| debian_build | ||
| .gitignore | ||
| LICENSE | ||
| NOTICE | ||
| README.md | ||
websocket-mosquitto
to support an hmi
TLDR;
Coming in a couple of commits.
To get this to do https on a private ip
On a public ip address this uses the Caddy ask api to get a certificate that matches the hostname of the machine. Simply make an A and or AAAA record that points to the public ip and start it with the hostname of the machine that this package is being installed on.
This approach won't work with a private ip. If you need caddy to make a self signed certificate, or if you have a tailnet, you can use this approach:
:80 {
# Redirect all unencrypted traffic to HTTPS
redir https://{host}{uri}
}
:443 {
# Provide the explicit paths to your Headscale/Tailscale certificates
tls /etc/caddy/certs/appliance.crt /etc/caddy/certs/appliance.key
# Serve your static frontend code securely
root * /var/www/html
file_server
# Secure proxying for Mosquitto WebSockets (wss://)
handle_path /mqtt {
reverse_proxy localhost:9001
}
}
I got the idea for this from an apache mod that I used back in the day. Turns out in 2026, it is much simpler. What I liked about the apache mod is that it got mosquitto in the same namespace as the web assets. One can do the ws(s) upgrade with a relative url. I preserved the history of the previous work as it was this relative url idea that I carried forward in 2026.