22

After i click the "Use a New Identify" button on Vidalia, i will get a new proxy ip. Can tor change ip automatically?

My program needs random proxies, so the server will not block the connection.

redice
  • 8,437
  • 9
  • 32
  • 41

3 Answers3

42

You could modify "/etc/tor/torrc" or in "path/to/your/torbrowser/Data/Tor/torrc" to cycle proxies faster:

MaxCircuitDirtiness NUM

Feel free to reuse a circuit that was first used at most NUM seconds ago, but never attach a new stream to a circuit that is too old. (Default: 10 minutes)

Emech
  • 611
  • 1
  • 4
  • 16
hoju
  • 28,392
  • 37
  • 134
  • 178
  • 5
    PS - I think the minimum for this is 10 seconds. If you use a lower value, tor will probably default to 10 sec anyways. FYI. – Nimo Feb 11 '14 at 07:16
  • @Nimo true, But at my tips, I success get less then 10 sec by `service tor restart` between each `torsocks` command (restart tor service make new ip) :-D – Nabi K.A.Z. Jul 19 '19 at 19:35
7

Tor creates new circuits on its own every ten minutes. Note that a new circuit does not necessarily mean a new IP, for more information see stem's faq entry on this.

Damian
  • 2,944
  • 2
  • 18
  • 15
0

I experienced that Tor does not update ip for some sites (like vk.com) even when you set the MaxCircuitDirtiness. I dunno if it is some headers they send or if they just pay Tor developers for that =D.

To get around that there was a "New Tor Circuit for this Site" button in older Tor versions (6.5.1) with a Ctrl+Shift+L shortcut. What I did was opening a page of the web site and triggering the Ctrl+Shift+L key combiation every minute using xdotool terminal app:

while true; do 
    xdotool keydown ctrl; 
    xdotool keydown shift; 
    xdotool key l; 
    xdotool keyup ctrl; 
    xdotool keyup shift; 
    sleep 60; 
done

The only downside is that you have to keep this window opened and focused the whole time =3.

Klesun
  • 12,280
  • 5
  • 59
  • 52