From cb72569d1e3b4f34d0f5dc966aa438f6937f2496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= Date: Tue, 11 Oct 2011 17:25:38 +0200 Subject: [PATCH 01/32] Eggify websockify --- CHANGES.txt | 8 ++++++++ MANIFEST.in | 1 + setup.py | 32 ++++++++++++++++++++++++++++++++ websockify | 5 ++++- 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 CHANGES.txt create mode 100644 MANIFEST.in create mode 100644 setup.py diff --git a/CHANGES.txt b/CHANGES.txt new file mode 100644 index 0000000..ff51822 --- /dev/null +++ b/CHANGES.txt @@ -0,0 +1,8 @@ +Changes +======= + +0.1 (not yet released) +----------------- + + * No change yet. + diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..af7d9f4 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include CHANGES.txt websockify README.md diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..001e3c4 --- /dev/null +++ b/setup.py @@ -0,0 +1,32 @@ +from setuptools import setup, find_packages +import glob +import os + +version = '0.1-dev' +name = 'websockify' +long_description = open("README.md").read() + "\n" + \ + open("CHANGES.txt").read() + "\n" + +setup(name=name, + version=version, + description="Websockify.", + long_description=long_description, + classifiers=[ + "Programming Language :: Python", + ], + keywords='noVNC websockify', + license='LGPLv3', + url="https://github.com/kanaka/websockify", + author="Joel Martin", + author_email="github@martintribe.org", + + packages="", + include_package_data=True, + install_requires=['numpy'], + zip_safe=False, + entry_points={ + 'console_scripts': [ + 'websockify = websockify:websockify_init', + ] + }, + ) diff --git a/websockify b/websockify index 4521a96..e98f692 100755 --- a/websockify +++ b/websockify @@ -213,7 +213,7 @@ Traffic Legend: self.send_close() raise self.EClose(closed) -if __name__ == '__main__': +def websockify_init(): usage = "\n %prog [options]" usage += " [source_addr:]source_port target_addr:target_port" usage += "\n %prog [options]" @@ -280,3 +280,6 @@ if __name__ == '__main__': # Create and start the WebSockets proxy server = WebSocketProxy(**opts.__dict__) server.start_server() + +if __name__ == '__main__': + websockify_init() From e7363f43443deb9982bdb5c3db50eec475584b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= Date: Thu, 13 Oct 2011 15:42:20 +0200 Subject: [PATCH 02/32] Add missing websockify.py symbolic link --- websockify.py | 1 + 1 file changed, 1 insertion(+) create mode 120000 websockify.py diff --git a/websockify.py b/websockify.py new file mode 120000 index 0000000..05b5af4 --- /dev/null +++ b/websockify.py @@ -0,0 +1 @@ +websockify \ No newline at end of file From c3c6a7203911d5e3d5a62c6f146774c1f6c4dd7e Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 25 Oct 2011 17:02:04 -0500 Subject: [PATCH 03/32] Update kumina with HyBi-10+ support. Pull 63aa9ce07 from https://github.com/kumina/wsproxy --- README.md | 6 +- other/kumina.c | 472 ++++++++++++++++++++++++++++--------------------- 2 files changed, 278 insertions(+), 200 deletions(-) diff --git a/README.md b/README.md index 83a1b3d..954074b 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ implementations: yes yes no - no + via inetd yes Daemon @@ -106,7 +106,7 @@ implementations: yes no no - no + via inetd yes SSL wss @@ -178,7 +178,7 @@ implementations: no no no - no + yes yes diff --git a/other/kumina.c b/other/kumina.c index 2a02e8a..54b2476 100644 --- a/other/kumina.c +++ b/other/kumina.c @@ -32,20 +32,33 @@ #include #include #include +#include #include #include #include #include #include +#include -static pid_t other; +#define MAXOFRAME UINT16_MAX +#define HYBI10_ACCEPTHDRLEN 29 + +#ifdef DEBUG +#define DPRINTF(fmt, ...) fprintf(stderr, fmt "\n", ## __VA_ARGS__) +#else +#define DPRINTF(fmt, ...) +#endif + +static pid_t other = -1; +static int hybi10 = 0; static void die(int exitcode) { - kill(other, SIGTERM); + if (other != -1) + kill(other, SIGTERM); exit(exitcode); } @@ -53,11 +66,11 @@ static void usage(void) { - fprintf(stderr, "usage: kumina minport maxport\n"); + fprintf(stderr, "usage: wsproxy minport maxport\n"); exit(1); } -static int +static unsigned char pgetc(FILE *fp) { int ret; @@ -68,113 +81,8 @@ pgetc(FILE *fp) return (ret); } -#if 0 /* UTF-8 */ - static void -pputc(FILE *fp, unsigned char ch) -{ - int ret; - - ret = fputc(ch, fp); - if (ret == EOF) - die(0); -} - -static void -decode(FILE *in, int outfd) -{ - FILE *out; - int ch; - unsigned char och; - - out = fdopen(outfd, "w"); - if (out == NULL) { - perror("fdopen"); - die(1); - } - - for (;;) { - /* Frame header. */ - ch = pgetc(in); - if (ch != 0x00) { - fprintf(stderr, "malformed frame header received\n"); - die(1); - } - - for (;;) { - /* Frame trailer. */ - ch = pgetc(in); - if (ch == EOF) - die(0); - if (ch == 0xff) { - fflush(out); - break; - } - - /* UTF-8 character, only allowing points 0 to 255. */ - if (ch < 0x80) - och = ch; - else if ((ch & 0xf3) == 0xc0) { - och = ch << 6; - ch = pgetc(in); - if ((ch & 0xc0) != 0x80) - goto malformed; - och |= ch & 0x3f; - } else - goto malformed; - pputc(out, och); - } - } - -malformed: - fprintf(stderr, "malformed UTF-8 sequence received\n"); - die(1); -} - -static int -encode(int in, int out) -{ - unsigned char inbuf[512]; - unsigned char outbuf[sizeof inbuf * 2 + 2]; - unsigned char *op; - ssize_t len, i; - - for (;;) { - len = read(in, inbuf, sizeof inbuf); - if (len == -1) { - perror("read"); - die(1); - } else if (len == 0) - die(0); - - op = outbuf; - /* Frame header. */ - *op++ = 0x00; - for (i = 0; i < len; i++) { - /* Encode data as UTF-8. */ - if (inbuf[i] < 0x80) - *op++ = inbuf[i]; - else { - *op++ = 0xc0 | (inbuf[i] >> 6); - *op++ = 0x80 | (inbuf[i] & 0x3f); - } - } - /* Frame trailer. */ - *op++ = 0xff; - assert(op <= outbuf + sizeof outbuf); - len = write(out, outbuf, op - outbuf); - if (len == -1) { - perror("write"); - die(1); - } else if (len != op - outbuf) - die(0); - } -} - -#else /* base64 */ - -static void -putb64(FILE *out, char *inb, size_t *inblen) +putb64(FILE *out, const char *inb, size_t *inblen) { char inbuf[5] = { 0 }; unsigned char outbuf[3]; @@ -187,7 +95,7 @@ putb64(FILE *out, char *inb, size_t *inblen) memcpy(inbuf, inb, *inblen); outbuflen = b64_pton(inbuf, outbuf, sizeof outbuf); if (outbuflen <= 0) { - fprintf(stderr, "invalid Base64 data\n"); + DPRINTF("invalid Base64 data"); die(1); } if (fwrite(outbuf, outbuflen, 1, out) != 1) { @@ -197,11 +105,178 @@ putb64(FILE *out, char *inb, size_t *inblen) *inblen = 0; } +/* + * Support for HyBi10. + */ + static void -decode(FILE *in, int outfd) +hybi10_calcaccepthdr(const char *key, char *out) +{ + SHA_CTX c; + unsigned char hash[SHA_DIGEST_LENGTH]; + int r; + + SHA1_Init(&c); + SHA1_Update(&c, key, strlen(key)); + SHA1_Update(&c, "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", 36); + SHA1_Final(hash, &c); + + r = b64_ntop(hash, sizeof hash, out, HYBI10_ACCEPTHDRLEN); + assert(r == HYBI10_ACCEPTHDRLEN - 1); +} + +static uint64_t +hybi10_getlength(FILE *in) +{ + uint64_t len; + int lenlen; + unsigned char ch; + + ch = pgetc(in); + if (!(ch & 0x80)) { + DPRINTF("mask bit not set"); + die(1); + } + ch &= ~0x80; + + /* Two or eight bytes of input length? */ + switch (ch) { + case 126: + lenlen = 2; + break; + case 127: + lenlen = 8; + break; + default: + /* Small packet, length encoded directly. */ + return (ch); + } + + len = 0; + while (lenlen-- > 0) + len = len << 8 | pgetc(in); + return (len); +} + +static void +hybi10_getmasks(FILE *in, unsigned char masks[4]) +{ + int i; + + for (i = 0; i < 4; i++) + masks[i] = pgetc(in); +} + +static void +hybi10_decode(FILE *in, int outfd) { FILE *out; - int ch; + unsigned char ch, masks[4]; + char inb[4]; + size_t inblen = 0; + uint64_t i, framelen; + + out = fdopen(outfd, "w"); + if (out == NULL) { + perror("fdopen"); + die(1); + } + + for (;;) { + /* Frame header. */ + ch = pgetc(in); + if (ch != 0x81) { + DPRINTF("unsupported packet received: %#hhx", ch); + die(1); + } + + /* Payload length. */ + framelen = hybi10_getlength(in); + hybi10_getmasks(in, masks); + for (i = 0; i < framelen; i++) { + ch = pgetc(in) ^ masks[i % 4]; + if (!((ch >= 'A' && ch <= 'Z') || + (ch >= 'a' && ch <= 'z') || + (ch >= '0' && ch <= '9') || + ch == '+' || ch == '/' || ch == '=')) { + DPRINTF("non-Base64 character received"); + die(1); + } + + /* Base64 character. */ + inb[inblen++] = ch; + if (inblen == sizeof inb) + putb64(out, inb, &inblen); + } + + /* Frame trailer. */ + putb64(out, inb, &inblen); + if (fflush(out) == -1) { + perror("fflush"); + die(1); + } + } +} + +static void +hybi10_encode(int in, int out) +{ + unsigned char inbuf[MAXOFRAME / 4 * 3]; + char outbuf[MAXOFRAME + 5]; /* Four-byte header + nul. */ + ssize_t len, wlen; + + for (;;) { + len = read(in, inbuf, sizeof inbuf); + if (len == -1) { + perror("read"); + die(1); + } else if (len == 0) + die(0); + + /* Encode data as Base64. */ + len = b64_ntop(inbuf, len, outbuf + 4, sizeof outbuf - 4); + assert(len > 0 && len <= MAXOFRAME); + /* Frame header. */ + outbuf[0] = 0x81; + outbuf[1] = 126; + outbuf[2] = len >> 8; + outbuf[3] = len; + len += 4; + + wlen = write(out, outbuf, len); + if (wlen == -1) { + perror("write"); + die(1); + } else if (wlen != len) + die(0); + } +} + +/* + * Support for Hixie 76. + */ + +static void +hixie76_calcresponse(uint32_t key1, uint32_t key2, const char *key3, char *out) +{ + MD5_CTX c; + char in[16] = { + key1 >> 24, key1 >> 16, key1 >> 8, key1, + key2 >> 24, key2 >> 16, key2 >> 8, key2, + key3[0], key3[1], key3[2], key3[3], + key3[4], key3[5], key3[6], key3[7] + }; + + MD5_Init(&c); + MD5_Update(&c, (void *)in, sizeof in); + MD5_Final((void *)out, &c); +} + +static void +hixie76_decode(FILE *in, int outfd) +{ + FILE *out; + unsigned char ch; char inb[4]; size_t inblen = 0; @@ -215,32 +290,16 @@ decode(FILE *in, int outfd) /* Frame header. */ ch = pgetc(in); if (ch != 0x00) { - fprintf(stderr, "malformed frame header received\n"); + DPRINTF("unsupported packet received: %#hhx", ch); die(1); } - for (;;) { - ch = pgetc(in); - if (ch == EOF) { - putb64(out, inb, &inblen); - die(0); - } - /* Frame trailer. */ - if (ch == 0xff) { - putb64(out, inb, &inblen); - if (fflush(out) == -1) { - perror("fflush"); - die(1); - } - break; - } - + while ((ch = pgetc(in)) != 0xff) { if (!((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || ch == '+' || ch == '/' || ch == '=')) { - fprintf(stderr, - "non-Base64 character received\n"); + DPRINTF("non-Base64 character received"); die(1); } @@ -249,14 +308,21 @@ decode(FILE *in, int outfd) if (inblen == sizeof inb) putb64(out, inb, &inblen); } + + /* Frame trailer. */ + putb64(out, inb, &inblen); + if (fflush(out) == -1) { + perror("fflush"); + die(1); + } } } -static int -encode(int in, int out) +static void +hixie76_encode(int in, int out) { - unsigned char inbuf[512]; - char outbuf[sizeof inbuf * 2 + 2]; + unsigned char inbuf[MAXOFRAME / 4 * 3]; + char outbuf[MAXOFRAME + 2]; ssize_t len, wlen; for (;;) { @@ -270,22 +336,20 @@ encode(int in, int out) /* Frame header. */ outbuf[0] = 0x00; /* Encode data as Base64. */ - len = b64_ntop(inbuf, len, outbuf + 1, sizeof outbuf - 1) + 1; - assert(len >= 1); - /* Frame footer. */ - outbuf[len++] = 0xff; + len = b64_ntop(inbuf, len, outbuf + 1, sizeof outbuf - 1); + assert(len > 0 && len <= MAXOFRAME); + /* Frame trailer. */ + outbuf[len + 1] = 0xff; - wlen = write(out, outbuf, len); + wlen = write(out, outbuf, len + 2); if (wlen == -1) { perror("write"); die(1); - } else if (wlen != len) + } else if (wlen != len + 2) die(0); } } -#endif - static char * do_strndup(const char *str, size_t n) { @@ -331,44 +395,19 @@ parsehdrkey(const char *key) return (spaces == 0 ? 0 : sum / spaces); } -static void -calcresponse(uint32_t key1, uint32_t key2, const char *key3, char *out) -{ - MD5_CTX c; - char in[16]; - - in[0] = key1 >> 24; - in[1] = key1 >> 16; - in[2] = key1 >> 8; - in[3] = key1; - in[4] = key2 >> 24; - in[5] = key2 >> 16; - in[6] = key2 >> 8; - in[7] = key2; - memcpy(in + 8, key3, 8); - - MD5_Init(&c); - MD5_Update(&c, (void *)in, sizeof in); - MD5_Final((void *)out, &c); -} - static void eat_flash_magic(void) { static const char flash_magic[] = ""; - ssize_t i; - int ch; + size_t i; + char ch; for (i = 0; i < sizeof flash_magic - 1; i++) { - ch = getchar(); - if (ch == EOF) { - perror("getc"); - exit(1); - } + ch = pgetc(stdin); /* Not a Flash applet. Roll back. */ if (ch != flash_magic[i]) { ungetc(ch, stdin); - while (--i >= 0) + while (i-- > 0) ungetc(flash_magic[i], stdin); return; } @@ -388,7 +427,8 @@ main(int argc, char *argv[]) struct sockaddr_in sa_in; struct sockaddr_in6 sa_in6; } sa; - char line[512], key3[8], response[16], *host = NULL, *origin = NULL; + char line[512], key3[8], *host = NULL, + *origin = NULL, *key = NULL, *protocol; unsigned long minport, maxport, port; uint32_t key1 = 0, key2 = 0; socklen_t salen; @@ -423,31 +463,48 @@ main(int argc, char *argv[]) return (1); } if (strncmp(line, "GET /", 5) != 0) { - fprintf(stderr, "malformed HTTP header received\n"); + DPRINTF("malformed HTTP header received"); return (1); } - if (strncmp(line, "GET /kumina-monitoring/ ", 25) == 0) + if (strncmp(line, "GET /wsproxy-monitoring/ ", 25) == 0) { monitoring = 1; - port = strtoul(line + 5, NULL, 10); - if (!monitoring && (port < minport || port > maxport)) { - fprintf(stderr, "port not allowed\n"); - return (1); + port = 0; /* Keep compiler happy. */ + } else if (minport == maxport) { + /* Simply ignore URL and connect to a single host. */ + port = minport; + } else { + /* Multiplexing mode. Use port number in URL. */ + port = strtoul(line + 5, NULL, 10); + if (port < minport || port > maxport) { + DPRINTF("port not allowed"); + return (1); + } } /* Parse HTTP headers. */ do { if (fgets(line, sizeof line, stdin) == NULL) { - fprintf(stderr, "partial HTTP header received\n"); + DPRINTF("partial HTTP header received"); return (1); } if (strncasecmp(line, "Host: ", 6) == 0) { host = parsestring(line + 6); } else if (strncasecmp(line, "Origin: ", 8) == 0) { origin = parsestring(line + 8); + } else if (strncasecmp(line, "Sec-WebSocket-Key: ", 19) == 0) { + hybi10 = 1; + key = parsestring(line + 19); } else if (strncasecmp(line, "Sec-WebSocket-Key1: ", 20) == 0) { key1 = parsehdrkey(line + 20); } else if (strncasecmp(line, "Sec-WebSocket-Key2: ", 20) == 0) { key2 = parsehdrkey(line + 20); + } else if (strncasecmp(line, "Sec-WebSocket-Protocol: ", + 24) == 0) { + protocol = parsestring(line + 24); + if (strcmp(protocol, "base64") != 0) { + DPRINTF("Unsupported protocol: %s", protocol); + return (1); + } } } while (strcmp(line, "\n") != 0 && strcmp(line, "\r\n") != 0); @@ -461,10 +518,11 @@ main(int argc, char *argv[]) } /* Eight byte payload. */ - if (fread(key3, sizeof key3, 1, stdin) != 1) { - fprintf(stderr, "key data missing\n"); - return (1); - } + if (!hybi10) + if (fread(key3, sizeof key3, 1, stdin) != 1) { + DPRINTF("key data missing"); + return (1); + } /* Use our own address. Fall back to 127.0.0.1 on failure. */ salen = sizeof sa; @@ -483,7 +541,7 @@ main(int argc, char *argv[]) break; default: /* Unknown protocol. */ - fprintf(stderr, "unsupported network protocol\n"); + DPRINTF("unsupported network protocol"); return (1); } s = socket(sa.sa.sa_family, SOCK_STREAM, 0); @@ -496,15 +554,29 @@ main(int argc, char *argv[]) return (1); } - /* Send HTTP response. */ - calcresponse(key1, key2, key3, response); - printf("HTTP/1.1 101 WebSocket Protocol Handshake\r\n" - "Upgrade: WebSocket\r\n" - "Connection: Upgrade\r\n" - "Sec-WebSocket-Origin: %s\r\n" - "Sec-WebSocket-Location: ws://%s/%lu\r\n" - "Sec-WebSocket-Protocol: base64\r\n\r\n", origin, host, port); - fwrite(response, sizeof response, 1, stdout); + /* Send HTTP response, based on protocol version. */ + if (hybi10) { + char accepthdr[HYBI10_ACCEPTHDRLEN]; + + hybi10_calcaccepthdr(key, accepthdr); + printf("HTTP/1.1 101 Switching Protocols\r\n" + "Upgrade: websocket\r\n" + "Connection: Upgrade\r\n" + "Sec-WebSocket-Accept: %s\r\n" + "Sec-WebSocket-Protocol: base64\r\n\r\n", accepthdr); + } else { + char response[MD5_DIGEST_LENGTH]; + + hixie76_calcresponse(key1, key2, key3, response); + printf("HTTP/1.1 101 WebSocket Protocol Handshake\r\n" + "Upgrade: WebSocket\r\n" + "Connection: Upgrade\r\n" + "Sec-WebSocket-Origin: %s\r\n" + "Sec-WebSocket-Location: ws://%s/%lu\r\n" + "Sec-WebSocket-Protocol: base64\r\n\r\n", + origin, host, port); + fwrite(response, sizeof response, 1, stdout); + } fflush(stdout); /* Spawn child process for bi-directional pipe. */ @@ -514,10 +586,16 @@ main(int argc, char *argv[]) return (1); } else if (pid == 0) { other = getppid(); - decode(stdin, s); + if (hybi10) + hybi10_decode(stdin, s); + else + hixie76_decode(stdin, s); } else { other = pid; - encode(s, STDOUT_FILENO); + if (hybi10) + hybi10_encode(s, STDOUT_FILENO); + else + hixie76_encode(s, STDOUT_FILENO); } assert(0); } From b8852140112cd5433de6c0f89899c40b16667bc5 Mon Sep 17 00:00:00 2001 From: Chris Gordon Date: Fri, 4 Nov 2011 13:52:18 +1000 Subject: [PATCH 04/32] Windows websocket server service wrapper. Signed-off-by: Chris Gordon --- Windows/Windows Service Readme.txt | 36 +++++ .../Program.cs | 24 ++++ .../ProjectInstaller.Designer.cs | 61 +++++++++ .../ProjectInstaller.cs | 19 +++ .../ProjectInstaller.resx | 129 ++++++++++++++++++ .../Properties/AssemblyInfo.cs | 36 +++++ .../Service1.Designer.cs | 37 +++++ .../Service1.cs | 41 ++++++ .../noVNC Websocket.csproj | 75 ++++++++++ .../noVNC Websocket.sln | 20 +++ .../noVNC Websocket.suo | Bin 0 -> 16896 bytes ...gnTimeResolveAssemblyReferencesInput.cache | Bin 0 -> 6153 bytes ...mand Websocket.csproj.FileListAbsolute.txt | 8 ++ ...mmand_Websocket.ProjectInstaller.resources | Bin 0 -> 180 bytes .../obj/x86/Debug/ResGen.read.1.tlog | Bin 0 -> 7158 bytes .../obj/x86/Debug/ResGen.write.1.tlog | Bin 0 -> 1182 bytes 16 files changed, 486 insertions(+) create mode 100644 Windows/Windows Service Readme.txt create mode 100644 Windows/noVNC Websocket Service Project/Program.cs create mode 100644 Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs create mode 100644 Windows/noVNC Websocket Service Project/ProjectInstaller.cs create mode 100644 Windows/noVNC Websocket Service Project/ProjectInstaller.resx create mode 100644 Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs create mode 100644 Windows/noVNC Websocket Service Project/Service1.Designer.cs create mode 100644 Windows/noVNC Websocket Service Project/Service1.cs create mode 100644 Windows/noVNC Websocket Service Project/noVNC Websocket.csproj create mode 100644 Windows/noVNC Websocket Service Project/noVNC Websocket.sln create mode 100644 Windows/noVNC Websocket Service Project/noVNC Websocket.suo create mode 100644 Windows/noVNC Websocket Service Project/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache create mode 100644 Windows/noVNC Websocket Service Project/obj/x86/Debug/MELT Command Websocket.csproj.FileListAbsolute.txt create mode 100644 Windows/noVNC Websocket Service Project/obj/x86/Debug/MELT_Command_Websocket.ProjectInstaller.resources create mode 100644 Windows/noVNC Websocket Service Project/obj/x86/Debug/ResGen.read.1.tlog create mode 100644 Windows/noVNC Websocket Service Project/obj/x86/Debug/ResGen.write.1.tlog diff --git a/Windows/Windows Service Readme.txt b/Windows/Windows Service Readme.txt new file mode 100644 index 0000000..5feeb53 --- /dev/null +++ b/Windows/Windows Service Readme.txt @@ -0,0 +1,36 @@ +----------------------------------- +Windows noVNC Websockify Service +----------------------------------- + +The "noVNC Websocket Service.exe" file is a windows service wrapper created with Visual Studio 2010 to create a windows service to start stop the noVNC Websocket Server. All files used to create the wrapper can be found in 'noVNC Websocket Service Project' folder. + +--------------------------- +Installation +--------------------------- + +1. This service requires websockify.exe be in the same directory. Instructions on how to compile websockify python script as a windows executable can be found here: +https://github.com/kanaka/noVNC/wiki/Compiling-Websockify-to-Windows-Executable + +2.To add this service to a Windows PC you need to run the commandline as administrator and then run this line: + +sc create "noVNC Websocket Server" binPath= "PATH TO noVNC eg C:\noVNC\utils\Windows\Websocket Service.exe" DisplayName= "noVNC Websocket Server" + +3 .Once this is run you will be able to access the service via Control Panel > Admin Tools > Services. In here you can specify whether you want the service to run automatically and start at stop the service. + +--------------------------- +Configuration +--------------------------- +The file noVNCConfig.ini must be in the same directory as "noVNC Websocket Service.exe". + +This file contains a single line which is the websockify.exe statup arguements. An example is: +192.168.0.1:5901 192.168.0.1:5900 + +All websockify supported arguements will work if added here. + +--------------------------- +Deletion +--------------------------- + +You can delete the service at any time by running the commandline as admin and using this command: +sc delete "noVNC Websocket Server". + diff --git a/Windows/noVNC Websocket Service Project/Program.cs b/Windows/noVNC Websocket Service Project/Program.cs new file mode 100644 index 0000000..2d07c33 --- /dev/null +++ b/Windows/noVNC Websocket Service Project/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.ServiceProcess; +using System.Text; + +namespace MELT_Command_Websocket +{ + static class Program + { + /// + /// The main entry point for the application. + /// + static void Main() + { + ServiceBase[] ServicesToRun; + ServicesToRun = new ServiceBase[] + { + new Service1() + }; + ServiceBase.Run(ServicesToRun); + } + } +} diff --git a/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs b/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs new file mode 100644 index 0000000..3dab5bb --- /dev/null +++ b/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs @@ -0,0 +1,61 @@ +namespace MELT_Command_Websocket +{ + partial class ProjectInstaller + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller(); + this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller(); + // + // serviceProcessInstaller1 + // + this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.NetworkService; + this.serviceProcessInstaller1.Installers.AddRange(new System.Configuration.Install.Installer[] { + this.serviceInstaller1}); + this.serviceProcessInstaller1.Password = null; + this.serviceProcessInstaller1.Username = null; + // + // serviceInstaller1 + // + this.serviceInstaller1.Description = "noVNC Websocket Service"; + this.serviceInstaller1.DisplayName = "noVNC Websocket Service"; + this.serviceInstaller1.ServiceName = "noVNC Websocket Service"; + this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic; + // + // ProjectInstaller + // + this.Installers.AddRange(new System.Configuration.Install.Installer[] { + this.serviceProcessInstaller1}); + + } + + #endregion + + private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; + private System.ServiceProcess.ServiceInstaller serviceInstaller1; + } +} \ No newline at end of file diff --git a/Windows/noVNC Websocket Service Project/ProjectInstaller.cs b/Windows/noVNC Websocket Service Project/ProjectInstaller.cs new file mode 100644 index 0000000..783bb15 --- /dev/null +++ b/Windows/noVNC Websocket Service Project/ProjectInstaller.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Configuration.Install; +using System.Linq; + + +namespace MELT_Command_Websocket +{ + [RunInstaller(true)] + public partial class ProjectInstaller : System.Configuration.Install.Installer + { + public ProjectInstaller() + { + InitializeComponent(); + } + } +} diff --git a/Windows/noVNC Websocket Service Project/ProjectInstaller.resx b/Windows/noVNC Websocket Service Project/ProjectInstaller.resx new file mode 100644 index 0000000..fbda1ae --- /dev/null +++ b/Windows/noVNC Websocket Service Project/ProjectInstaller.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 56 + + + 196, 17 + + + False + + \ No newline at end of file diff --git a/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs b/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..832319e --- /dev/null +++ b/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MELT Command Websocket")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("MELT Command Websocket")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2011")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5ab831cb-6852-4ce1-849c-b26725b0e10b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Windows/noVNC Websocket Service Project/Service1.Designer.cs b/Windows/noVNC Websocket Service Project/Service1.Designer.cs new file mode 100644 index 0000000..c569eca --- /dev/null +++ b/Windows/noVNC Websocket Service Project/Service1.Designer.cs @@ -0,0 +1,37 @@ +namespace MELT_Command_Websocket +{ + partial class Service1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.ServiceName = "Service1"; + } + + #endregion + } +} diff --git a/Windows/noVNC Websocket Service Project/Service1.cs b/Windows/noVNC Websocket Service Project/Service1.cs new file mode 100644 index 0000000..ce94bf6 --- /dev/null +++ b/Windows/noVNC Websocket Service Project/Service1.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Linq; +using System.ServiceProcess; +using System.Text; +using System.IO; + +namespace MELT_Command_Websocket +{ + public partial class Service1 : ServiceBase + { + Process websockify; + public Service1() + { + InitializeComponent(); + } + + protected override void OnStart(string[] args) + { + + string configpath = AppDomain.CurrentDomain.BaseDirectory + "\\noVNCConfig.ini"; + string sockifypath = AppDomain.CurrentDomain.BaseDirectory + "\\websockify.exe"; + //Load commandline arguements from config file. + StreamReader streamReader = new StreamReader(configpath); + string arguements = streamReader.ReadLine(); + streamReader.Close(); + + //Start websockify. + websockify = System.Diagnostics.Process.Start(sockifypath, arguements); + } + + protected override void OnStop() + { + //Service stopped. Close websockify. + websockify.Kill(); + } + } +} diff --git a/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj b/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj new file mode 100644 index 0000000..368d183 --- /dev/null +++ b/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj @@ -0,0 +1,75 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {6B86AE7B-6BBD-4E74-8802-5995E8B6D27D} + WinExe + Properties + noVNC_Websocket_Service + noVNC Websocket Service + v3.5 + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + Component + + + ProjectInstaller.cs + + + Component + + + Service1.cs + + + + + + + ProjectInstaller.cs + + + + + \ No newline at end of file diff --git a/Windows/noVNC Websocket Service Project/noVNC Websocket.sln b/Windows/noVNC Websocket Service Project/noVNC Websocket.sln new file mode 100644 index 0000000..140de1b --- /dev/null +++ b/Windows/noVNC Websocket Service Project/noVNC Websocket.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "noVNC Websocket", "noVNC Websocket.csproj", "{6B86AE7B-6BBD-4E74-8802-5995E8B6D27D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6B86AE7B-6BBD-4E74-8802-5995E8B6D27D}.Debug|x86.ActiveCfg = Debug|x86 + {6B86AE7B-6BBD-4E74-8802-5995E8B6D27D}.Debug|x86.Build.0 = Debug|x86 + {6B86AE7B-6BBD-4E74-8802-5995E8B6D27D}.Release|x86.ActiveCfg = Release|x86 + {6B86AE7B-6BBD-4E74-8802-5995E8B6D27D}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Windows/noVNC Websocket Service Project/noVNC Websocket.suo b/Windows/noVNC Websocket Service Project/noVNC Websocket.suo new file mode 100644 index 0000000000000000000000000000000000000000..b41b424513ea7f6eb4591e84ae502302cd372f74 GIT binary patch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oJsvyC~q-8nG*@Wb0H094x zj2)d-hdr+^t2umYa>O=d+7g!kFnZRt4%S=s7CGX(>DOv(dKMl8{FeKF5PE_Rtm`a$8Hw;Z%l3->uhZFXY~bCe zuKG6={}To_c3O9DZ23D89eW>NW3KNg^y+Zxb?P$W{)!X8we^94 z4T`y*oV3Qb2=(MV$3CTP<8hA+XKdrU^BczA-(zpFUB4G3`b6{9lCDA|s3%#yzzfG-E#F)d7{22>93dsyYoj)YA uJu-|zHgSH#*n1Lte`-k51%SSrVf;~W(%1Lbb!Pal_vq`)5WO+35B&>JiSS7P literal 0 HcmV?d00001 diff --git a/Windows/noVNC Websocket Service Project/obj/x86/Debug/MELT Command Websocket.csproj.FileListAbsolute.txt b/Windows/noVNC Websocket Service Project/obj/x86/Debug/MELT Command Websocket.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ba42705 --- /dev/null +++ b/Windows/noVNC Websocket Service Project/obj/x86/Debug/MELT Command Websocket.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +c:\users\gordoncj\documents\visual studio 2010\Projects\MELT Command Websocket\MELT Command Websocket\bin\Debug\MELT Command Websocket.exe +c:\users\gordoncj\documents\visual studio 2010\Projects\MELT Command Websocket\MELT Command Websocket\bin\Debug\MELT Command Websocket.pdb +c:\users\gordoncj\documents\visual studio 2010\Projects\MELT Command Websocket\MELT Command Websocket\obj\x86\Debug\ResolveAssemblyReference.cache +c:\users\gordoncj\documents\visual studio 2010\Projects\MELT Command Websocket\MELT Command Websocket\obj\x86\Debug\MELT_Command_Websocket.ProjectInstaller.resources +c:\users\gordoncj\documents\visual studio 2010\Projects\MELT Command Websocket\MELT Command Websocket\obj\x86\Debug\ResGen.read.1.tlog +c:\users\gordoncj\documents\visual studio 2010\Projects\MELT Command Websocket\MELT Command Websocket\obj\x86\Debug\ResGen.write.1.tlog +c:\users\gordoncj\documents\visual studio 2010\Projects\MELT Command Websocket\MELT Command Websocket\obj\x86\Debug\MELT Command Websocket.exe +c:\users\gordoncj\documents\visual studio 2010\Projects\MELT Command Websocket\MELT Command Websocket\obj\x86\Debug\MELT Command Websocket.pdb diff --git a/Windows/noVNC Websocket Service Project/obj/x86/Debug/MELT_Command_Websocket.ProjectInstaller.resources b/Windows/noVNC Websocket Service Project/obj/x86/Debug/MELT_Command_Websocket.ProjectInstaller.resources new file mode 100644 index 0000000000000000000000000000000000000000..06c24d06c1cab750788146ce052b37770f3fa530 GIT binary patch literal 180 zcmX?i>is@O1_p+SK%5g?SzMBus~417oL^d$oLUTL1*ImYq!#HY5o5s9Z>(rOKv(L9@3huMnx zh_wa3KHHUj;)-nvr3Ey6_9y#9W5&G0$^wdWCvH+5J=uGE2Ny}c0kilom`VCMzlRRBkc`>i<#~c;%(~|=ZFm-f^46}|vqs`B z@^?xFX4cn{$td5atq4NZ1(bdYcAbQ7Wf z59p>N0K#&D3PCyW8ld}#aJW%Iyson-WIUR0;HN0l#R z<(7|mXyU8WRJ~UIooD9J=;Z5khu~S+k6J5T1|Ip4bl1GqlGvv>B7ar%lZQ)pb$;EH z#tuccUw0l7Nv1jHc!n>;oK_F7m=fcBMtQEzbY$DgsJGok#3ZKb)Q^crBQ!K}bn2}Z z!A;Rxyn95@82(#0D&Nf5A23F*SiOvV;!atLXwGi=eF&W?(#6j)TXFjeURzf0`16S3 zL#|sFOM66kpXYrSSCtb&5Urek6w`%kc`>+@H+6!KN3|pZ43K1jJbf&%-(tsQ%Kcd~ zu}e8;z3mj$@y+^M{`@KuCO)rR)pb7jQb&~W9h$wA5yxD*2Y8rI&dq!6l(p&_BxYx^ z_K;+<(+$2{mPTCu2dqh4@Sgom8d0^S*r8E1oT^IQ%knhg8(D;>tltjv%wh%Cgv3cr zo<#bz=0A__ vwwXRP+gYjOZhOCcA7AV-nm7$@@0a}_PTn4AM^&`Tp_O%WUw~4iRlVOI$`0PM literal 0 HcmV?d00001 diff --git a/Windows/noVNC Websocket Service Project/obj/x86/Debug/ResGen.write.1.tlog b/Windows/noVNC Websocket Service Project/obj/x86/Debug/ResGen.write.1.tlog new file mode 100644 index 0000000000000000000000000000000000000000..7affad4b461b07049d870c442477a0b104990e95 GIT binary patch literal 1182 zcmds#u?~Vj5Jaao@gMjCq87&3DG-AKXAqEr$p8O@`W6c#!GcDO#U0Du?Cjm_+^!b| zTB}j1lOpBpjdpTGA$!K@o{Yr-m=sK=qC-`R`Ig!!kw;VzhvXc83(YiVH9ErN;E1Sy z)EP%Y?2&OWrZ8kwdOCBmg~@syhzsh+pIR^{LjlB%Gso9 zt+ebWW?Gia@~L6lQ@kBe-0w~7y@n3<97faA)cm}YGMrL%9v$+IdD3QXKDApmAjjc< O+f8F%GZz1SN8JHssH-dh literal 0 HcmV?d00001 From 3d99252956dac884ac2abd71e7f4b25d0e71b98b Mon Sep 17 00:00:00 2001 From: Chris Gordon Date: Fri, 4 Nov 2011 14:00:54 +1000 Subject: [PATCH 05/32] Update Windows/Windows Service Readme.txt --- Windows/Windows Service Readme.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Windows/Windows Service Readme.txt b/Windows/Windows Service Readme.txt index 5feeb53..0b1a4af 100644 --- a/Windows/Windows Service Readme.txt +++ b/Windows/Windows Service Readme.txt @@ -4,6 +4,9 @@ Windows noVNC Websockify Service The "noVNC Websocket Service.exe" file is a windows service wrapper created with Visual Studio 2010 to create a windows service to start stop the noVNC Websocket Server. All files used to create the wrapper can be found in 'noVNC Websocket Service Project' folder. +To download the precomipled executables please grab the zip in the downloads section of websockify project: +https://github.com/kanaka/websockify + --------------------------- Installation --------------------------- From ac9bb7eec6c8b94f8d3b60fa149963c48c87537e Mon Sep 17 00:00:00 2001 From: Chris Gordon Date: Fri, 4 Nov 2011 14:01:07 +1000 Subject: [PATCH 06/32] Update Windows/Windows Service Readme.txt --- Windows/Windows Service Readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Windows/Windows Service Readme.txt b/Windows/Windows Service Readme.txt index 0b1a4af..1ddc2f8 100644 --- a/Windows/Windows Service Readme.txt +++ b/Windows/Windows Service Readme.txt @@ -4,7 +4,7 @@ Windows noVNC Websockify Service The "noVNC Websocket Service.exe" file is a windows service wrapper created with Visual Studio 2010 to create a windows service to start stop the noVNC Websocket Server. All files used to create the wrapper can be found in 'noVNC Websocket Service Project' folder. -To download the precomipled executables please grab the zip in the downloads section of websockify project: +To download the precompiled executables please grab the zip in the downloads section of websockify project: https://github.com/kanaka/websockify --------------------------- From dd7af836afdd61ab703bb608b23dca04d0a7c927 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 15 Dec 2011 15:10:09 -0600 Subject: [PATCH 07/32] Add commented out web-socket-js Flash debug var. --- include/websock.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/websock.js b/include/websock.js index 49141c8..ca17668 100644 --- a/include/websock.js +++ b/include/websock.js @@ -24,6 +24,10 @@ if (window.WebSocket && !window.WEB_SOCKET_FORCE_FLASH) { window.WebSocket = window.MozWebSocket; } else { /* no builtin WebSocket so load web_socket.js */ + + // To enable debug: + // window.WEB_SOCKET_DEBUG=1; + Websock_native = false; (function () { function get_INCLUDE_URI() { From 4ec99665757abaa02610d1948ca56c23fdf94120 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 15 Dec 2011 15:35:11 -0600 Subject: [PATCH 08/32] Support python 3 with SSL/TLS connections. Need to detect leading TLS/SSL character by number too for python 3. --- websocket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocket.py b/websocket.py index 2b3bacc..cf8f423 100644 --- a/websocket.py +++ b/websocket.py @@ -586,7 +586,7 @@ Sec-WebSocket-Accept: %s\r sock.send(s2b(self.policy_response)) raise self.EClose("Sending flash policy response") - elif handshake[0] in ("\x16", "\x80"): + elif handshake[0] in ("\x16", "\x80", 22, 128): # SSL wrap the connection if not ssl: raise self.EClose("SSL connection but no 'ssl' module") From 9f0a08467ac4b2a2ed02354c2e779885e084be60 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Fri, 23 Dec 2011 10:59:56 -0700 Subject: [PATCH 09/32] README: websockify.rb support HyBi. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 954074b..0ed2968 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ implementations: yes no no - no + yes yes yes From 5ed64be820dfda3ff7d39f0c1f60b35f62d0fa58 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 3 Jan 2012 07:41:54 -0700 Subject: [PATCH 10/32] Switch tests/echo.html to use websock.js. --- tests/echo.html | 60 +++++++++++++------------------------------------ tests/echo.py | 2 +- 2 files changed, 17 insertions(+), 45 deletions(-) diff --git a/tests/echo.html b/tests/echo.html index 795a5f6..f7269e0 100644 --- a/tests/echo.html +++ b/tests/echo.html @@ -2,9 +2,10 @@ WebSockets Echo Test - + +