websockproxy icon indicating copy to clipboard operation
websockproxy copied to clipboard

Upgrade to Python3 + Tornado6

Open ctrlcctrlv opened this issue 2 years ago • 7 comments

ctrlcctrlv avatar Jul 28 '22 08:07 ctrlcctrlv

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.

benjamincburns avatar Jul 29 '22 01:07 benjamincburns

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 avatar Jul 29 '22 02:07 benjamincburns

@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:)

ctrlcctrlv avatar Jul 30 '22 20:07 ctrlcctrlv

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.

benjamincburns avatar Aug 01 '22 11:08 benjamincburns

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.

benjamincburns avatar Aug 01 '22 12:08 benjamincburns

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?)

ctrlcctrlv avatar Aug 01 '22 16:08 ctrlcctrlv

So I am able to identify two issues that results in this PR not working.

  1. The usage of ord is invalid for python 3. Those functions can just be removed for python 3 compatibility.
  2. 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 🤷‍♀️

BelleNottelling avatar Feb 02 '24 04:02 BelleNottelling