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

Feature request: Support for connecting on Unix Sockets #3

Open
phantomcraft opened this issue Oct 13, 2019 · 2 comments
Open

Feature request: Support for connecting on Unix Sockets #3

phantomcraft opened this issue Oct 13, 2019 · 2 comments

Comments

@phantomcraft
Copy link

Unix Sockets are just link IP Sockets, but contained in a file descriptor.

Some softwares like Tor provides SOCKS5 proxy as a Unix File socket, could you implement this feature?

Very useful for network namespaces.

@wongsyrone
Copy link
Owner

Does Tor provide a SOCKS5 server via socket(AF_UNIX, SOCK_STREAM, ...) ? I will consider it if so.

@phantomcraft
Copy link
Author

Yes, it provides, $ man tor

       SocksPort [address:]port|unix:path|auto [flags] [isolation flags]
          Open this port to listen for connections from SOCKS-speaking applications. Set this to 0 if you don’t want to allow application connections via SOCKS. Set it to "auto" to have Tor pick a port for you. This
           directive can be specified multiple times to bind to multiple addresses/ports. If a unix domain socket is used, you may quote the path using standard C escape sequences. (Default: 9050)

           NOTE: Although this option allows you to specify an IP address other than localhost, you should do so only with extreme caution. The SOCKS protocol is unencrypted and (as we use it) unauthenticated, so
           exposing it in this way could leak your information to anybody watching your network, and allow anybody to use your computer as an open proxy.

           If multiple entries of this option are present in your configuration file, Tor will perform stream isolation between listeners by default. The isolation flags arguments give Tor rules for which streams
           received on this SocksPort are allowed to share circuits with one another. Recognized isolation flags are:

Here I use this option on my torrc:

SocksPort unix:/var/run/tor/socks IPv6Traffic PreferIPv6 WorldWritable

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

2 participants