Commit Graph

72 Commits

Author SHA1 Message Date
Pierre Ossman 6a9e446f8e Avoid : in recording file names
That character is not legal in Windows file names, so make sure we
avoid it when creating recording files.
2018-10-16 16:10:37 +02:00
Giannis Kosmas 3646575c99 Remove policyfile from deps 2018-03-20 14:35:06 +02:00
Pierre Ossman 193c7e6181 Merge branch 'filedescriptor-fix' of https://github.com/pesintta/websockify 2018-03-05 16:23:44 +01:00
Antti Seppälä e7af149cd1 C websockify: Fix file descriptor leak
After fork() the parent process has a copy of clients file descriptor which
needs to be closed by the parent to prevent a descriptor leak.
2018-02-17 19:32:11 +02:00
Samuel Brian 4202818be9 C websockify: support for binary websocket protocol with HyBi/RFC 6455.
The server prefers binary over base64 encoding, given a choice. This is required as noVNC no longer supports base64 encoding.
2018-02-17 18:04:48 +02:00
Antti Seppälä 3a03e3c59d C websockify: use openssl base64 encode/decode functions
b64_pton and b64_ntop functions are not portable and cannot be found in
all C library implementations (e.g. uClibc, musl).

Since c-websockify already has explicit dependency to openssl it can be
used to replace b64_pton/ntop with versions that are portable without
introducing too much additional code or dependencies.
2018-02-11 13:17:11 +02:00
Antti Seppälä 7235c9765e C websockify: Load entire certificate chain
Instead of single certificate in one file it is sometimes customary to
chain multiple certificates into the same file. This is common practice
for CAs like letsencrypt that are providing intermediate certificates.

This patch switches loading of only one certificate to loading whole chain
of certificates.

The effects can be seen with e.g. the following command:

openssl s_client -showcerts -connect websockify-hostname:8080

Before the change the verify fails:

Certificate chain
 0 s:/CN=websockify-hostname
   i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3

After the change the verify passes:

Certificate chain
 0 s:/CN=websockify-hostname
   i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
 1 s:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
   i:/O=Digital Signature Trust Co./CN=DST Root CA X3
2018-02-03 10:18:06 +02:00
Aaron C. de Bruyn 46406c76e7 Add recording feature to websockify.js. Closes GH-249 2017-11-16 18:37:34 -08:00
Pierre Ossman e69d4a4546 Properly declare websocket functions in header 2017-10-18 16:35:52 +02:00
Pierre Ossman 93842aa798 Avoid implicit int type 2017-10-18 16:35:42 +02:00
Pierre Ossman 89bbb64145 Include string.h where needed 2017-10-18 16:35:30 +02:00
Pierre Ossman 814279b83b Merge branch 'master' of https://github.com/leeyiw/websockify 2017-10-18 16:29:37 +02:00
Pierre Ossman 414d1d8b44 Merge branch 'fix-cygwin' of https://github.com/r1b/websockify 2017-10-18 16:25:37 +02:00
Giannis Kosmas 99198cface Send Content-Type headers with static files
Fixes a problem that occurs in Chrome 61 where the following error message appears in the console:

'Failed to load module script: The server responded with a non-JavaScript MIME type of "".
Strict MIME type checking is enforced for module scripts per HTML spec.'
2017-10-12 19:28:30 +03:00
Sam Frances 141ba0088e Change logging of URL to be compatible with both old and new versions
of ws
2017-05-18 10:08:54 +01:00
Sam Frances 3e17187216 Fix bug caused by upgrade to ws version 3 2017-05-17 15:37:07 +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 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
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 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 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
Tim Kurvers 2051c2419f Correct SPDX license identifier for LGPL-3.0 2015-08-01 16:32:56 +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
ags131 67a12a2394 Fixed Package.json
Added websockify.js to the files section, this fixes #90 and allows NPM to properly install
2014-05-16 11:56:24 -05:00
liyiwei 712e17aaef kill 9 warnings when compile on OS X 10.9 2014-04-07 14:40:27 +08:00
liyiwei e36a59d6a1 add run-once option help message 2014-04-07 12:46:50 +08:00
Solly Ross 739af6ecb4 Update to v0.6.0
*** NOTE ***

