Commit Graph

11 Commits

Author SHA1 Message Date
Joel Martin adfe6ac166 Support for SSL/TLS ('wss://') on both sides.
On the client side, this adds the as3crypto library to web-socket-js
so that the WebSocket 'wss://' scheme is supported which is WebSocket
over SSL/TLS.

Couple of downsides to the fall-back method:

    - This balloons the size of the web-socket-js object from about 12K to 172K.

    - Getting it working required disabling RFC2718 web proxy support
      in web-socket-js.

    - It makes the web-socket-js fallback even slower with the
      encryption overhead.

The server side (wsproxy.py) uses python SSL support. The proxy
automatically detects the type of incoming connection whether flash
policy request, SSL/TLS handshake ('wss://') or plain socket
('ws://').

Also added a check-box to the web page to enable/disabled 'wss://'
encryption.
2010-04-30 16:41:09 -05:00
Joel Martin ca5785f570 Automatically detect TLS/SSL during handshake.
Use MSG_PEEK flag on recv to detect whether we are getting a flash
policy request, an SSL/TLS header, or a plain socket connection.
2010-04-30 16:00:12 -05:00
Joel Martin 07287cfd89 Send seq nums and b64 encode based on query string.
Query string variable 'b64encode' determine if wsproxy b64 encodes the
results. Variable 'seq_num' determines if sequence numbers are
prepended. This way, sequence numbers are only used with the flash
WebSocket proxy.
2010-04-18 20:35:43 -05:00
Joel Martin 10ae1427f8 Handle socket policy response in proxy itself. 2010-04-17 17:53:28 -05:00
Joel Martin 5d8e7ec068 Add web-socket-js support with packet re-ordering.
- web-socket-js is from http://github.com/gimite/web-socket-js. It is
  a flash object that emultates WebSockets.

Unfortunately, events (or packets) from the web-socket-js object can
get re-ordered so we need to know the packet order.

- So wsproxy.py prepends the sequence number of the packet when
  sending.

- If the client receives packets out of order it queues them up and
  scans the queue for the sequence number it's looking for until
  things are back on track. Gross, but hey: It works!

- Also, add packet sequence checking to wstest.*
2010-04-17 17:24:14 -05:00
Joel Martin 5d2c386400 Reassemble partial client packets in wsproxy.py 2010-04-16 16:34:19 -05:00
Joel Martin 64ab5c4ded Working with Raw rectangles and capital letter keys. 2010-04-05 23:54:30 -05:00
Joel Martin 9ec97d8635 Base64 encode/decode for client Javascript. 2010-04-02 19:16:25 -05:00
Joel Martin 65e27ddd4c First RFB protocol stub implementation.
- Requires wsproxy to proxy to the VNC server.
2010-04-01 11:36:22 -05:00
Joel Martin ce0e28c7d9 Some wsproxy simplifications. 2010-03-31 19:37:49 -05:00
Joel Martin 3292c4a995 Web Socket to TCP socket proxy and HTML interface.
- wsproxy.py: creates a web sockets to TCP socket proxy.
- interact.html: prints received Web Sockets data and has text box to
  send strings.
2010-03-31 18:21:03 -05:00