mikeperry-tor/vanguards

Allow --control_ip to be a hostname

Closed this issue · 1 comments

In some deployment scenarios, it's useful to specify --control_ip as a hostname. In current version, a configution is only valid if an IPv4 address is used. This limitation comes from stem[0] and can be worked around by resolving all non-IP looking strings using socket.getaddrinfo before passing them down to stem.

I have a crude version of this, but requires polish. Before I invest any more time, is there an argument against having this feature in?

[0] https://github.com/torproject/stem/blob/master/stem/control.py#L1014

This is a strange deployment setup, but the patch won't affect people who use IP address directly, so I'm fine with it.

Thanks!