How long does it take for Tor to expire a circuit and pick a new one? Is there a way to control this expiration time?
3 Answers
The Tor FAQ also tries to answer this, but here's my attempt :
Circuits get created on start-up and whenever Tor thinks it might need more in the future or right now.
Once a circuits is actually used for the first time, it'll be marked dirty. Dirty circuits are used for new connections for 10 minutes by default (see MaxCircuitDirtiness
in the manual).
After those 10 minutes, a dirty circuit will stick around for as long as connections are still going over it. If you're just web browsing that might not be the case for long. However, if you are connected to IRC for instance it might be days.
So, to summarize: a circuit lives for some amount of time before you use it, then for 10 minutes for new connections, and then for however long it takes for these connections to finish.
-
4Also, any circuit which has been used is treated as expired when the New Identity option in the TorButton menu is selected, even if it is less than 10 minutes old. Commented Oct 3, 2013 at 13:10
-
@StevenMurdoch Just from an informative perspective: TorButton is no longer maintained.– user8218Commented Sep 20, 2015 at 15:30
In 10 minutes: How often does Tor change its paths?
I believe it's configurable using the MaxCircuitDirtiness
option
An answer for modern Tor: Circuits are established per domain name and kept for two hours. They may change this again.
https://blog.torproject.org/blog/tor-browser-45-released#Privacy
-
I don't think this is the case because the Tor FAQ (2019.www.torproject.org/docs/faq.html.en#ChangePaths) does not state this at all. Also, I did not find anywhere in the citation you provided that states this.– SwangieCommented Jun 15, 2021 at 23:41