Skip to main content
added more details and errors and a clarification of the problem.
Source Link

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?

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.

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

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?

clarified things
Source Link

I'm on a networkdevice 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.

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

I'm on a network 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.

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

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.

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

Improved formatting
Source Link
jaume
  • 15.6k
  • 4
  • 59
  • 74

I'm on a network 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 curlcurl, etc. which makes sense. 

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

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

A quick search shows that the ports are being properly used, but torsockstorsocks just isn't working. Is there anything I can do to adjust torsocks where it will allow me to run these commands with restricted hostnames?

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

I'm on a network 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. Is there anything I can do to adjust torsocks where it will allow me to run these commands with restricted hostnames?

I'm on a network 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.

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

Source Link
Loading