MCPHub LabRegistryjhao104/proxy_pool
jhao104

jhao104/proxy_pool

Built by jhao104 23,237 stars

What is jhao104/proxy_pool?

Python ProxyPool for web spider

How to use jhao104/proxy_pool?

1. Install a compatible MCP client (like Claude Desktop). 2. Open your configuration settings. 3. Add jhao104/proxy_pool using the following command: npx @modelcontextprotocol/jhao104-proxy_pool 4. Restart the client and verify the new tools are active.
🛡️ Scoped (Restricted)
npx @modelcontextprotocol/jhao104-proxy_pool --scope restricted
🔓 Unrestricted Access
npx @modelcontextprotocol/jhao104-proxy_pool

Key Features

Native MCP Protocol Support
Real-time Tool Activation & Execution
Verified High-performance Implementation
Secure Resource & Context Handling

Optimized Use Cases

Extending AI models with custom local capabilities
Automating system workflows via natural language
Connecting external data sources to LLM context windows

jhao104/proxy_pool FAQ

Q

Is jhao104/proxy_pool safe?

Yes, jhao104/proxy_pool follows the standardized Model Context Protocol security patterns and only executes tools with explicit user-granted permissions.

Q

Is jhao104/proxy_pool up to date?

jhao104/proxy_pool is currently active in the registry with 23,237 stars on GitHub, indicating its reliability and community support.

Q

Are there any limits for jhao104/proxy_pool?

Usage limits depend on the specific implementation of the MCP server and your system resources. Refer to the official documentation below for technical details.

Official Documentation

View on GitHub

ProxyPool 爬虫代理IP池

Tests codecov Packagist GitHub contributors

______                        ______             _
| ___ \_                      | ___ \           | |
| |_/ / \__ __   __  _ __   _ | |_/ /___   ___  | |
|  __/|  _// _ \ \ \/ /| | | ||  __// _ \ / _ \ | |
| |   | | | (_) | >  < \ |_| || |  | (_) | (_) || |___
\_|   |_|  \___/ /_/\_\ \__  |\_|   \___/ \___/ \_____\
                       __ / /
                      /___ /

ProxyPool

爬虫代理IP池项目,主要功能为定时采集网上发布的免费代理验证入库,定时验证入库的代理保证代理的可用性,提供API和CLI两种使用方式。同时你也可以扩展代理源以增加代理池IP的质量和数量。

  • 文档: document

  • 支持版本:

  • 测试地址: http://demo.spiderpy.cn (勿压谢谢)

  • 付费代理推荐: 亮数据 Bright Data(前身 Luminati).全球代理与网络抓取行业头部领导者。覆盖 195+ 国家的 1.5亿+ 真人住宅IP,亲测成功率极高,轻松突破反爬封锁。需要高质量代理IP的可以注册后联系中文客服。申请免费试用 (PS:用不明白的同学可以参考这个使用教程)。

   想自建爬虫?接入 Bright Data MCP Server,让 Claude、Cursor、Windsurf 等 AI 助手直接实时抓取网页——自动破解验证码、绕过地区限制。Scraper Studio 支持 AI 一键生成或 JS 代码定制,全托管基础设施运行,无需自购代理、无需搭服务器,分钟级上线。所有产品底层均由同一套顶级代理网络驱动。

   API 产品现享7折 + 免费试用额度,注册后可联系中文客服快速上手。(用不明白的同学可参考使用教程,或注册后直接使用互动 AI 智能助手) 👉 https://get.brightdata.com/cd3yy5

运行项目

下载代码:
  • git clone
git clone https://github.com/jhao104/proxy_pool.git
  • releases
https://github.com/jhao104/proxy_pool/releases 下载对应zip文件
安装依赖:
pip install -r requirements.txt
更新配置:
# setting.py 为项目配置文件

# 配置API服务

HOST = "0.0.0.0"               # IP
PORT = 5000                    # 监听端口


# 配置数据库

DB_CONN = 'redis://:pwd@127.0.0.1:8888/0'


# 配置代理源(可选)
# 默认自动扫描 fetcher/sources/ 目录下所有 enabled=True 的代理源
# 如需禁用某些代理源,在黑名单中添加其 name 即可
# PROXY_FETCHER_EXCLUDE = ["freevpnnode"]

启动项目:

# 如果已经具备运行条件, 可用通过proxyPool.py启动。
# 程序分为: schedule 调度程序 和 server Api服务

# 启动调度程序
python proxyPool.py schedule

# 启动webApi服务
python proxyPool.py server

Docker Image

docker pull jhao104/proxy_pool

