build a proxy pool with docker

system: Ubuntu 18.04 LTS

1.) install docker and start docker
wget -qO- get.docker.com | bash
docker version
systemctl start docker
systemctl status docker
systemctl enable docker

2.) install redis
docker run -d --name redisDynamic redis:latest
docker inspect redisDynamic | grep IPAddress #拿到redis的ip,修改下面的db_host参数#

3.) intsall proxy pool
docker pull jhao104/proxy_pool
docker run --env db_type=REDIS --env db_host=172.17.0.2 --env db_port=6379 --env db_password= -p 5010:5010 --net=host jhao104/proxy_pool

success!

4.) use proxy pool

api method Description arg
/ GET api介绍 None
/get GET 随机获取一个代理 None
/get_all GET 获取所有代理 None
/get_status GET 查看代理数量 None
/delete GET 删除代理 proxy=host:ip

reference:
https://xz.aliyun.com/t/6509
https://github.com/jhao104/proxy_pool

发表评论

电子邮件地址不会被公开。 必填项已用*标注