xpra icon
Bug tracker and wiki

Opened 9 months ago

Last modified 8 months ago

#1271 new enhancement

support websockets in the python client

Reported by: Antoine Martin Owned by: alas
Priority: minor Milestone: 1.0
Component: client Version: trunk
Keywords: Cc:

Description

We already support websockets as transport in the server, see #1136 / #1134, so we could support websockets in the python client as well. (we already have ssh, ssl, tcp and unix / named-pipes!)

I don't see the point of adding this one: we try hard to avoid copying data in the network layer and using websockets will cause more of it, using more CPU.

Change History (4)

comment:1 Changed 8 months ago by Antoine Martin

Status: newassigned

Found: https://github.com/liris/websocket-client which supports python 2.
This may help with things like #1298.

comment:2 Changed 8 months ago by Antoine Martin

Milestone: future1.0

Implemented basic support in r13558, hoping this will help debug #1298.
You can now connect using a websocket transport:

xpra attach ws/127.0.0.1:10000/

Looking at the traffic, it's not pretty: redundant size headers, etc... #1134 may help a bit here, but ultimately this transport is very unlikely to ever perform as well as the plain xpra protocol it wraps.

Still TODO:

  • man page updates (maybe revamp the whole display connection string to avoid copying the same information everywhere)
  • support parameters on the URL
  • maybe expose the underlying TCP socket's details via get_info
  • hook ssl options
Last edited 8 months ago by Antoine Martin (previous) (diff)

comment:3 Changed 8 months ago by Antoine Martin

Minor updates:

  • r13559: added to osx moduleset
  • r13560: connection closed handling, extra socket info
  • r13562: we can now use this connection string syntax: ws[s]/username:password@host:port/path?arg=val&etc

comment:4 Changed 8 months ago by Antoine Martin

Owner: changed from Antoine Martin to alas
Status: assignednew
  • r13594: man page updates
  • r13596 seems to allow us to use SSL connections (blocked by #1213), ie with a server configured with a self-signed CA as per wiki/Encryption/SSL:
    xpra attach wss:127.0.0.1:10000 --ssl-ca-cert=./ca.crt
    

(successfully establishes the SSL connection to the server but then fails because of the issue in ticket:1213#comment:3)


Excluding the wss issue above, this is ready for testing. See also #1213
@afarr: you should be able to use ws URL connection strings with the latest clients.
This is useful for testing the same transport layer used by the html5 client.

Last edited 8 months ago by Antoine Martin (previous) (diff)
Note: See TracTickets for help on using tickets.