0

I have torrc-default file and torrc custom file on mac at:

/Applications/TorBrowser.app/Contents/Resources/TorBrowser/Tor

folder (the package of the app).

In both files it is specified:

SocksPort 9150 IPv6Traffic PreferIPv6 KeepAliveIsolateSOCKSAuth
ControlPort 9151

But when I start tor from unix, it loads listening to 9050.

So I tried to look at configuration in [https://tor.stackexchange.com/a/11870]:

~/Library/Application Support/TorBrowser-Data/torrc

and here I find :

# This file was generated by Tor; if you edit it, comments will not be preserved
# The old torrc file was renamed to torrc.orig.1 or similar, and Tor will ignore it

DataDirectory /Applications/TorBrowser.app/TorBrowser/Data/Tor

So, where does the port 9050 come from?

enter image description here


EDITED after comment

I start the application from the folder where tor file is: /Applications/TorBrowser.app/Contents/Resources/TorBrowser/Tor. That folder also contains torrc and torrc-default files.

I tried:

./tor -f torrc 

and:

Oct 28 20:16:17.741 [notice] Tor v0.2.8.7 (git-263088633a63982a) running on Darwin with Libevent 2.0.22-stable, OpenSSL 1.0.1t and Zlib 1.2.5.
Oct 28 20:16:17.742 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Oct 28 20:16:17.757 [warn] Unable to open configuration file "/Applications/TorBrowser.app/Contents/MacOS/Tor/torrc".
Oct 28 20:16:17.757 [err] Reading config failed--see warnings above.
user305883
  • 101
  • 4

1 Answers1

1

9050 is a builtin default, from the Tor Manual...

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. (Default: 9050)

When you're starting it "from unix", it's probably looking for the default torrc, not finding any defined in the builtin default location (you need to specify the location with -f and optional --defaults-torrc if it's not in the location it was told to look when it was compiled) and instead falling back to it's default settings.

cacahuatl
  • 11,047
  • 2
  • 17
  • 39