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

websockify.rb with SSL #10

Open
testingbot opened this issue Jul 23, 2012 · 2 comments
Open

websockify.rb with SSL #10

testingbot opened this issue Jul 23, 2012 · 2 comments

Comments

@testingbot
Copy link

I was wondering how to use websockify.rb with SSL.

Other implementations seem to require a path to the SSL certificate, however in websockify.rb there's no indication for this requirement, eventhough a comment in the file states WSS is supported?

When I try to use noVNC with the encrypt option enabled, I see this:
"Uncaught exception: undefined method []' for nil:NilClass 1: Trace: ./websocket.rb:363:indo_handshake'"

Would it be a good idea to use em-websocket [https://github.com/igrigorik/em-websocket] with noVNC?

@kanaka
Copy link
Member

kanaka commented Jul 24, 2012

Contrary to the comment at the top of the ruby implementation (which I corrected just now), encryption support is not yet implemented in websockify.rb.

If you would like to add SSL support to the existing version or create an Ruby implementation of websockify that uses em-websocket I would probably pull it in. I won't have time in the near future to work on this myself.

@testingbot
Copy link
Author

I tried adding SSL support to the current version, it works fine until handshake and sending protocol version. But then it breaks on "Uncaught exception: undefined method ^' for "\xFF":String" "websocket.rb:134:inblock in unmask'""

The diff of the changes I made to websocket.rb is available on https://gist.github.com/3172407
I replaced GServer with OpenSSL::SSL::SSLServer.

If you have any idea how I might be able to fix that error, then I think it'd work great. I could then clean up the diff :) and send a patch.

@samhed samhed transferred this issue from novnc/websockify Jul 12, 2019
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

1 participant