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

use Unix socket for onionshare web instance #1016

pabs3 opened this issue Aug 14, 2019 · 2 comments


Copy link

commented Aug 14, 2019

To prevent other users on the system from being able to connect to onionshare's web instance (and DoS it/etc), it might be a good idea to use a Unix socket for the web interface. There is an issue filed on securedrop about the same idea. Some of the issues there don't apply to onionshare since it seems to use Python to setup the local web server. If the Python code doesn't support serving HTTP over Unix sockets then perhaps socat could be used to bridge the gap.

HiddenServicePort 80 unix:/home/pabs/.config/onionshare/tmpktvcfl7s/web_socket



This comment has been minimized.

Copy link

commented Sep 1, 2019

This is a good idea. Using a unix socket instead of a port will only work in Linux and macOS, but not Windows (being a non-unix OS, Windows doesn't support unix sockets). We actually already use unix sockets to connect to the Tor controller instead of a control port, in bundled Tor.

The main issue is, how can we make the flask web server listen on a unix socket instead of a port?


This comment has been minimized.

Copy link

commented Sep 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.