[tor-dev] Modifying Path Selection based on geography

teor teor at riseup.net
Fri Jan 18 01:40:02 UTC 2019


> On 17 Jan 2019, at 23:39, sarpedon montecarlo <sarpedon000 at gmail.com> wrote:
> I recently started to do some modifications on tor path selection by using stem, torflow/op-addon and txtorconn. but as long as i enable __LeaveStreamsUnattached option, tor will not function properly.

__LeaveStreamsUnattached means that the controller needs to attach all of Tor's
streams. How does Tor fail when you set it?

We know that __DisablePredictedCircuits causes Tor to stop bootstrapping.

> so i decided to hack the source for this feature i seek:
> custom country for each position:
> entry:{{entry country-code}}
> middle:{{middle country-code}}
> exit:{{country-code}}

Restricting your path probably won't do what you want:

Changing Tor's path selection makes your Tor client look different, so you will be
easier to track.

GeoIP is inaccurate: it's based on the physical location of the machine, or the
location of the owner of the IP address, or some other location they chose.
Relays are usually in data centres, so there's no commercial incentive to keep
their locations up to date for targeted advertising.

Also, different GeoIP databases have different locations for the same IP address.

And GeoIP locations often don't correspond to legal jurisdictions.

> i really appreciate you guys give me some hint, that which part of the source i must start to hack?
> i have dived into circuitbuild.c and some other core/or modules but i am confused where to start.

You could start by using the existing EntryNodes and ExitNodes options:

You may also want the StrictNodes option.

Tor will add a MiddleNodes option, it should be out in the next few days.
If you can't wait, the code is here:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20190118/4a7272f9/attachment-0001.html>

More information about the tor-dev mailing list