dperson / torproxy

GNU Affero General Public License v3.0
515 stars 144 forks source link

Talk to controller using Python Stem #21

Closed sfranchois closed 6 years ago

sfranchois commented 6 years ago

Hi

Thank you for providing this container. Perfect for my use case. One thing though. how can i instruct the controller to change IP address? I know the NEWNYM signal is used for that, but I can't reach the controller. Tried using Python's stem package, but there I'm already stuck with the authorisation

with Controller.from_port(port=9051) as controller: controller.authenticate(password='1234') controller.signal(Signal.NEWNYM) controller.close()

stem.connection.AuthenticationFailure: socket connection failed (Received empty socket content.)

connecting with telnet 127.0.0.1 9075 also did not succeed.

I tried providing a password like so:

sudo docker run -p 8119:8118 -p 9070:9050 -p 9075:9051 -e PASSWORD=1234 -d dperson/torproxy

but no luck. Any ideas how to get there?

Thank you

sfranchois commented 6 years ago

Extra input: I can control Tor by opening a bash into the container, and then Telnet to localhost, so that part works. From outside the container, I didn't manage.

dperson commented 6 years ago

It was bound to localhost, I'll have it listen to all when a password is set. New build will be out shortly. Thanks for the report.

sfranchois commented 6 years ago

Super! Looking fwd to it

sfranchois commented 6 years ago

Working like a charm now. Thanks again (for the fast action)!