使用-torify对您终端中的程序进行匿名化

时间:2016-06-10 17:23:53

标签: tor ubuntu-server

使用本教程Torify app terminal

我发现此错误

*WARNING torsocks[5359]: [connect] Connection to a local address are denied since it might
 be a TCP DNS query to a local DNS server. Rejecting it for safety reasons. (in tsocks_connect() at connect "
.c:186)*   

知道怎么补丁吗?

Ubuntu服务器16.04 我的命令:sudo torify python3 torPython.py

我的代码在这里:

from urllib.request import urlopen                                                                         
from stem import Signal                                                                                    
from stem.control import Controller                                                                        

with Controller.from_port(port = 9051) as controller:                                                      
    controller.authenticate(password='dummy123456admin')                                                      
    print("Success!")                                                                                      
    controller.signal(Signal.NEWNYM)                                                                       
    print("New Tor connection processed")                                                                  
    print(urlopen('http://icanhazip.com').read())

0 个答案:

没有答案