xpra icon
Bug tracker and wiki

Opened 10 days ago

Last modified 10 days ago

#1681 new enhancement

allow http/websocket over unix socket when --html

Reported by: idupree Owned by: idupree
Priority: major Milestone: 2.2
Component: network Version: trunk
Keywords: Cc:

Description

xpra supports binding to unix sockets.

At first it doesn't sound like HTTP over Unix socket would be useful, because browsers can't connect to unix sockets. However:

ssh supports proxying unix sockets to IP ports elsewhere.

This can be useful because it can keep other Unix users on the box running xpra server from trying to connect to xpra.

When I combine --bind= and --html=on, however, the browser receives "this port does not support HTTP requests", and xpra logs "Error: unix-domain connection failed"..."invalid packet header, HTTP GET request".

Are there reasons not to change xpra to allow HTTP on unix socket when --html is on?

Change History (1)

comment:1 Changed 10 days ago by Antoine Martin

Component: html5network
Owner: changed from Antoine Martin to idupree

Turned out to be (almost) trivial, so done in r17381.

Tested with:

  • server:
    xpra start --start=xterm  --daemon=no -d network,websocket :10
    
  • socat to make the unix-domain socket available as TCP:
    socat TCP-LISTEN:20000,fork  UNIX:$XDG_RUNTIME_DIR/xpra/$HOSTNAME-10
    
  • point browser at the TCP port:
    xdg-open http://localhost:20000/
    

@idupree: please close if that works for you.

Note: See TracTickets for help on using tickets.