【发布时间】:2017-08-31 03:14:43
【问题描述】:
我已经安装了 Tor 以在我的 windows 机器上作为服务运行,我正在尝试通过 Stem 包在 python 中发出请求。在我的 torrc 文件中,我将 ControlPort 指定为 9051 并设置了 HashedControlPassword。当我运行 netstat 时,我看到 Tor 正在 localhost:9050 上运行,但没有任何东西在监听端口 9051。结果,当我尝试在 python 中连接到 ControlPort 时:
Controller.from_port(port=9051)
导致
[Errno 10061] No connection could be made because the target machine actively refused it
我试过重启服务,我什至重新安装了 Tor 浏览器,但似乎没有任何东西可以让 ControlPort 工作。
【问题讨论】:
-
防火墙问题?当你让它工作时,你可能想要使用
context_manager表单:with Controller.from_port(port = 9051) as controller: controller.authenticate(password="<password>")