[tor-dev] authentication questions on Tor controller
atagar at torproject.org
Thu Nov 8 18:25:36 UTC 2012
Hi Jiang. First, TorCtl is being deprecated by two newer (more
actively developed) controller libraries...
Stem (https://stem.readthedocs.org/en/latest/) - Threaded library with
a similar design to TorCtl.
Txtorcon (https://txtorcon.readthedocs.org/en/latest/) - Twisted based
Please try one of those. Here's a tutorial that should help you with
> 1) with command "tor", when it establishes, if I run example.py
> the result is
> "Connection refused. Is the ControlPort enabled?"
Maybe the browser bundle uses a non-standard port or a control socket?
By default TorCtl and Stem look for 9051 since that's the default
control port by convention. The browser bundle pops up an instance of
Vidalia and you can look in its settings for the details of how it
connects to Tor.
Simplest solution is to not use the browser bundle at all, and instead
make a text file with...
... then start Tor with "tor -f /path/to/that/file". The example
you're running should then work.
More information about the tor-dev