websockproxy
websockproxy copied to clipboard
Upgrade to Python3 + Tornado6
Thanks so much for the contribution. This looks awesome. I'll give it a test tonight, and provided it's all working correctly I'll be very happy to merge.
Also before I merge, I've been meaning to change the license of this project to MIT. Would you still be willing to make this contribution under those terms?
@benjamincburns Oh, yes, of course. The delay was no problem in the end, I realized that I broke on accident backwards compatibility because I wanted to run this as non-root user (most of my changes allow for that)… but I forgot to make sure to change the port back to 80
for the public version. (As of ctrlcctrlv@915aafb I can just do --ws-port=8080
:smile:)
I'm not sure exactly why, but I'm afraid that this PR doesn't seem to work correctly when I run it on the relay. I see connections logged, but I never see the [IP] using mac [mac_addr]
log lines, and jor1k running under jor1k.com fails to get a DHCP assignment.
Apologies for the commit noise - just figured I'd save you the effort of rebasing this on current main
so you could see exactly what I tested.
It may help for me to say why I did this work.
I was playing around with JSLinux and wanted to be able to download faster.
So what's the best way for me to test that stuff? (jor1k?)
So I am able to identify two issues that results in this PR not working.
- The usage of
ord
is invalid for python 3. Those functions can just be removed for python 3 compatibility. - After upgrading the Tornado version past 4, you run into a 403 HTTP code because they changed the behavior to not allow websocket connections from other origin sites.
Both of these are fixable and I am able to then get the client to connect, however I can't get any communication to work correctly. This happens as well if you try to perform a upgrade of the existing code without apply any of the functional changes seen in this PR 🤷♀️