xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Changes between Initial Version and Version 1 of Ticket #1022


Ignore:
Timestamp:
11/03/15 08:48:37 (5 years ago)
Author:
Antoine Martin
Comment:

As per this original mailing list thread: Xpra Client in Listen Mode Enquiry

I think it would be better, safer and more useful to simply reverse the connection so that the server connects to the client: no need for passing the user+host to connect to using a new magic message to trigger yet another connection. (with the inherent security risks every time - and new connections cannot traverse NAT back to the server).

The "listen" mode should probably be a new subcommand, rather than overloading "attach", ie:

xpra listen tcp:host:port

I really don't see much point at all in the listen via SSH option: if you can SSH to the client, you might as well start the client command via SSH, which is also much safer.

Pointers:

  • the Protocol is quite well abstracted and is used by both client and server, it does not care about which end initiates the connection
  • the client (and its subclasses / superclasses) will need a bit of work to be able to start:
    • without timing out
    • create a tray icon (or not?) and handle menus that are not meant to be used yet
    • create the socket in listen mode (same code as the server) - when the connection is received, it just goes through the normal startup sequence: send hello and everything else should fall into place
  • the Server Base Class (and sub/super classes) will just need a new bit of code to create a new TCP connection and add it to its "sources" list. This should be available via "xpra control" and the dbus server so we can initiate new ones after the server is started if necessary. Think about timeouts, and retries..
  • authentication / encryption: the client should authenticate the server if the password option is used - and maybe we should be doing this anyway in all cases? (which we sort of do when you have encryption)

@adarrab: if you can take a look at the comments above and maybe even play with the code a little bit, I should be able to take a look at this for the next release

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1022

    • Property Owner changed from Antoine Martin to adarrab
    • Property Type changed from task to enhancement
    • Property Milestone changed from 0.16 to 0.17
  • Ticket #1022 – Description

    initial v1  
    11It would be nice to have those two additional options (--listen, --client) e.g.
    22
    3 Xpra_cmd.exe  attach  [ssh/tcp]: EMPTY    --listen=[IP:PORT]     (Waits for server ready msg, with optional timeout. IP is provided in case a machine has more than 1 active address, otherwise not needed)   
     3Xpra_cmd.exe  attach  [ssh/tcp]: EMPTY    --listen=[IP:PORT]     (Waits for server ready msg, with optional timeout. IP is provided in case a machine has more than 1 active address, otherwise not needed)
     4{{{
    45xpra --start :XX --start-child=CMD  --client=IP:PORT
     6}}}
    57[[BR]]
    68Once server is initiated successfully, it sends a triggering tcp msg to the client containing USER@SERVER :XX to be used by the client to initiate ssh/tcp connection.