This version of websockify will break existing code which sub-classes
`WebsocketProxy` -- see pull requests #110 and #111
2014-02-18 17:03:09 -05:00
chummm f81de71522 fix cygwin compilation 2013-12-27 01:58:32 +00:00
Peter Åstrand (astrand) 047ce47742 Rename new_client to new_websocket_client, in order to have a better
name in the SocketServer/HTTPServer request handler hierarchy. Prepare
for merge pull request #72. This work has been picked out of
7b3dd8a6f5 .
2013-11-28 13:33:28 +01:00
dellsystem 82fe329129 Fix syntax errors in other/websockify.rb 2013-10-21 20:59:16 -04:00
chrislee35 eee946d2cf fixed 1.8 compatibility bug for OpenSSL::SSL::SSLSocket#read_nonblock vs #readpartial
tested in 1.8 and 2.0
2013-07-02 22:16:01 +09:00
chrislee35 73af324a3a adding SSL support and Ruby1.9 support 2013-07-02 21:38:22 +09:00
Joel Martin 264f8fdd7f Update to version 0.5.1
*** NOTE ***

This version of websockify no longer supports the old Hixie protocol.
2013-06-27 16:35:54 -05:00
Joel Martin 36cb8f4676 Move javascript websockify files to other/js 2013-06-27 16:29:17 -05:00
Joel Martin 36fcd5784f Add package file for websockify.js 2013-06-27 16:29:17 -05:00
Joel Martin 46450577c2 Use upstream einaros/ws 0.4.27 with sub-protocol support.
Also, some connection error handling.
2013-06-27 16:29:17 -05:00
Joel Martin 477947ba96 Remove wsproxy references. Sync launch.sh from noVNC. 2013-04-15 12:22:08 -05:00
Joel Martin 805026360e Use Buffer base64 support instead of pkrumins/node-base64 2013-02-19 13:12:10 -06:00
Joel Martin a670af376e websockify.js: add encrypted HTTPS/WSS support.
This works a bit differently than python websockify implementation
since the server either runs in HTTP or in HTTPS and both web and
websocket servers only support the same mode. Specifying the --cert
parameter activates encrypted HTTPS/WSS mode.
2012-10-29 16:59:46 -05:00
Joel Martin 3018cf8c1a websockify.js: executable, fix usage statement. 2012-10-26 18:01:05 -05:00
Joel Martin 6a126405bd websockify.js: binary data, better logs and err handling.
This version requires a patched version of einaros/ws that can be
found here: https://github.com/kanaka/ws You can use the patched
version like this:

    cd websockify/other
    git clone https://github.com/kanaka/ws
    npm link ./ws

Once the upstream 'ws' module supports subprotocol negotiation then
this will no longer be necessary.

Changes:
- Adds support for binary data and subprotocol negotiation of 'base64'
  vs 'binary' with 'binary' preferred if the client offers it.
- Add client address to log messages.
- Close the target when the client closes.
- Catch errors when we try and send to a client that is no longer
  connected.
2012-10-26 16:08:47 -05:00
Joel Martin 8b3125bcf3 other/websockify.js: arg cleanup, remove deprecated call.
Change deprecated path.exists call to fs.exists.

Confirmed that this runs with node v0.8.9
2012-09-21 08:19:40 -05:00
Joel Martin 00e9d3bf29 websockify.rb: correct comment, no SSL support yet. 2012-07-24 09:31:26 -05:00
Joel Martin 37c0c80a93 C websockify: add --run-once option. 2012-04-13 10:36:16 -05:00
Joel Martin aef7ab3a57 Clean socket shutdown in C version too.
Related to https://github.com/kanaka/noVNC/issues/58 (supporting Apple
Remote Desktop).
2012-03-23 12:17:50 -05:00
Joel Martin 9fcd92c39a Remove copy of kumina implementation.
The canonical location is https://github.com/kumina/wsproxy

There are now several external implementations of Websockify that
I link to from
https://github.com/kanaka/websockify/wiki/Feature_Matrix
2012-02-23 17:18:10 -06:00
Joel Martin 7ea468b5d7 Node impl to use einaros/ws and support HyBi.
Also adds web serving functionality and Flash policy service.
2012-02-23 17:06:35 -06:00
Joel Martin bea32aebed Handle partial HyBi client frames. Cleanup buffer names.
Significant refactor of decode_hybi() and use of it in do_proxy().
2012-02-03 11:55:03 -06:00