1

I'm on a device where certain hostnames are blocked at an operating system level, so even If I go to a different network, the hostnames are blocked as well. This is also the case for using command-line tools like curl, etc. which makes sense.

One way to bypass this web filter is by using the Tor browser, and you would think that the logical thing to make it work in the command line is to use torsocks.

I have torsocks installed, but if I use it to try and access a restricted hostname, it gives a socket is not connected error.

A quick search shows that the ports are being properly used, but torsocks just isn't working.

Here's a quick example: mojang is one of the blocked hostnames, so if I run brew install --cask minecraft It normally gives this error:

==> Downloading https://launcher.mojang.com/download/Minecraft.dmg
curl: (35) Recv failure: Socket is not connected

Error: Download failed on Cask 'minecraft' with message: Download 
failed: https://launcher.mojang.com/download/Minecraft.dmg

When I run the same command under torsocks [torsocks brew install Minecraft] it returns the same error, even though it shouldn't.

One more thing: I installed torsocks using homebrew so I can't find the configuration file. I looked for it and tried googling where it was but I don't know where homebrew installs configuration files. (I can't find the tor.conf file in the place it usually is, where a quick google search tells it to be.)

Is there anything I can do to adjust torsocks where it will allow me to run these commands with restricted hostnames?

2
  • 1
    Please add some configuration details and logs of the actual errors to your question. Commented Nov 30 at 10:06
  • This also seems confusing. “network where certain hostnames are blocked at an operating system level” How do you have OS level blocks coming from a network? Nice edit with some details so people can know more about a specific host and command.
    – bmike
    Commented Nov 30 at 13:56

1 Answer 1

1

https://gitlab.torproject.org/tpo/core/torsocks/-/issues/40013 implies that torsocks doesn't work on Monterey and newer. The issue is open for two years now.

There is an alternative approach using tor and proxychains-ng mentioned in the comments. You need to disable SIP for this to work though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .