All Projects → OxOOo → ProxyPoolWithUI

OxOOo / ProxyPoolWithUI

Licence: MIT license
Python编写的HTTP代理池,集成WEB管理界面,无外部数据库依赖,可直接运行,兼容Windows,Linux和macOS。Free Proxy Pool with Web UI on Windows, Linux, and macOS.

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to ProxyPoolWithUI

proxi
Proxy pool. Finds and checks proxies with rest api for querying results. Can find over 25k proxies in under 5 minutes.
Stars: ✭ 32 (-68%)
Mutual labels:  http-proxy, proxypool
Proxybroker
Proxy [Finder | Checker | Server]. HTTP(S) & SOCKS 🎭
Stars: ✭ 2,767 (+2667%)
Mutual labels:  http-proxy, proxypool
HttpProxy
JAVA实现的IP代理池,支持HTTP与HTTPS两种方式
Stars: ✭ 37 (-63%)
Mutual labels:  http-proxy, proxypool
revp
Reverse HTTP proxy that works on Linux, Windows, and macOS. Made with C++ and Boost.
Stars: ✭ 80 (-20%)
Mutual labels:  http-proxy
ProxyChecker
An easy to use open-source, multithreaded Proxy Checker. Allows you to quickly check HTTP and SOCKS proxies in a user friendly GUI, for Windows, Mac OS, Linux.
Stars: ✭ 113 (+13%)
Mutual labels:  http-proxy
freeproxy
Get http proxies from some free proxy sites. (爬取免费HTTP代理)
Stars: ✭ 18 (-82%)
Mutual labels:  http-proxy
proxy-ng
No description or website provided.
Stars: ✭ 33 (-67%)
Mutual labels:  http-proxy
SmartGW
Domain based VPN Gateway/Proxy for all devices
Stars: ✭ 49 (-51%)
Mutual labels:  http-proxy
android-sdk
AppSpector is a debugging service for mobile apps
Stars: ✭ 39 (-61%)
Mutual labels:  http-proxy
multithread-proxy
No description or website provided.
Stars: ✭ 31 (-69%)
Mutual labels:  proxypool
LiveProxies
Asynchronous proxy checker
Stars: ✭ 17 (-83%)
Mutual labels:  http-proxy
echoIP
显示客户端IP的详细信息
Stars: ✭ 63 (-37%)
Mutual labels:  http-proxy
small-proxy
Go实现的一个跨平台域名式访问内网穿透工具
Stars: ✭ 49 (-51%)
Mutual labels:  http-proxy
Fiddler-FPlug
Fiddler Plug,Provide Host Mapping、File Mapping、Header Replace、Https to Http、ServerIP、Disable Cache、vConsole、Console Log、JS Inject
Stars: ✭ 30 (-70%)
Mutual labels:  http-proxy
trickster
Open Source HTTP Reverse Proxy Cache and Time Series Dashboard Accelerator
Stars: ✭ 1,753 (+1653%)
Mutual labels:  http-proxy
devproxy
A local development http proxy with hosts spoofing written in Go
Stars: ✭ 35 (-65%)
Mutual labels:  http-proxy
nanoproxy
Small fast HTTP forward proxy in Go.
Stars: ✭ 31 (-69%)
Mutual labels:  http-proxy
web-proxy-script
Minimalist web proxy script
Stars: ✭ 55 (-45%)
Mutual labels:  http-proxy
vex
reverse HTTP proxy tunnel via secure SSH connections.
Stars: ✭ 20 (-80%)
Mutual labels:  http-proxy
serviceq
Super fault-tolerant HTTP load balancer & queue. White paper for reference - https://github.com/gptankit/serviceq-paper
Stars: ✭ 66 (-34%)
Mutual labels:  http-proxy

简易好用的免费代理池

兼容系统: Windows Linux MacOS

  • 定时自动爬取网络上的免费代理
  • 定时对代理进行验证,集成API随时返回可用代理
  • 不需要第三方数据库支持,一键启动,简单易用
  • 集成WEB管理界面,方便查看代理状态并对代理池进行配置
  • 拥有详细的注释,可以非常方便地学习或修改

推荐:

项目Demo:http://chenyu0x00.com:8888/

2021年3月8日测试,项目运行半小时后,支持访问HTTPS的代理有40+,支持访问HTTP的代理有100+。

如果你知道有好用的代理源,或者是发现本项目存在一些问题,欢迎通过Issues和我们讨论。

WEB管理界面截图

screenshot1 screenshot2

已经集成的免费代理源

名称 地址 备注
悠悠网络代理 https://uu-proxy.com/
快代理 https://www.kuaidaili.com/
全网代理 http://www.goubanjia.com/
66代理 http://www.66ip.cn/
云代理 http://www.ip3366.net/
免费代理库 https://ip.jiangxianli.com/
小幻HTTP代理 https://ip.ihuan.me/
89免费代理 https://www.89ip.cn/
ProxyScan https://www.proxyscan.io/
开心代理 http://www.kxdaili.com/
西拉代理 http://www.xiladaili.com/
小舒代理 http://www.xsdaili.cn/
ProxyList https://www.proxy-list.download/
ProxyScrape https://proxyscrape.com/ 国内无法直接访问

运行本项目

本项目目前只适配了Python3,请确保你的电脑上安装了3.6或更高版本的Python软件。

  1. 下载代码
git clone https://github.com/OxOOo/ProxyPoolWithUI.git
  1. 安装Python依赖(在ProxyPoolWithUI目录下执行)
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
  1. 启动(在ProxyPoolWithUI目录下执行)
python3 main.py

如果你在运行了上述命令之后,在命令行中看到了类似如下截图,那么说明项目成功启动了:

term

  1. 使用浏览器打开http://localhost:5000,可以看到WEB管理界面。

Docker构建项目

  1. 下载项目文件
git clone https://github.com/OxOOo/ProxyPoolWithUI.git
cd ProxyPoolWithUI
  1. 构建docker镜像
docker build --tag proxy_pool .
  1. 运行镜像
docker run -p 5000:5000 -v /root/ProxyPoolWithUI:/proxy -d proxy_pool

/root/ProxyPoolWithUI为clone下来的项目目录路径,请自行更改

使用代理

  1. API接口

项目启动之后,会自动爬取并检测代理是否可用,因此我们只需要关注如何使用代理即可。

  • http://localhost:5000/fetch_random : 随机获取一个可用代理,如果没有可用代理则返回空白

    返回示例 : http://127.0.0.1:8080

  • http://localhost:5000/fetch_all : 获取所有可用代理,如果没有可用代理则返回空白

    返回示例 : http://127.0.0.1:8080,http://127.0.0.1:8081

  1. 使用代理

不同语言使用代理的方式各不相同,这里提供一个Python集成本项目并使用代理的示例代码:

# encoding : utf-8

import requests

def main():
    proxy_uri = requests.get('http://localhost:5000/fetch_random').text
    if len(proxy_uri) == 0:
        print(u'暂时没有可用代理')
        return
    print(u'获取到的代理是:' + proxy_uri)
    
    proxies = { 'http': proxy_uri }
    html = requests.get('http://www.baidu.com', proxies=proxies).text
    if u'百度一下,你就知道' in html:
        print('代理可用')
    else:
        print('代理不可用')

if __name__ == '__main__':
    main()

配置

如果是需要禁用或者启用某些代理,可直接在WEB管理界面进行操作。

本项目的大部分配置均可在config.py中找到,默认配置已经可以适应绝大部分情况,一般来说不需要进行修改。

添加新的代理源

本项目的爬取器均在fetchers目录下,你也可以根据自己的需求对其中的爬取器进行修改或者扩展。

编写本项目的爬取器并不复杂,详细的操作步骤可见此处,可以参考fetchers目录下已有的爬取器。

项目工作流程图

本项目主要包含三部分:

  1. 爬取进程:主要包括fetchers目录和proc/run_fetcher.py文件
  2. 验证进程:主要在proc/run_validator.py文件中
  3. WEB与API:在api目录下

本项目的大致逻辑图如下:

注:为了便于理解与画图,下图的逻辑是经过简化之后的逻辑,详细过程可查看代码以及相应的注释。

workflow

验证算法相关

  1. 如何验证代理可用

目前验证代理可用的算法较为简单,核心思想是使用requests库访问一个指定网页,查看是否访问成功。

相关配置参数(包括超时时间尝试次数等)可在config.py中找到,具体代码逻辑在proc/run_validator.py中。

  1. 什么时候该验证哪个代理

这个问题比较复杂,很难有一个完美的解决方案,因此目前的算法较为简单,勉强可用,可在db目录下找到对于目前算法的说明。

如果你有更好的算法,欢迎通过Issues和我们讨论,也可以根据db目录下的README文件对代码进行修改。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].