Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 support #74

Closed
jpds opened this issue Sep 10, 2020 · 1 comment
Closed

IPv6 support #74

jpds opened this issue Sep 10, 2020 · 1 comment

Comments

@jpds
Copy link

jpds commented Sep 10, 2020

https://github.com/atx/prometheus-tor_exporter uses this module and using a valid IPv6 address returns:

$ sudo /usr/bin/prometheus-tor-exporter.py -m tcp -a '2a01:XXXX:XXXX:XXX::XX'
Traceback (most recent call last):
  File "/usr/bin/prometheus-tor-exporter.py", line 197, in <module>
    port=args.control_port)
  File "/usr/lib/python3/dist-packages/stem/control.py", line 1014, in from_port
    raise ValueError('Invalid IP address: %s' % address)
ValueError: Invalid IP address: 2a01:XXXX:XXXX:XXX::XX
ghost pushed a commit that referenced this issue Sep 11, 2020
Controller.from_port() improperly rejects IPv6 addresses as invalid...

  #74

This expands a few other methods to allow IPv6 addresses as well.
@atagar
Copy link
Contributor

atagar commented Sep 11, 2020

Thanks Jonathan, good catch. I'm not all together sure if a remote IPv6 control connection will work (unfortunately I don't have an IPv6 relay to test against), but I fixed that validation check...

https://gitweb.torproject.org/stem.git/commit/?id=1087ebf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants