[tor-dev] oppy - an Onion Proxy in Python

Damian Johnson atagar at torproject.org
Wed Jan 21 18:20:36 UTC 2015


> Yes, thanks for the reminder. I meant to do this earlier but apparently
> forgot.  I just added an issue on Trac with a more complete description
> and code to reproduce: https://trac.torproject.org/projects/tor/ticket/14314

Thanks Nik! Think I know what's going on and agreed that it doesn't
match the docs.

> I actually did find a couple things that were either worded in a
> confusing way (I thought) or mistyped in `tor-spec.txt`, and when I have
> a few minutes later this week I'll send a patch.

Great!

> Now that I think about it, something that would be great to have in Stem
> would be path selection capabilities. So something like, say, given a
> list of RelayDescriptors and some constraints that must hold for a path,
> return some randomly chosen path that satisfies those constraints.

I'd be up for that. This isn't a very commonly requested piece of
functionality, but it was part of TorCtl (which Stem deprecated in 2012)...

  https://gitweb.torproject.org/pytorctl.git/tree/PathSupport.py

> A starting point might be just implementing Tor's default path selection
> algorithm

This part concerns me a tad since it would be duplicating a bit of tor and
likely a moving target. Path selection isn't as simple as "pick some random
relays", rather it's based on bandwidth authority measurements, stability,
and other heuristics. Not to mention guards, families, bad-exit flags, etc.

> One of the next things I need to do for oppy is implement Tor's full
> path selection algorithm. However, if you think it would be appropriate,
> it'd be great if some of this could eventually just wind up in Stem (so
> I could make oppy's code simpler and also so other people could use
> these capabilities more easily).
>
> How would you feel about adding path selection capabilities to Stem?

Gotcha. Honestly I haven't looked into path selection much. If it turns
out to be reasonably straight forward and a maintainable thing for Stem
to include then great.

> Aside from allowing one to do nice things with descriptors, this could
> also work well with some method analogous to
> stem.control.Controller.new_circuit() that could do stuff like
> auto-choose a path for you based on some desired path attributes the
> caller specifies.

Agreed, that would be neat.

> PS: Thanks for writing/maintaining Stem! It's a really great library and
> made writing oppy and working with network status docs and descriptors
> *much* simpler.

My pleasure! Glad you found it useful. :)

Cheers! -Damian


More information about the tor-dev mailing list