Skip to content

Instantly share code, notes, and snippets.

@eberlitz
Created December 4, 2018 13:33
Show Gist options
  • Save eberlitz/230d5c09ba325213c6e7adf61131f9cc to your computer and use it in GitHub Desktop.
Save eberlitz/230d5c09ba325213c6e7adf61131f9cc to your computer and use it in GitHub Desktop.
Using curl to test secure websocket connections
curl -i -N \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Host: localhost:8081" \
-H "Origin: https://localhost" \
--http1.1 \
--key ./helm/server-key.pem \
--cert ./helm/server-cert.pem \
--cacert ./helm/root-cert.pem \
-H "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
-H "Sec-WebSocket-Version: 13" \
"https://localhost:8081/socket.io/?EIO=3&transport=websocket"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment