Commit Graph

890 Commits

Author SHA1 Message Date
Pierre Ossman 94783ea0cd Remove --auto-pong argument
The underlying code has been removed, so remove the argument
as well.
2017-02-07 15:38:07 +01:00
Pierre Ossman 795552e418 Update websock.js description 2017-02-03 17:02:27 +01:00
Pierre Ossman 40238b00b6 Don't delay flushing
The native WebSocket is in a much better position to do queue
management than us. Many callers also failed to notice this part
of the API, causing stalls.
2017-02-03 17:00:15 +01:00
Pierre Ossman 3f8f301d7f Update websock.js from noVNC
Sync with noVNC as of commit ae510306b5094b55aa08a2a0d15a151704f70993.

The main change is to make it a more proper object that you can
instantiate multiple times.
2017-02-03 16:59:54 +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
Pierre Ossman 8a69762249 Separate out raw WebSocket protocol handling 2017-02-01 08:22:27 +01:00
Pierre Ossman 4099949984 Remove Base64 support
This is an older protocol used before browsers got native
support for Websockets.
2017-02-01 08:09:53 +01:00
Pierre Ossman 56a4ccbf74 Assume Python 2.6+ modules are always present
No relevant distribution has anything older anymore
2017-02-01 08:09:53 +01:00
Pierre Ossman 30942f12d3 Close connection after Websocket handshake
Otherwise we might misinterpret trailing binary data as a second
HTTP request. This happens when we return from the handler with
data still queued up in the socket.
2017-01-19 14:53:15 +01:00
Solly Ross cb1508fa49 Merge pull request #251 from thomasgoirand/master
TCP_KEEPCNT doesn't exist in non-linux
2016-10-10 15:53:40 -04:00
Thomas Goirand 325e4efe00 TCP_KEEPCNT doesn't exist in non-linux
The TCP_KEEPCNT option for sockets only work with the Linux kernel,
this isn't available for example in FreeBSD and Hurd, which makes the
package fail to build on these platforms. See Debian bug here:

https://bugs.debian.org/840035
2016-10-10 12:06:49 +02:00
Solly Ross 72ce5c1ae8 Merge pull request #228 from jrziviani/master
Enable unix socket to work with token plugin
2016-06-30 16:54:35 -04:00
Solly Ross 7d5d73873a Merge pull request #239 from javacruft/mox3
Switch test dependency to mox3
2016-06-30 16:40:03 -04:00
James Page 156b08ae68 Switch test dependency to mox3
mox is pretty much unmaintained these days, however the OpenStack
project are actively maintaining mox3 (a Python 3 compatibile fork
with some other improvements).

websockify seems quite happy to use mox3 instead, so switch the
test dependency and associated imports to use mox3.
2016-06-30 09:59:50 +01:00
samhed f23780eb42 Disable Nagle for proxied connections
Most of the proxy stuff will be latency sensitive traffic so we
disable Nagle because it introduces delays.
2016-06-02 14:45:51 +02:00
Gernot Tenchio 192ec6f5f9 C websockify: free memory after failed handshake
Conflicts:
	other/websocket.c
2016-04-22 12:04:31 -05:00
Solly Ross 1f132f9d84 Update to 0.8.0
See CHANGES.txt for more information
2016-02-18 14:11:15 -05:00
Solly Ross 4e6938e9c2 Merge pull request #226 abhishekkekane/bug/138
Make websockify respond to SIGTERM
2016-02-18 13:43:30 -05:00
Abhishek Kekane 68b1587ada Make websockify respect SIGTERM
Child processes were not terminated when the parent websockify
was killed.

This commit makes websockify send a SIGTERM to all active children
when the parent process is terminated.

Fixes #138
2016-02-18 13:42:53 -05:00
Jose Ricardo Ziviani 7f8baf54e1 Enable unix socket to work with token plugin
This commit adds support to unix sockets in the token plugin, thus it is
possible to have a token files like:

  token: unix_socket:/path/to/socket_file

A single websockify instance will be able to handle multiple sockets.

Signed-off-by: Jose Ricardo Ziviani <jose@ziviani.net>
2016-02-16 13:51:13 -02:00
Solly Ross 0b906a1c3e Merge pull request #219 from noah8713/master
Remove logging in signal handlers
2016-01-11 16:28:02 -05:00
Aliasgar Ginwala 6f0e06772a Remove additional signal calls in websockify that causes novnc to hang.
Openstack nova novnc-proxy services uses websockify to provide support
for nova vms using novnc proxy. At present, novnc hangs every couple of
weeks. It only resumes post restart of the novnc-proxy which is not
good. Hence, this code in websockify is updated to get rid of additional
signal calls to avoid novnc going in hang state even though process is
running. Basically, we are getting rid of existing msg and vmsg calls in
the websocket.py. This is kind of quick fix but we will need an
additional way of figuring out the logging to make it easy to trace in
case of any further failures in future.

closes bug: https://github.com/kanaka/noVNC/issues/556
2016-01-08 17:46:35 -08:00
Samuel 8a13c48428 Merge pull request #215 from miguelxpn/logfile
Add information about new logging files functionality in README
2015-12-05 13:19:44 +01:00
Miguel Xavier Penha Neto b2a93bf709 Add information about new logging files functionality in README
Fix minor typo in mini-webserver section
2015-12-04 22:41:02 -02:00
Solly Ross 9bc002dcf9 Merge pull request #214 from miguelxpn/logfile
Fix log files when daemonizing
2015-12-03 12:51:56 -08:00
Miguel Xavier Penha Neto dc979f042c Fix log files when daemonizing
Save log file descriptor so it's not closed when calling daemonize()
2015-12-02 15:21:21 -02:00
Solly Ross 72b629838a Merge pull request #205 from miguelxpn/logfile
Add support for log files
2015-12-01 10:25:23 -08:00
Miguel Xavier Penha Neto d947fb6e30 Add support for log files
Override log_message in websocket.py so messages from send_error are properly saved into the log files

Closes #204
2015-12-01 15:25:17 -02:00
Solly Ross 8dacbc974c Bump NPM Version
This commit is prep for releasing the Node version for v0.7.1
on NPM.

Closes #199.
2015-10-12 15:37:03 -04:00
Solly c415521214 Merge pull request #201 from quinox/basicauth
Verify username/password with BasicAuth plugin
2015-10-06 22:39:27 -04:00
Ceesjan Luiten 5bd6554651 Verify username/password with BasicAuth plugin 2015-10-06 12:09:22 +02:00
Joel Martin 50cc65f1e4 Merge pull request #198 from halfgaar/master
Clarified SSL section in README
2015-10-05 12:15:50 -05:00
Wiebe Cazemier 3c04cf8c45 Clarified SSL section in README 2015-10-05 11:27:36 +02:00
Solly 62c3a59192 Merge pull request #197 from miguelxpn/issue196
Add support for IPv6 addresses in tokens
2015-09-30 16:53:56 -04:00
Miguel Xavier Penha Neto e401701311 Added support for IPv6 addresses in tokens
Fixes #196
2015-09-30 16:04:19 -03:00
Solly 714aa34e4e Merge pull request #194 from kanaka/feature/http-auth-plugins
Rework Auth Plugins to Support HTTP Auth
2015-08-28 13:52:58 -04:00
Solly Ross 05cac26257 Merge pull request #192 from grz0/master
Fix bug in JSONTokenApi plugin

Closes #192
2015-08-27 18:09:58 -04:00
grz0 487db5f7c9 Fix bug in JSONTokenApi plugin
`Response#json` is a method, not a property, in the
requests library.

[directxman12: removed unnecessary calls to str]
2015-08-27 18:08:39 -04:00
Arata Notsu f693871c58 Avoid UnboundLocalError for exc
Previously exc was set only when an exception occurs in the inner
try (the one contains call to self.poll), so an error in the other
part causes an UnboundLocalError.

Closes #178
2015-08-27 18:03:38 -04:00
Solly b445296816 Merge pull request #185 from timkurvers/fix/js/drop-base64-dependency
Drop pkrumins/node-base64 dependency
2015-08-27 17:58:24 -04:00
Solly Ross 1e2b5c2256 Rework Auth Plugins to Support HTTP Auth
This commit reworks auth plugins slightly to enable
support for HTTP authentication.  By raising an
AuthenticationError, auth plugins can now return
HTTP responses to the upgrade request (such as 401).

Related to kanaka/noVNC#522
2015-08-25 17:52:20 -04:00
Solly Ross 6c1543c05b Fix auth plugins on Python 3.x
Python 3 does not have a `getheader` method on the header object,
and instead uses just `get`.
2015-08-25 17:50:22 -04:00
Solly b7684e0914 Merge pull request #186 from timkurvers/fix/js/node-modules-ignore
Correct .gitignore path for js node_modules
2015-08-11 13:37:57 -04:00
Solly 12432c9b06 Merge pull request #187 from timkurvers/fix/js/spdx-license-identifier
Correct SPDX license identifier for LGPL-3.0
2015-08-05 15:32:56 -04:00
Tim Kurvers 2051c2419f Correct SPDX license identifier for LGPL-3.0 2015-08-01 16:32:56 +02:00
Tim Kurvers cb6b309dad Ignore node_modules correctly 2015-08-01 16:19:30 +02:00
Tim Kurvers addc2e6b20 Drop pkrumins/node-base64 dependency 2015-08-01 16:10:58 +02:00
Solly Ross 69c04c819c Update to 0.7.0
See CHANGES.txt for details.
2015-07-23 21:02:37 -04:00
Till Zimmermann 92fc7872c7 Allow tab to be sent via telnet 2015-07-06 23:54:28 +02:00