5

Freelancer任务之三:Setup Proxy on VPS for Instagram

 7 months ago
source link: https://bajie.dev/posts/20240124_freelancer_3/
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任务之三:Setup Proxy on VPS for Instagram

2024-01-24 2 分钟阅读

任务的要求是:

• Multiple subnets to avoid bans •I need the proxies to have the ability of User:Pass •Proxy needs to be Residential IPv6

还给出了一个参考: https://www.blackhatworld.com/seo/never-buy-proxies-again-setup-your-own-proxy-server.872539/

恩,比较有意思。按照他给的连接:

第一步去 LowEndBox.com 或者 Webhostingtalk.com 去找一家口碑比较好,而且能提供附加ip的VPS供应商,通常附加一个IP是1$一个月。

第二步买个VPS,配置是1G内存,1个内核,100M带宽,并且附加10个IP。

这样的VPS一般是5$一个月,10$10个ip一个月,合计15$一个月,100元人民币,这样你就有11个IP可用了。

按这个任务的要求,需要Multiple subnet,你就从这家供应商的不同地点多买几台,比如洛杉矶1台,德州1台,纽约1台,然后每台附加10个IP

第三步就是安装Proxy软件了:

下载3Proxy

wget http://img.rendoumi.com/soft/3proxy/0.8.11.tar.gz  
tar zxvf 0.8.11.tar.gz  

编译安装:

cd 3proxy-0.8.11  
sed -i 's/^prefix.*/prefix=\/usr\/local\/3proxy/' Makefile.Linux  
sed -i '/DENY.*/a #define ANONYMOUS 1' src/proxy.h  
make -f Makefile.Linux  
make -f Makefile.Linux install  

注意上面我是安装到了/usr/local/3proxy,大家可以根据需求修改。

看看配置都是什么

cat cfg/3proxy.cfg.sample |grep -v ^# | grep -v ^$  
nserver 10.1.2.1  
nserver 10.2.2.2  
nscache 65536  
timeouts 1 5 30 60 180 1800 15 60  
users 3APA3A:CL:3apa3a "test:CR:$1$qwer$CHFTUFGqkjue9HyhcMHEe1"  
service  
log c:\3proxy\logs\3proxy.log D  
logformat "- +_L%t.%.  %N.%p %E %U %C:%c %R:%r %O %I %h %T"  
archiver rar rar a -df -inul %A %F  
rotate 30  
auth iponly  
external 10.1.1.1  
internal 192.168.1.1  
auth none  
dnspr  
auth strong  
deny * * 127.0.0.1,192.168.1.1  
allow * * * 80-88,8080-8088 HTTP  
allow * * * 443,8443 HTTPS  
proxy -n  
auth none  
pop3p  
tcppm 25 mail.my.provider 25  
auth strong  
flush  
allow 3APA3A,test  
maxconn 20  
socks  
auth strong  
flush  
internal 127.0.0.1  
allow 3APA3A 127.0.0.1  
maxconn 3  
admin  

一堆的废物配置啊,统统去掉

cat<<EOF>>/usr/local/3proxy/bin/3proxy.conf  
daemon  
timeouts 1 5 30 60 180 1800 15 60  
log /var/log/3proxy.log D  
logformat "- +_L%t.%.  %N.%p %E %U %C:%c %R:%r %O %I %h %T"  
rotate 30

users user:CL:pass

auth strong  
allow user  
proxy -p3128 -a -i172.16.8.1 -e172.16.8.1  
flush  
EOF  

有用的就是下面5行 users 定义了一个用户user,明文密码,密码是pass auth 定义了需要认证 allow 定义了user用户可以访问 proxy -p端口 -a -i内网监听ip -e出口ip

ok了,然后启动:

cd /usr/local/3proxy/bin  
./3proxy 3proxy.conf

测试一下:

curl --proxy 172.16.8.1:3128 --proxy-user user:pass http://www.sina.com.cn  -vvv|more  

还有个需求,ipv6

格式如下
proxy -6 -n -a -p<PORT1> -i<IPv4> -e<IPv6>  
proxy -6 -n -a -p<PORT2> -i<IPv4> -e<IPv6>  
...
这么搞一下即可:
proxy -6 -n -a -p3128 -i172.16.8.1 -e2a02:26f0:4000:17d::2adb  

ok,搞定。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK