Merge remote branch 'upstream/master'
This commit is contained in:
commit
1eecc7b17a
13
CHANGES.txt
13
CHANGES.txt
|
@ -1,6 +1,19 @@
|
|||
Changes
|
||||
=======
|
||||
|
||||
0.4.1 - Mar 12, 2013
|
||||
--------------------
|
||||
|
||||
* ***NOTE*** : 0.5.0 will drop Hixie protocol support
|
||||
* add include/ directory and remove some dev files from source
|
||||
distribution.
|
||||
|
||||
0.4.0 - Mar 12, 2013
|
||||
--------------------
|
||||
|
||||
* ***NOTE*** : 0.5.0 will drop Hixie protocol support
|
||||
* use Buffer base64 support in Node.js implementation
|
||||
|
||||
0.3.0 - Jan 15, 2013
|
||||
--------------------
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
include CHANGES.txt *.py README.md LICENSE.txt
|
||||
include CHANGES.txt websockify include README.md LICENSE.txt
|
||||
|
|
27
README.md
27
README.md
|
@ -10,24 +10,17 @@ the target in both directions.
|
|||
|
||||
### WebSockets binary data
|
||||
|
||||
Websockify supports all versions of the WebSockets protocol (Hixie and
|
||||
HyBi). The older Hixie versions of the protocol only support UTF-8
|
||||
text payloads. In order to transport binary data over UTF-8 an
|
||||
encoding must used to encapsulate the data within UTF-8.
|
||||
Starting with websockify 0.5.0, only the HyBi / IETF
|
||||
6455 WebSocket protocol is supported.
|
||||
|
||||
With Hixie clients, Websockify uses base64 to encode all traffic to
|
||||
and from the client. This does not affect the data between websockify
|
||||
and the server.
|
||||
|
||||
With HyBi clients, websockify negotiates whether to base64 encode
|
||||
traffic to and from the client via the subprotocol header
|
||||
(Sec-WebSocket-Protocol). The valid subprotocol values are 'binary'
|
||||
and 'base64' and if the client sends both then the server (the python
|
||||
implementation) will prefer 'binary'. The 'binary' subprotocol
|
||||
indicates that the data will be sent raw using binary WebSocket
|
||||
frames. Some HyBi clients (such as the Flash fallback and older Chrome
|
||||
and iOS versions) do not support binary data which is why the
|
||||
negotiation is necessary.
|
||||
Websockify negotiates whether to base64 encode traffic to and from the
|
||||
client via the subprotocol header (Sec-WebSocket-Protocol). The valid
|
||||
subprotocol values are 'binary' and 'base64' and if the client sends
|
||||
both then the server (the python implementation) will prefer 'binary'.
|
||||
The 'binary' subprotocol indicates that the data will be sent raw
|
||||
using binary WebSocket frames. Some HyBi clients (such as the Flash
|
||||
fallback and older Chrome and iOS versions) do not support binary data
|
||||
which is why the negotiation is necessary.
|
||||
|
||||
|
||||
### Encrypted WebSocket connections (wss://)
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
- Go implementation
|
||||
|
||||
- Support multiple targets that are selected by the path line. Some
|
||||
sort of wildcarding of ports too.
|
||||
|
||||
- Support SSL targets too.
|
||||
|
||||
- Rust implementation
|
||||
- Add sub-protocol support to upstream einaros/ws module and use that
|
||||
instead of the patched module.
|
||||
- wstelnet: support CSI L and CSI M
|
||||
|
||||
|
|
11
docs/notes
11
docs/notes
|
@ -13,5 +13,12 @@ browser.
|
|||
|
||||
Building web-socket-js emulator:
|
||||
|
||||
cd include/web-socket-js/flash-src
|
||||
mxmlc -static-link-runtime-shared-libraries WebSocketMain.as
|
||||
cd include/web-socket-js/flash-src
|
||||
mxmlc -static-link-runtime-shared-libraries WebSocketMain.as
|
||||
|
||||
Building release tarball:
|
||||
- not really necessary since tagged revision can be downloaded
|
||||
from github as tarballs
|
||||
|
||||
git archive --format=tar --prefix=websockify-${WVER}/ v${WVER} > websockify-${WVER}.tar
|
||||
gzip websockify-${WVER}.tar
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
git tag v${WVER}
|
||||
git push origin master
|
||||
git push origin v${WVER}
|
||||
git archive --format=tar --prefix=websockify-${WVER}/ v${WVER} > websockify-${WVER}.tar
|
||||
gzip websockify-${WVER}.tar
|
||||
- Register with pypi.python.org (once):
|
||||
python setup.py register
|
||||
- Upload the source distribution to pypi
|
||||
|
|
10
setup.py
10
setup.py
|
@ -1,6 +1,6 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
version = '0.3.0'
|
||||
version = '0.5.0-pre'
|
||||
name = 'websockify'
|
||||
long_description = open("README.md").read() + "\n" + \
|
||||
open("CHANGES.txt").read() + "\n"
|
||||
|
@ -12,6 +12,14 @@ setup(name=name,
|
|||
classifiers=[
|
||||
"Programming Language :: Python",
|
||||
],
|
||||
data_files=[('share/websockify/include',
|
||||
['include/util.js',
|
||||
'include/base64.js',
|
||||
'include/websock.js']),
|
||||
('share/websockify/include/web-socket-js',
|
||||
['include/web-socket-js/WebSocketMain.swf',
|
||||
'include/web-socket-js/swfobject.js',
|
||||
'include/web-socket-js/web_socket.js'])],
|
||||
keywords='noVNC websockify',
|
||||
license='LGPLv3',
|
||||
url="https://github.com/kanaka/websockify",
|
||||
|
|
|
@ -11,7 +11,7 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates
|
|||
'''
|
||||
|
||||
import os, sys, select, optparse
|
||||
sys.path.insert(0,os.path.dirname(__file__) + "/../")
|
||||
sys.path.insert(0,os.path.dirname(__file__) + "/../websockify")
|
||||
from websocket import WebSocketServer
|
||||
|
||||
class WebSocketEcho(WebSocketServer):
|
||||
|
|
|
@ -7,7 +7,7 @@ given a sequence number. Any errors are reported and counted.
|
|||
'''
|
||||
|
||||
import sys, os, select, random, time, optparse
|
||||
sys.path.insert(0,os.path.dirname(__file__) + "/../")
|
||||
sys.path.insert(0,os.path.dirname(__file__) + "/../websockify")
|
||||
from websocket import WebSocketServer
|
||||
|
||||
class WebSocketLoad(WebSocketServer):
|
||||
|
|
|
@ -6,17 +6,15 @@ Display UTF-8 encoding for 0-255.'''
|
|||
import sys, os, socket, ssl, time, traceback
|
||||
from select import select
|
||||
|
||||
sys.path.insert(0,os.path.dirname(__file__) + "/../")
|
||||
sys.path.insert(0,os.path.dirname(__file__) + "/../websockify")
|
||||
from websocket import WebSocketServer
|
||||
|
||||
if __name__ == '__main__':
|
||||
print "val: hixie | hybi_base64 | hybi_binary"
|
||||
print "val: hybi_base64 | hybi_binary"
|
||||
for c in range(0, 256):
|
||||
hixie = WebSocketServer.encode_hixie(chr(c))
|
||||
hybi_base64 = WebSocketServer.encode_hybi(chr(c), opcode=1,
|
||||
base64=True)
|
||||
hybi_binary = WebSocketServer.encode_hybi(chr(c), opcode=2,
|
||||
base64=False)
|
||||
print "%d: %s | %s | %s" % (c, repr(hixie), repr(hybi_base64),
|
||||
repr(hybi_binary))
|
||||
print "%d: %s | %s" % (c, repr(hybi_base64), repr(hybi_binary))
|
||||
|
||||
|
|
Loading…
Reference in New Issue