我在计算机上运行Tor,我需要每隔五分钟更改一次Tor退出节点.例如,如果我通过某个出口节点开始使用Tor,那么在5分钟内我希望Tor更改为具有不同IP地址的退出节点.我怎样才能做到这一点?
据我所知,Tor正在侦听localhost上的端口8051.
我可以将哪些命令发送到此端口以使Tor构建新链,以便我可以获得另一个IP地址?
有没有办法,哪一个在 PHP 中更改 to 退出节点(获取新 IP)?
现在,我每 10 分钟左右就会获得一个新 IP。
<?php
// Initialize cURL
$ch = curl_init();
// Set the website you would like to scrape
curl_setopt($ch, CURLOPT_URL, "http://icanhazip.com/");
curl_setopt($ch, CURLOPT_USERAGENT, '');
curl_setopt($ch, CURLOPT_REFERER, '');
curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:8118');
// Set cURL to return the results into a PHP variable
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// This executes the cURL request and places the results into a variable.
$curlResults= curl_exec($ch);
// Close curl
curl_close($ch);
// Echo the results to the screen>
echo $curlResults; …
Run Code Online (Sandbox Code Playgroud) 我试图从我的程序模拟Vidalia(Tor GUI)中的"新身份"按钮.我问过这个问题,基于Rob Kennedy的回答,我在我的申请中尝试了这个:
IdTelnet1.Host:='127.0.0.1';
IdTelnet1.Port:=9051;
IdTelnet1.Connect(-1);
IdTelnet1.SendCmd('SIGNAL NEWNYM');
Run Code Online (Sandbox Code Playgroud)
但它对我没用.即使我发送命令后,我也得到相同的代理.
我正在使用Indy 9.
我不知道我是否不知道如何使用TIdTelnet或不知道如何发送该特定命令.