Comments (5)
In case anyone finds this I have solved the problem. Node-red and the broker are on the same local network so I don't need to use a secure connection to the broker. By using something along the lines of the accepted solution to this post then I am able to access the broker locally using mqtt at port 1883 whilst still using wss for remote connections. Only ports 80 and 443 are forwarded to Traefik in my router.
Thanks for the help.
from ruby-mqtt.
It doesn't. What is the benefit of using websockets from outside the browser?
Maybe you could setup a proxy?
https://github.com/vi/websocat
from ruby-mqtt.
I am using Traefik with vernemq broker with internet access to the broker coming in on wss. Mostly for access from remote node-red systems and that is working well, Traefik handles wss ok. However I now need access from a Rails server.
I haven't had any success persuading Traefik to handle mqtt, and can't find any examples of anyone doing it, so I was hoping this gem would solve my problem.
from ruby-mqtt.
It looks like Traefik supports routing TCP + TLS + SNI, is that not sufficient?
from ruby-mqtt.
If I could make it go then yes. There are very few examples of Traefik tcp routers as opposed to http. I am sure it is doable that way, but not easy to get going unless you know the appropriate incantations, apparently, once you do it is not doubt trivial. I am sure I will eventually make that work, or find an alternative solution. I have node-red running on the same server as the Rails app, so I expect I can find a way of getting the data across to node-red and hence to MQTT.
from ruby-mqtt.
Related Issues (20)
- Unable to authenticate HOT 16
- Error OpenSSL alert unknown ca HOT 1
- MQTT client on weak CPU and high traffic environment
- background client
- SSL connection failing due to optimisations in PR #134 HOT 6
- I have renamed the 'master' branch to 'main'
- Drop support for ruby 1.9 HOT 2
- unable to establish QoS1 sessions
- Thread termination with exception not handled? HOT 7
- Release plan HOT 14
- Error: can't modify frozen OpenSSL::SSL::SSLContext HOT 1
- How to handle sigterm? HOT 2
- supporting private keys other than RSA
- Need help? HOT 1
- Remove autoload HOT 1
- Is using a connection Pool Recommended?
- Major issue while using Thread to catch exception
- ruby-mqtt-271ee631f128/lib/mqtt/packet.rb:223:in `read_byte': Failed to read byte from socket (MQTT::ProtocolException) HOT 2
- Support for MQTT 5 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-mqtt.