[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #3076 [Tor Client]: Implement 'SocksPort auto' and 'ControlPort auto'
#3076: Implement 'SocksPort auto' and 'ControlPort auto'
-------------------------+--------------------------------------------------
Reporter: mikeperry | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: Tor: 0.2.2.x-final
Component: Tor Client | Version:
Keywords: | Parent: #2264
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by arma):
Replying to [comment:5 nickm]:
> On the interface:
>
> I can get that we need to expose the ControlPort via a way that doesn't
involve using the ControlPort, but is there some reason that we can't use
a GETINFO command for the other ports?
Not that I know of.
> Also, is there any reason to do this _only_ for socksport and
controlport?
No.
> As far as possible, I want to avoid having log messages be any part of
our defined interface. If we *did* do that, we'd want to make it really
obvious which ones they are.
Right.
> On the implementation:
>
> It seems like "FooPort auto" ought to mean "bind the address with
sin_port set to 0, then do a getsockname() on the socket, then advertise
that one." That doesn't sound too hard. We would also need to tweak
anything that advertises a port.
Ok. I expect "ORPort auto" will want more smarts, for two reasons. First,
we want to pick one that is reachable, so it's a more complex testing
process than 'bind and see what the answer is'. Same, I guess, with
"DirPort auto". Second, we might prefer relays on 443 or 80 or 143 or
something -- I'd been imagining a function that returns what number we'd
like to try next and the first few are random skewed toward the numbers
we'd prefer and after that it goes random. Your idea of "if you meant to
get a random one, let the kernel decide" is a good one. All of *that*
said, an ORPort auto that simply binds to an available port would be a
great start.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3076#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs