getinfo circuit-status

Nico Weinreich info at web-unity.de
Mon Feb 15 21:16:45 UTC 2010


Roger Dingledine schrieb:
> On Mon, Feb 15, 2010 at 03:41:55PM -0500, Roger Dingledine wrote:
>   
>> 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.
>>     
>
> As Nick points out, there's an easy way to do it after the fact. My
> longer mail is talking about predicting which circuit will be used by
> a hypothetical stream without actually making any connections through Tor.
>
> --Roger
>
>   
Yeah, I read in control-spec for the last hour, but it's still a bit 
confusing for me. I hope you can still help me a little bit. As I 
understand, I've to do the following:

- get tor to watch for stream events by sending SETEVENTS STREAM over 
control port
- send my real request over tor (in my case a http request)
- this is an asynchronous response, so I've to wait for a response like 
"650 SP STREAM SP stream_id SP SUCCEEDED SP circ_id SP target:port"
- get circuit by GETINFO CIRCUIT-STATUS

But I've no idea to realize the last point in PHP. To act with control 
port I open a normal socket in PHP and send my request. After that, the 
tor request itself is done with CURL. I found PHPs function 
socket_select which allows to wait a specific time for a response, but 
what time should I wait?
***********************************************************************
To unsubscribe, send an e-mail to majordomo at torproject.org with
unsubscribe or-talk    in the body. http://archives.seul.org/or/talk/



More information about the tor-talk mailing list