5

I am scraping some websites with curl and I am using Tor to avoid sending too many request with the same ip. The problem is that my app uses threads, so if I send the packet to change identity to the control port on one thread the identity change for all the other threads.

Is there a way I can use multiple identities with Tor?

2

2 Answers 2

0

I'm not entirely sure what you mean by identities, and sending a packet to change it.

Using threads means sharing memory space, so if you want to change a variable in your application only for a specific thread, you need to make a separate variable for your thread, or other identity. Otherwise you could change your application to fork a separate process for each identity you use and achieve a similar effect.

0

Why not start multiple tor instances and then either connect each thread to a separate tor instance or spawn multiple processes each connected to a separate tor instance.

2
  • Care to explain this process a little more @HaykoKoryun?
    – ntk4
    Sep 10, 2017 at 16:40
  • Yes, spawning multiple instances solves it. But is there some more effective way (less RAM consumed)?
    – Bobík
    Jun 1, 2023 at 18:12

You must log in to answer this question.

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