Commit Graph

890 Commits

Author SHA1 Message Date
Joshua Ashton bdcd685f8e
Add support for FTEQW protocol
It's the same as binary really, Quake servers use this to distinguish what client type is being used.
2021-08-29 08:51:11 +01:00
Joshua Ashton 5d8f5ccfab
Support for UDP socket forwarding
Allow forwarding WS->UDP. Useful for experiments and hobby projects.
2021-08-29 08:49:30 +01:00
Pierre Ossman dc345815c0 Use RSA-OAEP instead of RSA1_5 for jwt tests
The latest version of jwcrypto has disabled RSA1_5 by default, making
the tests fail.
2021-07-23 09:38:58 +02:00
Pierre Ossman 71d55fcaa8 Fix bad classifiers array 2021-07-22 17:20:45 +02:00
Pierre Ossman 1c35fdd72b websockify 0.10.0 2021-07-22 17:11:08 +02:00
Pierre Ossman eca301c05b Fix patching of open() for Python 3.4
It doesn't handle builtins automatically, so follow the recommendations
from that time.
2021-05-03 14:34:07 +02:00
Pierre Ossman b9b269c73f Add unit test for token file with tab 2021-04-16 13:02:07 +02:00
Pierre Ossman da130946eb Merge branch 'sisou/split-tokens-tab' of https://github.com/sisou/websockify 2021-04-16 13:00:36 +02:00
Pierre Ossman 100a776409 Add unit tests for ReadOnlyTokenFile 2021-04-16 12:59:17 +02:00
Pierre Ossman 984dcc62d3 Move JWT token plugins tests to separate file
Let's try to match the test units with the modules we have.
2021-04-16 11:27:56 +02:00
Samuel Mannehed c5d365dd1d
Merge pull request #479 from llopisdon/patch-1
Update README.md
2021-03-22 09:23:15 +01:00
Don E. Llopis 27e0ce71ed
Update README.md
Fixed typo and clarified sentence.
2021-03-20 10:17:55 -04:00
Pierre Ossman 24c3f75ede Remove setuptools version restriction
We're fine with current versions now.
2021-02-08 15:51:34 +01:00
Pierre Ossman 8b724074e0 Use older PROTOCOL_SSLv23 instead of PROTOCOL_TLS
We need to support Python older than 3.6, so use the older name.
2021-02-08 15:47:29 +01:00
Pierre Ossman 55f1fe2603 Explicitly include "six" for jwt tests
It is not properly listed as a dependency for jwcrypto, so we need to
pull it in manually.
2021-02-08 15:46:43 +01:00
Pierre Ossman f1e33fa4c7 Use older numpy for older Python versions
The latest version refuses to run on anything older than Python 3.7.
2021-02-08 15:33:37 +01:00
Pierre Ossman 72704b3fe8 Update classifiers to just Python 3
We no longer support anything older than Python 3.4.
2021-02-08 14:55:49 +01:00
Pierre Ossman 4afdcb00ab Update references in egg manifest
We changed things when we purged all the non-Python stuff out of the
tree.
2021-02-08 14:55:15 +01:00
Pierre Ossman 982e475936 Run all tests even on failure
Issues might be specific to certain versions of Python, so let all tests
run.
2021-02-08 14:42:41 +01:00
Pierre Ossman 6012052686 Use Ubuntu 18.04 for tests
We want to test on Python 3.4, which requires us to use an older Ubuntu
image for tests.
2021-02-08 11:11:39 +01:00
Pierre Ossman e4e85f8082 Replace Travis with Github actions 2021-02-08 11:02:48 +01:00
Pierre Ossman f7b0867471 Merge branch 'fix467_redis' of https://github.com/PexMor/websockify 2021-02-08 10:42:01 +01:00
PexMor 9dab8b360b add details on format of redis and leave port as number 2021-02-07 20:39:02 +01:00
Alexander E. Patrakov 4afafcd152 Simplify Windows instructions
Instead of a Websockify-specific tool that needs to be compiled, and
that doesn't work on Windows 10 anyway (the service takes forever to
start), let's switch to the industry standard SrvAny tool. This also
gets rid of .Net Framework requirement and lets one run modern
versions of Websockify easily.
2021-01-30 17:11:20 +05:00
Pierre Ossman b22a6b0ce0 Add unit tests for jwt token time checks 2021-01-29 13:11:07 +01:00
Pierre Ossman 980237c9cd Merge branch 'new_branch' of https://github.com/jprietove/websockify 2021-01-29 13:10:49 +01:00
Pierre Ossman fadb25e026 Use assertRaises() as a context manager
Makes the code a lot easier to read.
2021-01-29 13:10:16 +01:00
Pierre Ossman 3f17696dc6 Use patch() as a decorator in tests
Cleaner and more robust.
2021-01-29 13:09:19 +01:00
Pierre Ossman a82eb10b48 Remove Python version check
We require Python 3 now, so no need for this check.
2021-01-29 12:58:26 +01:00
Javier Prieto 1f618c8f41 Added JWT nbf, not before 2021-01-27 16:50:19 +01:00
Javier Prieto e9367b03be Added exp claim for JWT token 2021-01-27 15:16:08 +01:00
Tim Gates adc278657a
docs: fix simple typo, acccept -> accept
There is a small typo in README.md.