docker run --env DB_CONN=redis://:password@ip:port/0 -p 5010:5010 jhao104/proxy_pool:latest

docker-compose

项目目录下运行:

docker-compose up -d

使用

  • Api

启动web服务后, 默认配置下会开启 http://127.0.0.1:5010 的api接口服务:

apimethodDescriptionparams
/GETapi介绍None
/getGET随机获取一个代理可选参数: ?type=https 过滤支持https的代理
/popGET获取并删除一个代理可选参数: ?type=https 过滤支持https的代理
/allGET获取所有代理可选参数: ?type=https 过滤支持https的代理
/countGET查看代理数量None
/deleteGET删除代理?proxy=host:ip
  • 爬虫使用

  如果要在爬虫代码中使用的话, 可以将此api封装成函数直接使用,例如:

import requests

def get_proxy():
    return requests.get("http://127.0.0.1:5010/get/").json()

def delete_proxy(proxy):
    requests.get("http://127.0.0.1:5010/delete/?proxy={}".format(proxy))

# your spider code

def getHtml():
    # ....
    retry_count = 5
    proxy = get_proxy().get("proxy")
    while retry_count > 0:
        try:
            html = requests.get('http://www.example.com', proxies={"http": "http://{}".format(proxy)})
            # 使用代理访问
            return html
        except Exception:
            retry_count -= 1
    # 删除代理池中代理
    delete_proxy(proxy)
    return None

扩展代理

  项目默认包含几个免费的代理获取源,但是免费的毕竟质量有限,所以如果直接运行可能拿到的代理质量不理想。所以,提供了代理获取的扩展方法。

  添加一个新的代理源方法如下:

  • 1、在 fetcher/sources/ 目录下新建 .py 文件,继承 BaseFetcher 基类,声明 name/url/enabled 属性,实现 fetch() 方法以生成器(yield)形式返回host:port格式的代理,例如:
from fetcher.baseFetcher import BaseFetcher
from util.webRequest import WebRequest

class MyProxyFetcher(BaseFetcher):
    """我的代理源"""

    name = "myproxy"
    url = "https://www.example.com/"
    enabled = True

    def fetch(self):
        r = WebRequest().get("https://www.example.com/api/proxies")
        for item in r.json:
            yield item["ip"] + ":" + item["port"]
  • 2、添加好后,schedule 进程下次抓取时会自动扫描 fetcher/sources/ 目录并启用新代理源,无需修改配置。

  可用 python proxyPool.py fetcher 命令查看当前启用的代理源列表。

  如需临时禁用某个代理源,在 setting.pyPROXY_FETCHER_EXCLUDE 黑名单中添加其 name 即可。

免费代理源

目前实现的采集免费代理网站有(排名不分先后, 下面仅是对其发布的免费代理情况, 付费代理测评可以参考这里):

代理名称状态更新速度可用率地址代码
开心代理*地址kxdaili.py
快代理*地址kuaidaili.py
云代理*地址ip3366.py
小幻代理*地址ihuan.py
89代理★★**地址ip89.py
稻壳代理★★***地址docip.py
谷德代理★★***地址goodips.py
66代理★★*地址daili66.py
Proxifly★★**地址proxifly.py
FreeVPNNode★★*地址freevpnnode.py
Geonode★★**地址geonode.py
RoundProxies*地址roundproxies.py

如果还有其他好的免费代理网站, 可以在提交在issues, 下次更新时会考虑在项目中支持。

问题反馈

  任何问题欢迎在Issues 中反馈,同时也可以到我的博客中留言。

  你的反馈会让此项目变得更加完美。

贡献代码

  本项目仅作为基本的通用的代理池架构,不接收特有功能(当然,不限于特别好的idea)。

  本项目依然不够完善,如果发现bug或有新的功能添加,请在Issues中提交bug(或新功能)描述,我会尽力改进,使她更加完美。

  这里感谢以下contributor的无私奉献:

  @kangnwh | @bobobo80 | @halleywj | @newlyedward | @wang-ye | @gladmo | @bernieyangmh | @PythonYXY | @zuijiawoniu | @netAir | @scil | @tangrela | @highroom | @luocaodan | @vc5 | @1again | @obaiyan | @zsbh | @jiannanya | @Jerry12228 | @zeyudada

Release Notes

changelog

<a href="https://hellogithub.com/repository/92a066e658d147cc8bd8397a1cb88183" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=92a066e658d147cc8bd8397a1cb88183&claim_uid=DR60NequsjP54Lc" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>

Global Ranking

8.5
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

{ "mcpServers": { "jhao104-proxy_pool": { "command": "npx", "args": ["jhao104-proxy_pool"] } } }