Commit Graph

13 Commits

Author SHA1 Message Date
Pierre Ossman 8b2a949276 Merge branch 'ssl_clientdn_validation' of https://github.com/hoehermann/websockify 2017-10-30 13:12:18 +01:00
Pierre Ossman 5f7d28aeb6 Only start termination process once
We can't deal with the exception once we've started to shut down so
make sure it's only raised once.
2017-10-27 08:41:32 +02:00
Pierre Ossman 0a6e0c2d87 Don't log clients that don't send any request
They just fill up the logs with confusing data.
2017-10-27 08:25:35 +02:00
Hermann Höhne 914609fb5f Added SSL-certificate-based client authentication.
* Incorporates #190 without breaking compatibility towards old Python versions.
* A new plugin allows authenticating clients by the "common name" defined in their certificate.
* Added manual for certificate-based client authentication, including hints to which Python versions allow client certificate authentication.
* Adjusted test to work with new ssl.create_default_context.
2017-10-26 15:17:11 +02:00
Pierre Ossman 5e19bc3f96 Merge branch 'master' of https://github.com/michalsrb/websockify 2017-08-14 17:12:19 +02:00
Michal Srb 2c0e8cb8f4 Fix inetd mode on Python 2.
In python 2 the ssl.wrap_socket doesn't work on sockets created using socket.fromfd.
The workaround is to wrap the socket returned by socket.fromfd into another socket
object using the private _sock constructor parameter.
2017-08-14 16:59:54 +02:00
Michal Srb 867cb21ba0 Add support for inetd.
With the --inetd parameter, websockify doesn't require the source_addr and
source_port paramters and it expects that stdin is already opened and listening
socket.

This way websockify can be used with (x)inetd or as a systemd socket-activated
service.
2017-08-14 16:59:54 +02:00
Pierre Ossman bfd7394cae Remove stray comma in signal handler setup
It was causing the handlers to be set up improperly.
2017-08-14 16:51:55 +02:00
Pierre Ossman 518e6e0e56 Prevent startup on Windows
There's way too many things to fix before this has any chance of working.
2017-06-15 15:18:29 +02:00
Solly Ross ddcec961ec Work around lack of SIGCHLD on Windows
This only enables the SIGCHLD handler if SIGCHLD
exists, such that platforms without SIGCHLD (such
as windows) can still run websockify natively.

See #108
2017-06-15 14:23:29 +02:00
Pierre Ossman df317822d6 Be backwards compatible with older websockify clients
They will specify a sub-protocol, and the specification requires
us to choose one of the specified protocols.
2017-02-08 16:06:14 +01:00
Pierre Ossman 10e13d7a7e Remove last bits of Flash WebSocket emulation
We require native support from the browsers now.
2017-02-03 16:09:08 +01:00
Pierre Ossman e47591f4aa Split out basic WebSocket server template 2017-02-01 08:33:07 +01:00