Should read `accept` rather than `acccept`.
2020-12-25 20:37:15 +11:00
Pierre Ossman 108f993eb3 Explicitly request Python 3
It varies between systems if /usr/bin/python is Python 2.x or Python
3.x. Since we now only work with Python 3.x we should be more explicit
in our scripts and documentation.
2020-12-15 16:10:43 +01:00
Pierre Ossman 33710b3972 Use frombytes() instead of fromstring()
Both the Python library and NumPy have changed the names of these
functions to better match the new bytes data type it actually uses.
2020-12-14 16:08:16 +01:00
Pierre Ossman 96eda1a5c7 Remove support for older Python
All active distributions should now support at least Python 3.4, so
let's clean things up by removing older compatibility code.
2020-12-14 13:48:54 +01:00
Pierre Ossman e80739b296 Add more search paths for rebind.so
If we're run as a module then sys.argv[0] will be the main module, not
some startup script.
2020-12-04 13:57:21 +01:00
Samuel Mannehed 4c2edaabc2
Merge pull request #459 from nwtgck/patch-1
fix a typo
2020-11-18 09:15:42 +01:00
Ryo Ota d2155697fc
fix a typo 2020-11-18 08:53:09 +09:00
JasonYang 2b44803f83 fixed a bug in the function of send_frames. 2020-11-10 13:14:54 +01:00
Pierre Ossman 01ef6a6a55 Require same arguments on insufficient socket space
This matches the behaviour of SSLSocket, which we are trying to mimic.
It also closely matches the behaviour of normal Socket which can be
assumed to not have sent anything if an error occurs. We might actually
send some data, but the caller cannot really see that and must call us
again as if no data was sent.
2020-09-30 14:58:19 +02:00
Pierre Ossman 6caf23c067 Add type checking when sendning data
We use this in various ways so add an early check to make things clear
in case anything is called incorrectly.
2020-09-30 14:53:19 +02:00
Pierre Ossman d72ace2ae6 Allow sending empty messages
This is perfectly valid in the protocol, and may be meningful to some
applications. However send() is still stream oriented so it will ignore
an empty buffer.
2020-09-30 14:51:07 +02:00
Samuel Mannehed 536a548db5
Merge pull request #441 from RangeForce/python-gitignore
Add build and dist directories to .gitignore
2020-09-02 02:19:12 +02:00
Chris Kerr 997b3897e7
Add build and dist directories to .gitignore 2020-09-01 10:26:46 +03:00
Samuel Mannehed 7d4841c49a
Merge pull request #440 from gamtiq/patch-1
Fix a typo in README
2020-08-25 16:51:00 +02:00
Denis Sikuler 9851dd9012
Fix a typo in README 2020-08-24 15:36:35 +03:00
Pierre Ossman 9b1780f068 Fix bad reset of fragmented frame
The Python 2/3 binary data type compatibility hack was backwards here.
2020-08-21 10:58:55 +02:00
Pierre Ossman e5b6dfe17f Merge branch 'sisou/fix-print-statement' of https://github.com/sisou/websockify 2020-08-21 10:51:37 +02:00
Pierre Ossman 992e09eac4 Convert tests from mox to mock
mox is deprecated upstream in favour of mock
2020-08-21 10:50:11 +02:00
Sören Schwert 663b39cd38
Split token file by any whitespace after the colon, not just a space
With the current parser logic, only tokens and servers that are separated by _exactly_ a colon and a space `: ` are detected as tokens. But when formatting one's token file with tabs, this breaks.

This commit changes the split characters to be a regular expression that matches all forms of whitespace, including spaces and tabs.
2020-07-28 14:40:42 +02:00