From 8cb89d2340a51d78ea315ad98f671704b8655f5e Mon Sep 17 00:00:00 2001 From: josedpedroso Date: Fri, 6 Jul 2018 14:33:13 +0100 Subject: [PATCH] Clarified usage of --host-token and added a section about installing Python websockify in the README. --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fb545d9..5a3a30f 100644 --- a/README.md +++ b/README.md @@ -117,10 +117,11 @@ These are not necessary for the basic operation. * Token plugins: a single instance of websockify can connect clients to multiple different pre-configured targets, depending on the token sent - by the client using the `token` URL parameter or the hostname, if you - use `--host-token`. This functionality is activated with the - `--token-plugin CLASS` and `--token-source ARG` options, where CLASS is - usually one from token_plugins.py and ARG is the plugin's configuration. + by the client using the `token` URL parameter, or the hostname used to + reach websockify, if you use `--host-token`. This functionality is + activated with the `--token-plugin CLASS` and `--token-source ARG` + options, where CLASS is usually one from token_plugins.py and ARG is + the plugin's configuration. ### Implementations of websockify @@ -173,6 +174,20 @@ client (use 'localhost' and '2023' for the host and port respectively). +### Installing the Python implementation of websockify + +Download one of the releases or the latest development version, extract +it and run `python setup.py install` as root in the directory where you +extracted the files. Normally, this will also install numpy for better +performance, if you don't have it installed already. However, numpy is +optional. If you don't want to install numpy or if you can't compile it, +you can edit setup.py and remove the `install_requires=['numpy'],` line +before running `python setup.py install`. + +Afterwards, websockify should be available in your path. Run +`websockify --help` to confirm it's installed correctly. + + ### Building the Python ssl module (for python 2.5 and older) * Install the build dependencies. On Ubuntu use this command: @@ -193,4 +208,3 @@ respectively). `cd ../` `ln -sf ssl-1.15/build/lib.linux-*/ssl ssl` -