Proposal: MapAddress wilcards [*]

Roger Dingledine arma at mit.edu
Mon Jun 15 21:14:23 UTC 2009


On Fri, Jun 12, 2009 at 03:36:27PM -0400, grarpamp wrote:
> (B) So the following feature is proposed. Allow wildcards in the
> MapAddress function such that:
> 
> 1 - MapAddress google.com=google.com.<exit>.exit
>  Is now, and should remain, single host specific as usual.
> 
> 2 - MapAddress *.google.com=*.google.com.<exit>.exit
>  Matches any third level domain such as www.google.com, but obviously
>  not google.com itself, as that is handled by (1) above. The name
>  must have three levels to match.

If somebody submitted a clean short patch for this, we'd probably put
it in.

> 3 - MapAddress **.google.com=**.google.com.<exit>.exit
> 4 - MapAddress *.*.google.com=*.*.google.com.<exit>.exit
> 5 - *google.com

It seems that what you really want is a Tor controller. It could
setconf __LeaveStreamsUnattached, listen for new stream events,
redirectstream them however it likes, and then attachstream them to
circuitid 0, meaning Tor will take care of it. Then you can do full-scale
regexps in your python or perl or whatever. If you want to go nuts, you
could even consider making it a plugin for the nascent Vidalia plugin
architecture. :)

I don't imagine that ordinary users would ever touch this sort of feature,
because it requires them to a) know about the .exit notation and b)
know how to find a suitable exit relay. What they might touch, though,
is some sort of hack on TrackHostExits that lets you say "whichever exit
you picked for .google.com, please use that same exit for .gmaps.com."

I'm not sure how to make that user-friendly or user-accessible though.

--Roger



More information about the tor-dev mailing list