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

Support for TLS / wss:// #4

Open
ajlennon opened this issue Apr 26, 2024 · 3 comments
Open

Support for TLS / wss:// #4

ajlennon opened this issue Apr 26, 2024 · 3 comments

Comments

@ajlennon
Copy link
Contributor

Hi @USAMAWIZARD

We want to be able to support secure comms. for A/V streams and it looks like the librws only supports basic websockets (might be wrong here). If so then I might want to have a look at using some other websockets library that would allow us to use secure websockets. And obviously would want to contribute this back to the example here.

So I'm just asking - can this example already support secure websockets or what would you advise as the best route for me to add this in?

Thanks!

Alex

@USAMAWIZARD
Copy link
Owner

USAMAWIZARD commented Apr 27, 2024

Hi @ajlennon ,
Yes you are correct , when I was looking for a websocket library to implement this project I saw this library ( librws ) which is cross os compatible and supports different CPUs so decided to go with it but after the implementation I found out that the library does not support WSS , I had planed to migrate it to a different library ( libsoup ) ( which is more mature and supports both wss and ws ) , libsoup would be good to migrate in this case or let me know if you find any other library.

note
the WebRTC connection is secure by default because it used DTLS for the communication. web socket part is insecure which is used to communicate the SDP information. ( so the audio video is encrypted and SDP which contains information like IP supported encoding etc... is exposed over network when using ws but the actual audio video is encrypted )

@ajlennon
Copy link
Contributor Author

That is really helpful thanks @USAMAWIZARD. So I've been looking at libwebsockets as it's in OpenIPC and seems fairly standard but it looks really pretty complicated. I'll go and have a look at libsoup then!

Also the info about DTLS versus websockets is really good to know too thanks

@ajlennon
Copy link
Contributor Author

I like the look of this. Seems more straightforward than libwebsockets and I like that it is based on glib so should integrate nicely with gstreamer

https://github.com/david7482/libsoup_websocket_client/blob/master/websocket_client.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants