Commit Graph

988 Commits

Author SHA1 Message Date
IngenieroRicardo 043df1f8b8
Update websocketproxy.py 2025-08-15 13:16:19 -06:00
Takashi Kajinami a02143ce85 Drop redundant test requirement
redis-py is included by install requirements so should be always
installed.
2025-07-15 18:40:22 +09:00
Takashi Kajinami e8bb2526c2 Remove six
It was added due to the implicit dependency by jwcrypto, which was
fixed in v0.9.0[1]. The library was even removed in jwcrypto v1.0.0[2]
and is useless now.

[1] https://github.com/latchset/jwcrypto/commit/08cae6a43ef39a2a8f6148e
[2] https://github.com/latchset/jwcrypto/commit/1f5e7517142baf5eed23578
2025-07-15 18:37:30 +09:00
Pierre Ossman bdf1ebf24e Merge branch 'flake8' of github.com:kajinamit/websockify 2025-07-03 16:13:08 +02:00
Takashi Kajinami c37fad851f Add workflow to run pep8 check 2025-07-03 23:03:31 +09:00
Takashi Kajinami 62fdd838ef Ignore a few controversial errors 2025-07-03 23:03:31 +09:00
Takashi Kajinami c269a9debc Extend max line length
The existing code does not expect 79 characters limit. Extend the limit
to avoid mass update.
2025-07-03 23:01:44 +09:00
Takashi Kajinami e2d2931237 Ignore false flake8 error 2025-07-03 23:01:44 +09:00
Takashi Kajinami c00cfc735a Avoid nested import
... to get rid of F401 error by flake8.
2025-07-03 23:01:44 +09:00
Takashi Kajinami 9a38c0ce17 Fix flake8 caused by top level imports 2025-07-03 23:01:44 +09:00
Takashi Kajinami 10889ff79b Use explicit import
... to avoid pep8 errors caused by implicit import of a few modules.
2025-07-03 23:01:44 +09:00
Takashi Kajinami 21ed8747e2 Replace bare except
... to ensure the logic works only valid exceptions.
2025-07-03 23:01:44 +09:00
Takashi Kajinami 4aa05c7499 Fix indentations
... which are now complained by flake8.
2025-07-03 23:01:44 +09:00
Alexander Zeijlon b925f785ed Merge branch 'pathlib-loop-over-files' of https://github.com/CendioZeijlon/websockify 2025-07-01 14:39:48 +02:00
Alexander Zeijlon 22eaccdc83 Fix iterating over files in dir with pathlib
PosixPath-objects aren't iterable and we need to call the
iterdir()-method if we want to loop over files in the current dir-Path

Closes #612
2025-07-01 14:37:14 +02:00
Alexander Zeijlon b794a2be23 Merge branch 'master' of https://github.com/emmanuel-ferdman/websockify 2025-06-30 15:46:07 +02:00
Takashi Kajinami de4acf0752 Drop unused variables 2025-06-24 21:27:25 +09:00
Takashi Kajinami 053d37c1d6 Remove dead code
... to fix "E265 block comment should start with '# '".
2025-06-24 21:27:25 +09:00
Takashi Kajinami 992a2d1793 Use 'is' in comparison to None
... instead of == or != .
2025-06-24 21:27:25 +09:00
Takashi Kajinami b9194bf175 Avoid multiple statements on one line 2025-06-24 21:27:25 +09:00
Takashi Kajinami 9140ab7a7d Fix flake8 errors related to whitespace 2025-06-24 21:27:25 +09:00
Takashi Kajinami 9e1c731089 Fix flake8 errors related to blank lines 2025-06-24 21:27:24 +09:00
Takashi Kajinami 070876493b Drop unused/duplicate import 2025-06-24 21:27:04 +09:00
Takashi Kajinami e92a6ddf42 Fix conflicting test case name
... and fix the wrong format of Sec-WebSocket-Protocol header in test
case.
2025-06-24 21:27:04 +09:00
Takashi Kajinami 9ffe1493da Use print function, not print statement
print statement is no longer available in Python 3.
2025-06-24 21:27:04 +09:00
Takashi Kajinami 12dd0c738e Drop trailing semicolons 2025-06-24 21:27:04 +09:00
Takashi Kajinami d19312ba75 tox: Restore pep8 target
... so that we can run flake8 check more easily. Note that the check
is not yet enforced in CI.
2025-06-24 21:27:04 +09:00
Alexander Zeijlon ca75d331f7 Merge branch 'http-405' of https://github.com/tobias-urdin/websockify 2025-06-24 12:41:30 +02:00
Emmanuel Ferdman d6a53a40d7
Migrate to modern logger interface
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-06-24 01:35:11 -07:00
Tobias Urdin 93517f1fcb Return 405 Method Not Allowed in request handler
Instead of returning HTTP 501 lets implement the
other HTTP methods and returns a HTTP 405 Method
Not Allowed.

Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
2025-06-24 08:57:25 +02:00
Alexander Zeijlon c44e432e14 Merge branch 'master' of https://github.com/he1f/websockify 2025-06-23 15:55:38 +02:00
Pierre Ossman c7f6a577d8 Merge branch 'run-script' of github.com:kajinamit/websockify 2025-06-09 11:23:25 +02:00
Takashi Kajinami 8984408af3 Remove run script alias
It was added 13 years ago for compatibility when the run script was
converted to a shell script by [1]. The long time has passed since then
and we can assume that users may no longer use it. Removing it allows
us to resolve the confusing name (.py which triggers shell).

