xpra icon
Bug tracker and wiki

TCP Socket Sharing


The --tcp-proxy= server command line option.

Note: for simply serving the HTML5 client, use the html=on option with bind-tcp sockets instead. This will use a built-in http server, this is much easier to setup.


Introduction

This feature allows xpra to share the its TCP socket(s) with another TCP server.

The non-xpra traffic will be forwarded to the destination of your choice. By sharing the socket with a web server, you can have web pages open when connecting with a browser (and potentially serving an HTML5 client - see #473) and access xpra session(s) when connecting with an xpra client.

It can also be useful in environments where the number of open ports is limited. It can also be combined with a Proxy Server to serve multiple xpra connections.

It can be used with any type of TCP server. Note however that this proxying is not transparent: the server being proxied will see the incoming TCP connection as coming from the xpra server and not the original client.

If you want to share the socket with an SSL server, make sure that the xpra server has ssl=off otherwise the TCP socket will be upgraded to SSL. (see #1252)

Usage Example

Assuming that you have a web server on TCP port 80 and that you want to expose both xpra and this web server via the TCP port 8080:

xpra start :10 --bind-tcp=0.0.0.0:8080 --tcp-proxy=127.0.0.1:80

More information can be found here: #474


Diagram:

diagram illustrating connection sharing with a web server

Last modified 2 months ago Last modified on 01/12/17 07:25:59

Attachments (1)

Download all attachments as: .zip