24 Commits

Author SHA1 Message Date
Joel Martin
ee24bcc8f7 Remove psuedo-UTF8 encoding.
It's less efficient on average that base64 (150% vs 133%). It's
non-standard (0 shifted to 256 before encoding). And I rarely use it.
2010-08-27 12:10:09 -05:00
Joel Martin
8f0df48f82 Add Javascript variable container to record data.
- This allows the recorded data to be immediately usable by
  tests/vnc_playback.html
2010-08-12 09:50:49 -05:00
Joel Martin
3b3bd70c5b Scroll render test and perf speedup.
Turns out when Windows is running in QEMU and a window scroll happens,
there are lots of little hextile rects sent. This is slow in noVNC.

- Some recording/playback improvement.
- Add test harness to drive playback of recordings.
- By pulling off the rect header in one chunk we get a 3X speedup in
  Chrome and a 20% speedup in firefox (specifically for the scroll
  test).
- Also, get rid of some noise from creating timers for handle_message.
  Check to make sure there isn't already a pending timer first.
2010-08-06 16:43:24 -05:00
Joel Martin
70e73ede64 Remove unused imports (sys, ssl) in wsproxy.py 2010-08-04 14:33:32 -05:00
Joel Martin
17af0372fd Python 2.4 compatible imports.
- Fallback to md5 module if hashlib not there.
- Import parse_qsl from cgi where it is in both 2.4 and 2.6
2010-08-04 14:32:10 -05:00
Joel Martin
5e86608503 Fix #19: python2.4 support.
- Replace URL parsing using "".partition() with urlparse module.
2010-08-04 14:18:55 -05:00
Joel Martin
2454451545 WebSockets orderly/clean close frame.
- When a packet with only '\xff\x00' is received, this means the
  client is doing an orderly shutdown. (WebSockets spec version 76)
2010-08-03 13:23:59 -05:00
Joel Martin
17037bee9b Fix listen_port check.
Interestingly, the bug depends on compiler behavior. If local
variables are automatically initialized to 0, then this always caused
the program to error out indicating a failure to parse the listen
port. Otherwise, the test was a no-op (except the rare case where the
memory happened to be zero anyways).

Thanks to Eugen Melnikoff for finding this.
2010-07-17 12:13:54 -05:00
Joel Martin
db6ae6c6a0 Issue #11: daemonize after opening listen port.
The listen port should be opened before daemonizing otherwise if
opening the port fails, the user will get no feedback. The only
complication was that the listen socket needs to not be closed as part
of daemonizing.

Thanks to http://github.com/rickr for finding it.
2010-07-17 12:05:58 -05:00
Joel Martin
07b73e0f0d Launch script and reworked usage in README.md. 2010-07-15 20:18:39 -05:00
Joel Martin
12153f5d1f Remove sequence code in client and proxies. 2010-07-01 12:13:17 -05:00
Joel Martin
c465aef835 Update C proxy to WS protocol version 76.
Pull in LGPL md5.c and md5.h files (written by Ulrich Drepper).

Now both python and C version of the proxy support both protocol 75
and protocol 76 (hybi 00).

Reorganize websocket.py slightly to match websocket.c.
2010-06-30 20:39:41 -05:00
Joel Martin
f9f91e6123 Remove proxy handshake debug. 2010-06-24 18:45:30 -05:00
Joel Martin
a6f6900359 Support WebSockets 76 (hixie-76, hybi-00).
Looks like disabling web-socket-js debug messages by default that we
get a minor speedup.

Python proxy should support both 75 and 76 (00) modes. Also, update ws
test to more reliably hit the WebSockets ordering/drop issue.
2010-06-24 17:04:57 -05:00
Joel Martin
6858f454c9 Update usage and README.md. 2010-06-17 17:50:15 -05:00
Joel Martin
b602faa037 More arg processing fixes. 2010-06-17 17:24:54 -05:00
Joel Martin
835a5180d0 Argument processing fixes. Misc proxy fixes. 2010-06-17 17:05:33 -05:00
Joel Martin
a8a45f7a3c Add daemonization support to wsproxy.*.
Refactor how settings are passed around.
2010-06-17 16:06:18 -05:00
Joel Martin
289f4cb5de Force SSL option to proxies. Use getopt_long. 2010-06-16 13:58:00 -05:00
Joel Martin
9445e483f4 Better C proxy host resolution.
Use getaddrinfo instead of gethostbyname.
2010-06-16 13:11:07 -05:00
Joel Martin
205c22932a Add listen address to proxy (C and python).
This allows forwarding from an external port to the same port on
localhost (loopback). I.e.

./utils/wsproxy `hostname -f`:5901 localhost:5901
2010-06-16 12:37:03 -05:00
Joel Martin
aee38f18d0 Output count for multi-packet decodes. 2010-06-07 14:36:26 -05:00
Joel Martin
7ddb3934c1 Add UTF-8 wire encoding support to C wsproxy. 2010-06-07 13:47:44 -05:00
Joel Martin
a9dd25307f Move wsproxy and web utils into utils/ subdir. 2010-06-07 12:49:57 -05:00