ArduinoWebsockets
ArduinoWebsockets copied to clipboard
WSS Server on ESP32
Hi there, first, thank you for doing this, it seems a solid library to me.
My question: I didn’t see any examples of a secured websocket server for esp32 or any other, did I miss something or isnt there a way yet?
Thank you
Hi, thank you for opening the issue.
There is no support for that currently, no one has ever requested it before so it wasn't on my backlog.
As the library gets more popular I assume more people will come here looking for this feature. I'll add it to the backlog, but it might take a while until I actually get to work on it.
Depending on the public need for this feature, I might prioritize it over other stuff I need to do..
Gil.
Hey Gil,
thank you for the quick reply. Do you happen to know where to start implementing this feature?
Cheers
schonetech fon: +49 152 3362 0669 fax: +49 321 2144 8745 web: www.schonetech.com e-mail: [email protected]
Am 17.12.2019 um 10:51 schrieb Gil Maimon [email protected]:
Hi, thank you for opening the issue.
There is no support for that currently, no one has ever requested it before so it wasn't on my backlog.
As the library gets more popular I assume more people will come here looking for this feature. I'll add it to the backlog, but it might take a while until I actually get to work on it.
Depending on the public need for this feature, I might prioritize it over other stuff I need to do..
Gil.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Sorry for the delay.
If you want to work on this feature, I recommand lookin at how the library handles secure vs non secure clients. See this for configuration and look here for client and server tcp wrappers.
How I would go about doing this:
- Create a SecuredEsp32TcpServer and SecuredEsp8266TcpServer, it will be a good idea to create a base class that inherits from TcpServer but adds some secure functions that both esp8266 and esp32 supports. In secure clients for example. the esp8266 and esp32 interface is very simmilar so I created a class that gets the WiFiClient type as template and as such I avoided some code duplication
- After you have the classes implemented you will want to add them to the configuration so you will have some macro that defines the current secured tcp server type no matter what platform the code is compiling for
- Then you will want to modify the websockets server code to have secure functions (like set certificates and such) and handle clients appropriatly. This is just one way off the top of my head to implement this. It is open for discussion and contribution.
Thank you, Gil.
I'm unfortunately unqualified to get started on this but think it's really important to get it implemented since any PWA would require wss to function. Progressive Web Apps require https when serving them and any subsequent websocket connect is enforced by the browser to be secure. Writing one as we speak and I'm really eager to move forward :-)
Exact same use case here. Would love to see support for hosting a WSS server.
+1... Any plans to work on this ?
+1 ... It will be very helpful
Yes @frippe75, and the sensors API (for accessing gyro, accelerometer, etc) also requires https/wss for serving. It would be so great if these features are implemented. Btw Thanks 😊
+1 ... It will be very helpful! very help helpful! I need stream video over wss. My work around for now is to create https nodejs server that support wss server to use it as a bridge. But it would be much better if wss is implemented directly to the esp32
- 1
I'm also +1ing this (this feature would certainly pull me over to this library as opposed to others). Do you accept bribes? ;)
Has this been implemented? or are there any other libraries that have a secure webserver implementation using websockets?