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

Controller.from_port doesn't handle Docker Compose network #127

Closed
grvn-ht opened this issue Jan 9, 2023 · 2 comments
Closed

Controller.from_port doesn't handle Docker Compose network #127

grvn-ht opened this issue Jan 9, 2023 · 2 comments

Comments

@grvn-ht
Copy link

grvn-ht commented Jan 9, 2023

Hey Stem Team!
Really nice work ongoing here,

I would like to propose a new feature for:
stem.control.Controller.from_port(address, port)

Right now address needs to be an IPV4, however, inside docker-compose, you can call a container by it's name.

Therefor we could imagine a class who overwrites the @staticmethod from_port:

class Docker_Controller(Controller):
@staticmethod
def from_port(address = 'tor', port = 9051):
import stem.connection
control_port = stem.socket.ControlPort(address, port)
return Controller(control_port)

Here is an implementation's example:
https://github.com/grvn-ht/torproxy_docker_compose

Hope it will be of help,

Regards

@atagar
Copy link
Contributor

atagar commented Jan 9, 2023

Hi G-ht, I'm glad you like the library!

I already added the feature you propose (IPv6 support in the from_port() method) but it's not in any releases. I moved on from Tor so Stem has become unmaintained.

As discussed on another ticket you'll need to contact 'gk at torproject dot org' if you'd care for this to change.

Cheers! -Damian

@grvn-ht
Copy link
Author

grvn-ht commented Jan 11, 2023

Thank's for the answer, I will try to do it then!

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