2

How can I make Tor functions on Heroku? I'm using tor as a proxy rotator along with my python project for web crawling. Everything works fine on localhost but I don't find how to make tor functions on Heroku? do I just install it on the Heroku server?
or are there any other solutions?

  • 1
    I don't think you're going to get a definite answer because I don't think anyone has put a lot of thought into it. With that said, I do have some experience with Cloud Foundry which isn't so different than Heroku. My guess is that you would need to build a custom Tor buildpack that could bake the tor executable in with any app that is being published. When an app is created and started, instead of being reachable from the outside like a normal web app, the tor executable will turn the app into an onion service. – JSEvans Apr 26 at 12:55
  • Are there any other solutions to dynamically change IP address of the dyno while running, without having to use tor? – Imen Apr 26 at 13:28
  • I know that you can create an ingress in Cloud Foundry. I have no idea how that works with Heroku. You should really ask than community for more info on how to do that. – JSEvans Apr 26 at 16:16
  • I think I just solved the problem, I found an already built buildpack for tor. thank you, though :) – Imen Apr 28 at 12:00
1

@lmen is probably talking about Tor Proxy Buildpack for Heroku, it can setup Tor on a heroku node with socks5 and control port available (They can be configured in the environment values).

All you need to do is run

$ heroku buildpacks:add https://github.com/iamashks/heroku-buildpack-tor-proxy.git

And it will automatically setup a proxy that you can use at port 9050.

| improve this answer | |

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.