我正在尝试使用 Python 与 Tor 交互,但它一直拒绝我的连接。这是我的代码:
from TorCtl import TorCtl
conn = TorCtl.connect(controlAddr="127.0.0.1", controlPort=9051, passphrase="123")
我也试过:
from TorCtl import TorCtl
conn = TorCtl.connect()
两者都产生以下错误:
Failed to establish socket: [Errno 10061] No connection could be made because the target machine actively refused it.
任何想法为什么会发生这种情况/我该如何解决?