2

Freelancer的任务之一:多IP多重匿名代理加认证

 7 months ago
source link: https://bajie.dev/posts/20240124-freelancer_1/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Freelancer的任务之一:多IP多重匿名代理加认证

2024-01-24 1 分钟阅读

Freelancer上有个proxy setup的任务:

Project Description  
Hi, I would like to create a new VPS proxy server with multiple IPs on the same VPS.  
Are you able to that?  
What OS do you prefer?  
- I have 10 ips.
- I want them to be as much anonymous as you can.
- I would have an Username and Password as auth, but if needed the possibility to have an IP authentication too.
My budget is: ~20$  
Thank you in advance.  
fallback

说老实话,10个IP没必要,一个IP足够了,用Tor+polipo即可。

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  

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK