一个IP足够了,用Tor+polipo即可。
Tor的部分,用完全命令行加参数启动:
Tor的部分,用完全命令行加参数启动:
$ mkdir -p /tmp/tor10001/data
$ /usr/bin/tor SOCKSPort 10001 CONTROLPort 20001 DATADirectory /tmp/tor10001/data
Polipo的部分,也完全用命令行启动: $ polipo socksParentProxy="127.0.0.1:10001" proxyPort=30001 proxyAddress="0.0.0.0" authCredentials="username:password"
组合起来,弄成一个脚本:$ mkdir -p /tmp/tor10002/data
$ nohup /usr/bin/tor SOCKSPort 10002 CONTROLPort 20002 DATADirectory /tmp/tor10002/data &
$ nohup polipo socksParentProxy="127.0.0.1:10002" proxyPort=30002 proxyAddress="0.0.0.0" authCredentials="username:password" &
开100个Tor+Polipo:#!/bin/bash
a=10001
b=20001
c=30001
n=10100
echo "Start multiple Tors+polipo"
echo "Begin port " $a
echo "End port " $n
while [ $a -le $n ]
do
echo "Start Tor on port" $a
mkdir -p /tmp/tor$a/data
nohup /usr/bin/tor SOCKSPort $a CONTROLPort $b DATADirectory /tmp/tor$a/data &
echo "Start Polipo on port" $c
nohup polipo socksParentProxy="127.0.0.1:$a" proxyPort=$c proxyAddress="0.0.0.0" authCredentials="username:password" &
a=$(($a + 1))
b=$(($b + 1))
c=$(($c + 1))
done
通杀Tor+Polipo的脚本#!/bin/bash
ps aux | grep tor | awk '{print $2}' | xargs kill -9
ps aux | grep polipo | awk '{print $2}' | xargs kill -9
No comments:
Post a Comment