Home

Awesome

proxypool

自建免费代理IP池

系统功能

系统架构

系统架构

项目源码结构

部署运行

pip install -r requirements.txt
python main.py

HTTP接口

1. 获取单个可用IP

基本信息
URLhttp://localhost:9999/get
HTTP请求方式GET
方法返回JSON
请求参数(bodyParam)
参数名类型必填参数位置描述默认值
check_in_hourfloaturlParam代理最后验证时间(小时)以内24
response_time_in_secondfloaturlParam代理响应时间(秒)以内null
protocolstringurlParam代理网络协议,http/httpsnull
anonymitystringurlParam代理匿名性,transparent/anonymous/high_anonymousnull
请求示例(Python示例)
    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-

    import requests

    url = "http://localhost:9999/get"
    querystring = {"anonymity":"high_anonymous","response_time_in_second":"1.5"}
    response = requests.request("GET", url, params=querystring)

    print(response.json())
JSON返回示例
{
    "ret": 0,
    "data": {
        "anonymity": "high_anonymous",
        "check_time": "2017-12-20 13:55:17",
        "country": "CN",
        "export_address": [
            "120.25.253.234"
        ],
        "from": "快代理",
        "grab_time": "2017-12-20 13:54:55",
        "host": "120.25.253.234",
        "port": "8118",
        "protocol": "http",
        "response_time": 1.45
    }
}

2. 获取全部可用IP

基本信息
URLhttp://localhost:9999/get_all
HTTP请求方式GET
方法返回JSON
请求参数(bodyParam)
参数名类型必填参数位置描述默认值
check_in_hourfloaturlParam代理最后验证时间(小时)以内24
response_time_in_secondfloaturlParam代理响应时间(秒)以内null
protocolstringurlParam代理网络协议,http/httpsnull
anonymitystringurlParam代理匿名性,transparent/anonymous/high_anonymousnull
请求示例(Python示例)
    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-

    import requests

    url = "http://localhost:9999/get_all"
    querystring = {"anonymity":"high_anonymous","response_time_in_second":"1.5","protocol":"https"}
    response = requests.request("GET", url, params=querystring)

    print(response.json())
JSON返回示例
{
    "ret": 0,
    "data": [
        {
            "anonymity": "high_anonymous",
            "check_time": "2017-12-20 14:10:25",
            "country": "CN",
            "export_address": [
                "118.114.77.47"
            ],
            "from": "西刺代理",
            "grab_time": "2017-12-20 14:09:36",
            "host": "118.114.77.47",
            "port": "8080",
            "protocol": "https",
            "response_time": 1.41
        },
        {
            "anonymity": "high_anonymous",
            "check_time": "2017-12-20 13:09:40",
            "country": "CN",
            "export_address": [
                "119.29.178.21"
            ],
            "from": "西刺代理",
            "grab_time": "2017-12-14 16:17:52",
            "host": "119.29.178.21",
            "port": "8118",
            "protocol": "https",
            "response_time": 1.11
        }
    ]
}