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

Client-side secure websockets (wss) would be really useful #41

Open
PaulJohnson opened this Issue Apr 23, 2013 · 13 comments

Comments

Projects
None yet
9 participants
@PaulJohnson

Hi,

I want to interface to financial services using websockets, but obviously I don't want to do it over unsecured connections. Can I ask for client side wss support please?

This is a great library, exactly what I was looking for, until I ran into this problem.

@gertcuykens

This comment has been minimized.

Show comment
Hide comment
@gertcuykens

gertcuykens Apr 23, 2013

Contributor

I think you can put a tls implementation in between like https://github.com/vincenthz/hs-tls? But I don't have a example directly. For the server side I did use for example stunnel, I guess for client side it must be trival too but I did not try it myself, so I could be wrong.

Contributor

gertcuykens commented Apr 23, 2013

I think you can put a tls implementation in between like https://github.com/vincenthz/hs-tls? But I don't have a example directly. For the server side I did use for example stunnel, I guess for client side it must be trival too but I did not try it myself, so I could be wrong.

@jaspervdj

This comment has been minimized.

Show comment
Hide comment
@jaspervdj

jaspervdj Apr 28, 2013

Owner

Just a heads up -- I currently don't have time to patch this myself since my Msc. thesis has my entangled. I plan to port websockets to use io-streams after that, and that should facilitate this issue.

Owner

jaspervdj commented Apr 28, 2013

Just a heads up -- I currently don't have time to patch this myself since my Msc. thesis has my entangled. I plan to port websockets to use io-streams after that, and that should facilitate this issue.

@markus1189

This comment has been minimized.

Show comment
Hide comment
@markus1189

markus1189 Aug 14, 2014

Any updates or plans for this feature? I wanted to use websockets with a service that requires client site wss support...

Any updates or plans for this feature? I wanted to use websockets with a service that requires client site wss support...

@jaspervdj

This comment has been minimized.

Show comment
Hide comment
@jaspervdj

jaspervdj Aug 15, 2014

Owner

There's no utility function (yet) to do this, but there is nothing wrong with just running the connection over an SSL socket manually:
https://gist.github.com/jaspervdj/7198388

Owner

jaspervdj commented Aug 15, 2014

There's no utility function (yet) to do this, but there is nothing wrong with just running the connection over an SSL socket manually:
https://gist.github.com/jaspervdj/7198388

@markus1189

This comment has been minimized.

Show comment
Hide comment
@markus1189

markus1189 Aug 16, 2014

Thanks for the example, I got it working ;)

Thanks for the example, I got it working ;)

@mpickering

This comment has been minimized.

Show comment
Hide comment
@mpickering

mpickering Dec 23, 2014

Here's the updated code for anyone else coming across this.

https://gist.github.com/mpickering/f1b7ba3190a4bb5884f3

Here's the updated code for anyone else coming across this.

https://gist.github.com/mpickering/f1b7ba3190a4bb5884f3

@leonbaum

This comment has been minimized.

Show comment
Hide comment
@leonbaum

leonbaum Feb 3, 2015

+1 for this. I spent a hour trying to get the "tls" package to play nicely with websockets, gave up, and finally found the OpenSSL example here.

leonbaum commented Feb 3, 2015

+1 for this. I spent a hour trying to get the "tls" package to play nicely with websockets, gave up, and finally found the OpenSSL example here.

@elfenlaid

This comment has been minimized.

Show comment
Hide comment
@elfenlaid

elfenlaid Mar 19, 2015

Here's adopted example for connection package, which is wrapper over tls.

https://gist.github.com/elfenlaid/7b5c28065e67e4cf0767

Here's adopted example for connection package, which is wrapper over tls.

https://gist.github.com/elfenlaid/7b5c28065e67e4cf0767

@tfausak

This comment has been minimized.

Show comment
Hide comment
@tfausak

tfausak Apr 14, 2015

👍 Thank you for that example, @elfenlaid! I cleaned up bits of it and ended up with my own Gist. It defines a runSecureClient function that handles all the boilerplate. What would it take to get this capability into this package?

tfausak commented Apr 14, 2015

👍 Thank you for that example, @elfenlaid! I cleaned up bits of it and ended up with my own Gist. It defines a runSecureClient function that handles all the boilerplate. What would it take to get this capability into this package?

@jaspervdj

This comment has been minimized.

Show comment
Hide comment
@jaspervdj

jaspervdj Apr 14, 2015

Owner

I think a small standalone package would be more useful here, because that eliminates the need for websockets to depend on connection.

Owner

jaspervdj commented Apr 14, 2015

I think a small standalone package would be more useful here, because that eliminates the need for websockets to depend on connection.

@tfausak

This comment has been minimized.

Show comment
Hide comment
@tfausak

tfausak Apr 15, 2015

I created Wuss, which exports runSecureClient and runSecureClientWith. It should be a drop-in secure replacement for Network.Websockets.

tfausak commented Apr 15, 2015

I created Wuss, which exports runSecureClient and runSecureClientWith. It should be a drop-in secure replacement for Network.Websockets.

@jaspervdj

This comment has been minimized.

Show comment
Hide comment
@jaspervdj

jaspervdj Apr 15, 2015

Owner

👍

Owner

jaspervdj commented Apr 15, 2015

👍

@Fuuzetsu

This comment has been minimized.

Show comment
Hide comment
@Fuuzetsu

Fuuzetsu Dec 20, 2017

Is there any plan to put this into websockets? I'm using wuss along with websockets which I found out in this ticket but it'd be cool to use a single blessed package which can do both.

If there's no plan, perhaps this ticket should be closed.

Fuuzetsu commented Dec 20, 2017

Is there any plan to put this into websockets? I'm using wuss along with websockets which I found out in this ticket but it'd be cool to use a single blessed package which can do both.

If there's no plan, perhaps this ticket should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment