[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: getinfo circuit-status



On Mon, Feb 15, 2010 at 08:17:32PM +0100, Nico Weinreich wrote:
>> {This is based on re-reading circuit_get_best in circuituse.c.}
>
> OK, thanks for this very detailed explaination. But is there a way to  
> get (before or after a HTTP request) the circuit which will be (or was)  
> used?

Not currently. I've thought periodically of adding a getinfo line to tell
you that. It would be of the form "if a connection were to show up to
address x and port y, which circuit would it use?" The primary use is for
controllers that want to tell you which country you'll be exiting from,
without actually making a test request (once they make the test request,
they alter what will actually happen with the real request).

This task would be a good one for somebody who wants to jump into Tor's
source code and get some more experience, e.g. for to stand out as a
good candidate for Tor's upcoming summer of code projects.

To get started, check out circuit_get_best() in src/or/circuituse.c. You'd
want to make a dummy stream and send that in to the function.

It still wouldn't be perfect, though, because there are other checks
in connection_ap_handshake_rewrite_and_attach() that call, e.g.,
router_find_exact_exit_enclave().

--Roger

***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxxx with
unsubscribe or-talk    in the body. http://archives.seul.org/or/talk/