-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature/websockets ssl #34
Conversation
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-launch1 #34 +/- ##
============================================
Coverage 28.15% 28.15%
============================================
Files 3 3
Lines 721 721
============================================
Hits 203 203
Misses 518 518 Continue to review full report at Codecov.
|
var ign = new Ignition({ | ||
url: 'ws://localhost:9002', | ||
url: 'wss://localhost:9002', | ||
key: "auth_key" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the auth key the websocket server expects to receive? Maybe this should be noted in the docs.
This repo does not have the ign.js
code in it (and rightly so). Where can I read its source?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should contain an ign.js file here: https://github.com/ignitionrobotics/ign-launch/blob/feature/websockets_ssl/plugins/websocket_server/ign.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had put the authorization documentation here: https://github.com/ignitionrobotics/ign-launch/blob/feature/websockets_ssl/plugins/websocket_server/WebsocketServer.hh#L45. I think yout are looking for it in the README.md, which I'll update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated readme: 3273662
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It's working locally.
Adds SSL support to the websocket server.
To test:
Uncomment the
<ssl>
section in examples/websocket.ign. Set the<cert_file>
to contain the full path to the plugins/websocket_server/localhost.cert file. Set the<private_key_file>
to contain the full path to the plugins/websocket_server/localhost.key file.Run gazebo:
ign gazebo -v 4 -r -s shapes.sdf
Run the websocket server:
ign launch examples/websocket.ign -v 4
.Run:
firefox plugins/websocket_server/index.hml
.Open a new tab in firefox and go to
https://localhost:9002
. Accept the certificate.Go back to the
index.hml
tab, and refresh.