How do I get the Tor exit node IP address using the control port? "getinfo circuit-status" command shows many circuits. What is my exit node?


The answer is that there is no single "exit node". As you see, your Tor client has a variety of circuits open at once, and when a new application stream request comes in, Tor will allocate it to one of the open circuits according to a variety of heuristics. See path-spec.txt for details.

That said, Tor Browser uses a different mechanism for attaching streams to circuits -- it aims to do "per browser tab" isolation, meaning there's a circuit for each browser tab: https://trac.torproject.org/projects/tor/ticket/3455 In this Tor Browser case, if you click on the green onion (the Torbutton logo), it displays a "Tor circuit for this site" section. Tor Browser knows this answer because it watches both stream and circuit events, and when the application request for this tab loaded, it recorded which circuit that stream attached to.

You too could watch the stream and circ events on the control port if you wanted, and match up which circuit was your exit node for a given past stream. But there's no easy way to predict which circuit will be your exit node for future streams.

  • actually There is a way, but it's very inefficient : create a circle via control protocol/Stem by hand and make it the only one circle. But you will completely ruin the functionality benefits of Tor in that case – Alexey Vesnin May 17 '16 at 15:18

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.