how to prevent Tor from auto-buiding circle?

John Kimble det.j.kimble at gmail.com
Fri Dec 8 02:48:49 UTC 2006


On 12/8/06, xiangw at fudan.edu.cn <xiangw at fudan.edu.cn> wrote:
> i c, just ignore. Thanks very much.
>
> Yours,
> jojo
>
> > Thus spake xiangw at fudan.edu.cn (xiangw at fudan.edu.cn):
> >
> > >     Hi,guys. I'm working on my own Tor controller recently. I
> > want to
> > > do full controlling on circle and stream, but i found that Tor
> > keep
> > > auto-buiding circles. How to prevent Tor from doing it?
> >
> > Unfortunately I think there is no tor option for this. In my case I
> > ignore the circuit extends I didn't cause. You can build a table/list
> > by watching for 250 EXTENDED ([\d]+) right after you send the
> > EXTEND.. Any events for other circuit IDs you can then ignore.
> >
> > However, I'm guessing you want to completely avoid touching nodes that
> > are known to be unreachable from your location? Is it bad if you
> > try to connect to firewalled nodes?
> >
> >
> > --
> > Mike Perry
> > Mad Computer Scientist
> > fscked.org evil labs
> >
> >
>

If you want to make sure you have complete control over how streams
are attached to circuits, you also need to set
"__LeaveStreamsUnattached" to 1, either when your controller starts or
in the torrc file. And then use the SETEVENTS controller command to
subscribe to STREAM events, and attach new streams to your own
circuits as they arrive.

About preventing the auto-building of circuits - you'll have to modify
Tor source to do so. I think the most minimalist change that you can
make to achieve this is to edit circuituse.c and change "#define
MAX_UNUSED_OPEN_CIRCUITS 12" to "#define MAX_UNUSED_OPEN_CIRCUITS 0".
(Let's hope I don't get laughed / screamed at if this turns out to be
a bad idea.)

- John



More information about the tor-talk mailing list