commit dev plan
This commit is contained in:
parent
0f0e7d9193
commit
5f80ee78cf
19
README.md
19
README.md
@ -1,2 +1,17 @@
|
|||||||
代理池:https://uu-proxy.com/pricing
|
### 开发计划
|
||||||
轮转代理以及存活检测功能等待后续加入
|
#### 使用代理池:https://uu-proxy.com/pricing
|
||||||
|
#### 模块分离:
|
||||||
|
- 获取模块:使用商家给出的api接口获取代理源
|
||||||
|
- 检查模块:监测代理源中的个代理接口是否存活
|
||||||
|
- 轮转代理模块:启动代理程序,将存活代理接口启动对应代理
|
||||||
|
- 循环模块:定时循环以上进程
|
||||||
|
- 配置模块:设定轮转间隔,api接口等等配置
|
||||||
|
#### 预计使用方法:
|
||||||
|
1. 直接启用代理接口,为系统或者命令行窗口提供代理
|
||||||
|
参考命令行代理:
|
||||||
|
`set HTTP_PROXY=http://127.0.0.1:10809`
|
||||||
|
`set HTTPS_PROXY=http://127.0.0.1:10809`
|
||||||
|
|
||||||
|
2. 为其他程序提供函数导入
|
||||||
|
参考`import`
|
||||||
|
3. 转写为Go程序并打包
|
17
checker.py
Normal file
17
checker.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import requests
|
||||||
|
|
||||||
|
proxies_list = open("proxies_list.txt", "r").read().strip().split("n")
|
||||||
|
|
||||||
|
def get(url, proxy):
|
||||||
|
try:
|
||||||
|
# Send proxy requests to the final URL
|
||||||
|
response = requests.get(url, proxies={'http': f"http://{proxy}"}, timeout=30)
|
||||||
|
print(response.status_code, response.text)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
|
def check_proxies():
|
||||||
|
proxy = proxies_list.pop()
|
||||||
|
get("http://ident.me/", proxy)
|
||||||
|
|
||||||
|
check_proxies()
|
Loading…
Reference in New Issue
Block a user