Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSS Server on ESP32 #59

Open
floolean opened this issue Dec 17, 2019 · 12 comments
Open

WSS Server on ESP32 #59

floolean opened this issue Dec 17, 2019 · 12 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects

Comments

@floolean
Copy link

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

@gilmaimon
Copy link
Owner

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.

@gilmaimon gilmaimon self-assigned this Dec 17, 2019
@gilmaimon gilmaimon added enhancement New feature or request help wanted Extra attention is needed labels Dec 17, 2019
@gilmaimon gilmaimon added this to To do in Features via automation Dec 17, 2019
@floolean
Copy link
Author

floolean commented Dec 18, 2019 via email

@gilmaimon
Copy link
Owner

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.

@gilmaimon gilmaimon added the good first issue Good for newcomers label Apr 21, 2020
@frippe75
Copy link

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 :-)

@kmindspark
Copy link

Exact same use case here. Would love to see support for hosting a WSS server.

@gb-123-git
Copy link

gb-123-git commented Dec 12, 2021

+1... Any plans to work on this ?

@skgadi
Copy link

skgadi commented Dec 13, 2021

+1 ... It will be very helpful

@anotherishi
Copy link

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 😊

@kelvin-jara
Copy link

+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

@jsondevers
Copy link

  • 1

@Snipeye
Copy link

Snipeye commented Jul 31, 2022

I'm also +1ing this (this feature would certainly pull me over to this library as opposed to others). Do you accept bribes? ;)

@meakashrao
Copy link

Has this been implemented? or are there any other libraries that have a secure webserver implementation using websockets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Features
  
To do
Development

No branches or pull requests