[tor-bugs] #7590 [Tor]: [PATCH] New option LocalOutboundBindAddress
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sat Dec 1 04:17:39 UTC 2012
#7590: [PATCH] New option LocalOutboundBindAddress
-------------------------+--------------------------------------------------
Reporter: ac | Owner:
Type: enhancement | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.4.x-final
Component: Tor | Version:
Keywords: tor-client | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by nickm):
Some notes on the basic idea:
* So, the idea is that you've got a hidden service on 127.0.0.1 and you
want to tell when Tor is connecting to it vs when some other thing is
connecting to it. Why would you do that? Is this so you can have the
server for the HS treat anonymous connections differently from local admin
connections or something?
* If this is the application, maybe this should be a hidden-service-
specific feature rather than a local-specific feature. IOW, maybe it
should be HSOutboundBindAddress instead?
* Is there a reason to make this a per-HS configuration item, so that
different hidden services get a different address, or is that overkill?
Some notes on the code:
* I know we do it in a few places, but I don't really like code of the
form:
{{{
for (i=0;i<2;++i) {
thing_t thing1 = i ? foo : bar;
widget_t widget1 = i ? baz: quux;
do stuff...
do stuff...
}
}}}
Instead, it seems much cleaner to do:
{{{
static void do_stuff(thing_t *thing1, widget_t *widget1)
{
do stuff ...
do stuff...
}
...
do_stuff(bar, quux);
do_stuff(foo, baz);
}}}
Other than that, it looks okay at first glance.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7590#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list