Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow http/websocket over unix socket when --html #1681

Closed
totaam opened this issue Nov 11, 2017 · 5 comments
Closed

allow http/websocket over unix socket when --html #1681

totaam opened this issue Nov 11, 2017 · 5 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Nov 11, 2017

Issue migrated from trac ticket # 1681

component: network | priority: major | resolution: worksforme

2017-11-11 16:35:12: idupree created the issue


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?

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2017

2017-11-11 17:07:15: antoine changed owner from antoine to idupree

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2017

2017-11-11 17:07:15: antoine changed component from html5 to network

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2017

2017-11-11 17:07:15: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Nov 24, 2017

2017-11-24 16:06:48: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Nov 24, 2017

2017-11-24 16:06:48: antoine set resolution to worksforme

@totaam totaam closed this as completed Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant