fix Protocol.js to enable tcp-encryption #255
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes issues I had with tcp-encryption in combination with the html5 client.
With this MR I can connect from the browser to a xpra server started with:
xpra start --start=xterm --bind-tcp=0.0.0.0:10000 --html=on --tcp-encryption=AES --tcp-encryption-keyfile=auth.txt
I couldn't figure out why Utilities is out of scope in places where it is needed in Protocol.js - that's a mystery to me.
First I thought it is because of the wrong order Utilities.js and Protocol.js is included in index.html - but fixing this did not help.
(btw: another thing I came across was that Uint8ToString() is defined in Utilities.js and rencode.js the same way ... )