summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Enable Travisfeature/generic-auth-hookSolly Ross2015-05-123-4/+14
| | | | | | This commit enables running the unit tests on Travis for Python 2.6, 2.7, 3.3, and 3.4. Note that Travis does not support Python 2.4, so we cannot test there.
* Update Tests and Test PluginsSolly Ross2015-05-125-258/+370
| | | | | This commit updates the unit tests to work with the current code and adds in tests for the auth and token plugin functionality.
* Process plugin parameters in mainSolly Ross2015-05-121-32/+27
| | | | | | | | Previously, we just passed the values of '--*-plugin' and '--*-source' directly to `LibProxyServer` and `WebSocketProxy`, which handled turning that into an instance of the plugin class. Now, that's done in main, and the classes receive an instance directly.
* Fix bug in ReadOnlyTokenFileSolly Ross2015-05-121-0/+4
| | | | | ReadOnlyTokenFile didn't initialize `self._targets` to `None`, causing issues.
* Introduce Auth PluginsSolly Ross2015-05-122-0/+66
| | | | | | | | | | | | | | | | | | | | | | Auth plugins provide a generic interface for authenticating requests. The plugin name is specified using the '--auth-plugin' option, and may either be the name of a class from `websockify.auth_plugins`, or a fully qualified python path to the auth plugin class (see below). An optional plugin parameter can be specified using the '--auth-source' option (a value of `None` will be used if no '--auth-source' option is specified). Auth plugins should inherit from `websockify.auth_plugins.BasePlugin`, and should implement the `authenticate(headers, target_host, target_port)` method. The value of the '--auth-source' option is available as `self.source`. One plugin is currently included: `ExpectOrigin`. The `ExpectOrigin` plugin checks that the 'Origin' header is an expected value. The list of acceptable origins is passed using the plugin source, as a space-separated list.
* Restore functionaltiy to file_only.Solly Ross2015-05-111-1/+5
| | | | | | | | | There was a bug in WebSocketServer that prevented the `file_only` parameter from actually being set as an instance property, causing directory listings to appear even with `file_only=True`. This commit fixes that. See-Also: https://bugs.launchpad.net/nova/+bug/1447675
* Merge pull request #169 from AricStewart/ping-pongSolly2015-04-212-1/+40
|\ | | | | Implement Ping and Pong heartbeat messages
| * Add ping heartbeat optionAric Stewart2015-04-142-0/+25
| | | | | | | | | | | | With this option we will ping the client with a heartbeat. Helpful for connection through firewalls that may disable inactive connections.
| * Add option to turn on auto-pongAric Stewart2015-04-132-1/+15
|/ | | | | This allows the websockify server to respond to heart beat ping messages sent by clients
* Fix bug in token_plugin/target_cfg supportSolly Ross2015-04-091-3/+6
| | | | | | | | Previously, if no `target_cfg` flag was used, the `target_cfg` option would not get removed from the opts dict, causing an error when it got passed through to `WebSocketProxy`. Now we always remove it. Fixes #168.
* Merge pull request #161 from rafaelfolco/bug/150-websocket-bigendianSolly2015-04-071-8/+12
|\ | | | | BUGFIX: Websocket frame corruption on big-endian #150
| * BUGFIX: Websocket frame corruption on big-endian #150Rafael Folco2015-04-071-8/+12
| | | | | | | | | | | | | | This patch fixes noVNC endianess problem on handshake. It affects noVNC sessions on Big Endian platforms. Fixes #150
* | Merge pull request #162 from kanaka/feature/token-pluginsSolly2015-04-072-42/+138
|\ \ | |/ |/| Introduce Token Plugins
| * Introduce Token Pluginsfeature/token-pluginsSolly Ross2015-03-262-42/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Token plugins provide a generic interface for transforming a token into a `(host, port)` tuple. The plugin name is specified using the '--token-plugin' option, and may either be the name of a class from `websockify.token_plugins`, or a fully qualified python path to the token plugin class (see below). An optional plugin parameter can be specified using the '--token-source' option (a value of `None` will be used if no '--token-source' option is passed). Token plugins should inherit from `websockify.token_plugins.BasePlugin`, and should implement the `lookup(token)` method. The value of the '--token-source' option is available as `self.source`. Several plugins are included by default. The `ReadOnlyTokenFile` and `TokenFile` plugins implement functionality from '--target-config' (with the former only reading the file(s) once, and the latter reading them every time). The 'BaseTokenAPI' plugin fetches the value from an API, returning the result of `process_result(response_object)`. By default, `process_result` simply returns the text of the response, but may be overriden. The `JSONTokenAPI` does just this, returning the 'host' and 'port' values from the response JSON object. The old '--target-config' option is now deprecated, and maps to the `TokenFile` plugin under the hood. Also-Authored-By: James Portman (@james-portman) Closes #157
* | Merge pull request #159 from vaibhavsagar/python3-troveSolly2015-03-171-0/+6
|\ \ | |/ |/| Add Python 3 trove classifiers.
| * Add Python 3 trove classifiers.Vaibhav Sagar2015-03-171-0/+6
|/ | | | This makes <http://py3readiness.org> display the status of this package correctly :).
* Merge pull request #155 from kanaka/bug/154-no-implicit-relative-importsSolly2015-02-062-3/+3
|\ | | | | Don't use implicit relative imports
| * Don't use implicit relative importsbug/154-no-implicit-relative-importsSolly Ross2015-02-032-3/+3
|/ | | | | | | | Implicit relative imports don't work in Python 3. This converts implicit relative imports into absolute imports (e.g. `import websocket` becomes `from websockify import websocket`). Fixes #154
* Merge pull request #128 from ags131/patch-1Solly2015-01-051-1/+1
|\ | | | | Added 'websockify.js' to package.json files list
| * Fixed Package.jsonags1312014-05-161-1/+1
| | | | | | Added websockify.js to the files section, this fixes #90 and allows NPM to properly install
* | Merge pull request #140 from rpodgorny/python3Joel Martin2014-10-022-4/+4
|\ \ | | | | | | python3 compatibility fixes
| * | python3 compatibility fixesRadek Podgorny2014-10-022-4/+4
|/ /
* | sync with commit from PR #347 in noVNCsamhed2014-08-191-7/+9
| |
* | Merge pull request #129 from mmb/masterJoel Martin2014-05-201-1/+1
|\ \ | |/ |/| Fix typo in reaping zombies message.
| * Fix typo in reaping zombies message.Matthew M. Boedicker2014-05-201-1/+1
|/
* remove some trailing whitespacessamhed2014-04-141-13/+13
|
* Avoid using the %-operator, URL-escaped strings can contain extra %'s which ↵samhed2014-03-182-12/+12
| | | | can cause bugs.
* Update to v0.6.0v0.6.0Solly Ross2014-02-183-2/+11
| | | | | | | *** NOTE *** This version of websockify will break existing code which sub-classes `WebsocketProxy` -- see pull requests #110 and #111
* README: update with general contact info.Joel Martin2014-02-031-0/+22
|
* Fix default log level in echo and load testsSolly Ross2014-01-302-2/+6
| | | | | | | | | | | | | Since we switched to using the `logging` module to log in pull request #100, none of the messages on the 'INFO' level were being shown from `tests/echo.py` and `tests/load.py`, since the default log level is 'WARNING'. Now, the log level is set to INFO in `tests/echo.py` and `tests/load.py`, to match the log level in the main websockify executable. Fixes #109
* README: fix wrap mode examples.Joel Martin2014-01-131-5/+6
|
* Merge pull request #111 from astrand/masterastrand2013-12-194-208/+317
|\ | | | | Refactor to use standard SocketServer RequestHandler design.
| * Merge remote branch 'upstream/master'Peter Åstrand (astrand)2013-12-190-0/+0
| |\ | |/ |/|
* | Prepare for fixing https://github.com/kanaka/websockify/pull/111Peter Åstrand (astrand)2013-12-191-110/+110
| | | | | | | | | | | | | | | | | | | | | | | | Move around functions and methods, so that connection-related and server-related stuff are close together. This patch just moves things around - it does not change anything at all. This can be verified with: git diff | grep ^- | cut -c 2- | sort > removed git diff | grep ^+ | cut -c 2- | sort > added diff -u removed added
| * Minor whitespace and layout tweaks, to reduce diff againstPeter Åstrand (astrand)2013-12-172-4/+5
| | | | | | | | upstream/master.
| * Merge remote branch 'upstream/master'Peter Åstrand (astrand)2013-12-170-0/+0
| |\ | |/ |/| | | | | Conflicts: websockify/websocket.py
* | Cherry-picked 4e3388964af9697496d2c5e000bb8559dfba87ad fromPeter Åstrand (astrand)2013-12-171-217/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | astrand/websockify: Prepare for fixing https://github.com/kanaka/websockify/issues/71: Move around functions and methods, so that connection-related and server-related stuff are close together. This patch just moves things around - it does not change anything at all. This can be verified with: git diff websocket.py | grep ^- | cut -c 2- | sort > removed git diff websocket.py | grep ^+ | cut -c 2- | sort > added diff -u removed added
| * Merge remote branch 'upstream/master', after #110 was merged.Peter Åstrand (astrand)2013-12-165-5/+5
| |\ | |/ |/|
* | Merge pull request #110 from astrand/rename-self-clientastrand2013-12-168-29/+29
|\ \ | | | | | | Rename self.client and new_client - prepare for #72 / #111
| * | Rename new_client to new_websocket_client, in order to have a betterPeter Åstrand (astrand)2013-11-288-12/+12
| | | | | | | | | | | | | | | | | | name in the SocketServer/HTTPServer request handler hierarchy. Prepare for merge pull request #72. This work has been picked out of 7b3dd8a6f5ef26dbfd6c34a91600ea1613aefaa2 .
| * | Rename self.client to self.request, in preparation for merging pullPeter Åstrand (astrand)2013-11-284-17/+17
|/ / | | | | | | | | request #72. The standard Python SocketServer/BaseRequestHandler requires this name.
| * Follow up on 131f9ea645ac6f00d98743a420d168033f99063a: Proper loggingPeter Åstrand (astrand)2013-11-281-3/+7
| | | | | | | | in request handler class.
| * Merge commit '34a1b68d79a13c03aa63b5c4194796341c9383fe'Peter Åstrand (astrand)2013-11-281-4/+3
| |\ | |/ |/| | | | | * commit '34a1b68d79a13c03aa63b5c4194796341c9383fe': Clarify ssl module build for old python versions.
* | Clarify ssl module build for old python versions.Joel Martin2013-11-201-4/+3
| |
| * Merge commit 'a04edfe80f54b44df5a3579f71710560c6b7b4fc'Peter Åstrand (astrand)2013-11-284-107/+90
| |\ | |/ |/| | | | | * commit 'a04edfe80f54b44df5a3579f71710560c6b7b4fc': Added temp dir for unit test data and cleanup
* | Merge pull request #105 from dosaboy/topic/unit-test-cleanupJoel Martin2013-11-204-107/+90
|\ \ | | | | | | Added temp dir for unit test data and cleanup
| * | Added temp dir for unit test data and cleanupEdward Hope-Morley2013-11-144-107/+90
|/ / | | | | | | | | | | | | | | | | | | Unit test data will now go to a temporary dir that will be deleted once the test completes. The unit tests also setup a logger which will persist so that it can be inspected once tests complete. Also fixes a bug where instance var is missing from decode_hybi() Co-authored-by: natsume.takashi@lab.ntt.co.jp
| * Merge commit 'a47be21f9fa69ddf8d888ff9e3c75cdfc9e31c00'Peter Åstrand (astrand)2013-11-284-18/+358
| |\ | |/ |/| | | | | * commit 'a47be21f9fa69ddf8d888ff9e3c75cdfc9e31c00': Added unit tests for websocket and websocketproxy
* | Merge pull request #94 from dosaboy/topic/add-unit-testsJoel Martin2013-10-294-18/+358
|\ \ | | | | | | Added unit tests for websocket and websocketproxy
| * | Added unit tests for websocket and websocketproxyEdward Hope-Morley2013-10-294-18/+358
|/ / | | | | | | | | | | | | | | | | | | To run the unit tests just run tox from the top level directory which will try to run unit tests for most versions of python. Requires tox to be installed. To run tox for a specifice env, run tox -e<env> e.g. for python 2.7 run 'tox -epy27'. Co-authored-by: natsume.takashi@lab.ntt.co.jp