[1] 4f6a82159c
2025-06-08 22:03:22 +09:00
Alexander Zeijlon cdc245273b Merge branch 'py3' of https://github.com/kajinamit/websockify 2025-06-05 10:00:11 +02:00
Alexander Zeijlon 15489fb72e Merge branch 'tox-update' of https://github.com/kajinamit/websockify 2025-06-04 15:36:26 +02:00
Takashi Kajinami 37b0f2643b Drop third party mock
It hasn't been used since python 2 support was removed by
96eda1a5c7 .
2025-06-04 01:05:33 +09:00
Takashi Kajinami aa5f0bf8ab Require Python >= 3.6
Python 3.4 and 3.5 haven't been tested for long time. Enforce
the minimum version so that users may not attempt to use untested
ancient python versions.

Note that Python 3.6 ~ 3.8 already reached their EOL and we may even
remove support for these in the near future.
2025-06-04 01:00:13 +09:00
Takashi Kajinami 03dba52b04 Fix test command to run unit tests
It should have been updated when nose was replaced by nose2[1].

[1] 9ac3272d2b
2025-06-04 00:54:44 +09:00
Takashi Kajinami c24fbbce94 tox: Update default env
Support for python 3.4 was removed long time ago. Use py3, which may
be translated to the default system python for convenience.
2025-06-04 00:51:46 +09:00
Dmitry Kozlov 008a13029f migrate TokenPlugins from os.path to pathlib to ensure all files are closed 2025-04-28 15:18:30 +03:00
Pierre Ossman 4acdb13d5b Also test on Python 3.13 2025-04-10 14:53:10 +02:00
Pierre Ossman 465eb1b5a0 Switch to containers for GitHub actions
GitHub is removing Ubuntu 20.04, and Ubuntu 22.04 doesn't have Python
3.6 that we want to continue testing for. Switch to using containers
instead so we have more control over when to deprecate a Python version.
2025-04-10 14:52:02 +02:00
Alexander Zeijlon e818947513 websockify 0.13.0 2025-02-12 11:45:01 +01:00
Pierre Ossman 0d519b9c18 Fix fake headers dict in tests 2025-02-12 11:05:56 +01:00
Pierre Ossman 187e204ce4 Clear out sensitive fake headers from client
We use the header dict to pass on non-header information to the
authentication plugins. Make sure an evil client isn't trying to sneak
something in that hasn't been verified by us.

Issue found by Kevin Rasmussen.
2025-02-12 09:56:15 +01:00
Pierre Ossman 417210f2cf Merge branch 'master' of https://github.com/so-saf/websockify 2024-08-29 16:35:49 +02:00
Pierre Ossman 245fd08e52 Use standard line endings in sysloghandler.py
This file was accidentally using DOS file endings, unlike every other
file in this project.
2024-08-29 16:31:43 +02:00
Tomasz Kłoczko 3f205f7cc6 drop python<3.6 support
Filter all code over `pyupgrade --py36-plus` and update `classifiers`.
2024-08-29 16:30:36 +02:00
Insaf Nureev 0af3404ec9 Add namespace value to TokenRedis source 2024-08-22 17:51:56 +03:00
Insaf Nureev 5989d31ebf Add namespace value to TokenRedis source 2024-08-08 13:05:45 +03:00