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!

2
  • 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
    Commented Sep 20, 2016 at 14:45
  • @canonizing ironize Well darn, I was hoping to be lazy and have Tor do it for me! Haha thanks.
    – Jsmith
    Commented Sep 20, 2016 at 15:52

2 Answers 2

1

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

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

1
  • 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
    Commented Sep 21, 2016 at 13:06

You must log in to answer this question.

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