-
Notifications
You must be signed in to change notification settings - Fork 116
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
WSS Support for Sync & Copas #91
Conversation
**DO NOT USE FOR PRODUCTION USE** This is an **extremely** rough edition and adds **extremely** minimal support for WSS and does not verify SSL Certificates
Add WebSocketSecure support
Instead of preset SSL parameters you provide your own (required), look at LuaSec for information on parameters
This is a "working" version that has been tested on a *real* server and it seems to respond perfectly fine, however, this is not the final version and bugs are present
WSS Support
CI failed ;( |
@NovusTheory thx! The CI must succeed though :( Did you try to run the docker env for testing locally? |
@lipp I'll run the stuff locally and try to get the CI to pass that way it can be added in |
…ll luasec with openssl parameters, have no clue how travis works ;)
@lipp Took me a pain to get this but here the CI passed I'm done with travis for life |
💯 awesome! thanks a lot! Indeed, setting up travis etc with lua and stuff is a pain. That's why I like node.js. So much better support / tooling! |
@lipp I did some testing with this code and I changed the title to respectively say Copas does work with this Pull Request also, I'm still working on ev though which seems to be giving me some issues local websocket = require'websocket'
local client = websocket.client.copas()
local params = {
mode = "client",
protocol = "sslv23",
verify = "none",
options = {"all"}
}
local c = coroutine.create(function()
client:connect('wss://echo.websocket.org','echo',params)
end)
while true do
local alive = coroutine.resume(c)
if not alive then
break
end
end
for i = 1, 10 do
local echo = coroutine.create(function()
client:send('Hello')
print(client:receive())
end)
while true do
local alive = coroutine.resume(echo)
if not alive then
break
end
end
end |
NOTE: You verify certificate yourself, via ssl_params
Okay, this is an extremely rough draft and probably will contain a lot bugs to admit, it was tested on an actual server and it seems to work fine.
I will probably start working on the other ones soon.
LuaSec dependency now required for WSS support.
If you have issues with WSS please tag me in them so I can be sure to look at them