GithubHelp home page GithubHelp logo

ip_cistern's Introduction

青龙使用代理池来避免黑IP问题

不确定是否有效,根据网上青龙代理教程写的,并不确定是否真的生效,代理池如果都不能使用,会自动删除代理,等下次代理池更新后再获取可用代理

使用的库

pip3 install requests
pip3 install datetime
pip3 install time
pip3 install random
pip3 install json

在脚本的第9行改成自己的配置文件地址,一般青龙目录都是这个

path = '/root/ql/config/config.sh'

在脚本的第10改成代理添加的行数,

line = int(134) 我的之前134行之前使用其他http代理,使用更改的是134行,请查看config.sh配置文件查看自己需要添加哪一行

在配置文件添加后如果使用代理可以看到

export ALL_PROXY=socks5://106.55.227.232:1024
#获取IP地址
export ALL_PROXY=$ALL_PROXY
echo '当前代理:' $ALL_PROXY
echo '开始查询公网IP:'
curl --silent --location --request GET 'https://myip.ipip.net/'

可以看到日志输出如下

代理脚本会根据抓取的代理池更新而延迟一秒钟更新,代理池大部分代理可用请放心使用
线程守护运行脚本

nohup python3 ip_broker.py &

ip_cistern's People

Contributors

xgzk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.