1

I'm programmatically using Tor to hit web pages. I wanted to test some new functionality out on a local webpage, so I created and deployed one using Tomcat.

Now when my program goes to hit localhost:8080/MyDir/somePage.html, it errors out, giving a java.net.SocketException: SOCKS server general failure.

I use Firefox as a browser and have it set up to route traffic through Tor. There's an option for No Proxy For:, where I can put localhost and then be able to browse to my localhost page I created.

Is there some equivalent torrc option or something I can set, so my program does not try to proxy using Tor to hit a local webpage?

I am assuming that is my issue, correct me if I'm wrong!

  • So, you'll need to edit your application to allow localhost connections, like Firefox has an option to not proxy for certain destinations. There is no equivalent Tor configuration. Anything sent to SOCKS it will try to proxy over Tor. Failing closed is important. – cacahuatl Sep 20 '16 at 14:45
  • @canonizing ironize Well darn, I was hoping to be lazy and have Tor do it for me! Haha thanks. – Jsmith Sep 20 '16 at 15:52
1

For your experiment you need to rise a local HS and point it to your Tomcat.

| improve this answer | |
0

Tor is designed to reject all requests to local addresses. This is to prevent accidental and intentional access to local services running on Tor relays. (e.g. if localhost were proxied through Tor, you would connect to localhost on whichever exit relay was used)

You'll have to bypass the proxy for local requests. For Firefox, the instructions are here: https://support.mozilla.org/en-US/kb/advanced-panel-settings-in-firefox#w_connection-settings-dialog

| improve this answer | |
  • Thanks! But I know how to do it in Firefox. I was looking for more of a Tor setting (something in torrc maybe) that allows me to set up the equivalent idea to the Firefox No Proxy For: setting. canonizing ironize set me straight by letting me know that there is no torrc setting to mock that functionality. – Jsmith Sep 21 '16 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.