All Projects → pjialin → Pyproxy Async

pjialin / Pyproxy Async

Licence: apache-2.0
基于 Python Asyncio + Redis 实现的代理池

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pyproxy Async

Node Procedural Async
Write procedural style code that runs asynchronously. It may look synchronous, but it's not!
Stars: ✭ 17 (-86.18%)
Mutual labels:  async, proxy
Reading And Comprehense Twemproxy0.4.1
redis、memcached缓存代理twemproxy源码详细分析注释,带详尽中文注释及函数调用关系。(源码学习交流QQ群:568892619)
Stars: ✭ 39 (-68.29%)
Mutual labels:  redis, proxy
Fennel
A task queue library for Python and Redis
Stars: ✭ 24 (-80.49%)
Mutual labels:  async, redis
Arq
Fast job queuing and RPC in python with asyncio and redis.
Stars: ✭ 695 (+465.04%)
Mutual labels:  async, redis
Fastapi Plugins
FastAPI framework plugins
Stars: ✭ 104 (-15.45%)
Mutual labels:  async, redis
Mycat2
MySQL Proxy using Java NIO based on Sharding SQL,Calcite ,simple and fast
Stars: ✭ 750 (+509.76%)
Mutual labels:  async, proxy
Spring Boot
spring-boot 项目实践总结
Stars: ✭ 989 (+704.07%)
Mutual labels:  async, redis
Ok ip proxy pool
🍿爬虫代理IP池(proxy pool) python🍟一个还ok的IP代理池
Stars: ✭ 196 (+59.35%)
Mutual labels:  async, proxy
Memento
Fairly basic redis-like hashmap implementation on top of a epoll TCP server.
Stars: ✭ 74 (-39.84%)
Mutual labels:  async, redis
Redisgo Async
RedisGo-Async is a Go client for Redis, both asynchronous and synchronous modes are supported,its API is fully compatible with redigo.
Stars: ✭ 60 (-51.22%)
Mutual labels:  async, redis
Groupco
PHP的服务化框架。适用于Api、Http Server、Rpc Server;帮助原生PHP项目转向微服务化。出色的性能与支持高并发的协程相结合
Stars: ✭ 473 (+284.55%)
Mutual labels:  async, redis
Tedis
redis client with typescript and esnext for nodejs
Stars: ✭ 109 (-11.38%)
Mutual labels:  async, redis
Predis Async
Asynchronous PHP client library for Redis built on top of ReactPHP
Stars: ✭ 354 (+187.8%)
Mutual labels:  async, redis
Corvus
A fast and lightweight Redis Cluster Proxy for Redis 3.0
Stars: ✭ 758 (+516.26%)
Mutual labels:  redis, proxy
Zapi
基于swoole的异步轻量级api框架,内部封装全套mysql、redis、mongo、memcached异步客户端,可以轻松start、reload、stop,加入数据库的查询模块,框架已经封装好近乎同步写法,底层异步调用。现已支持异步mysql、异步redis、异步http请求.
Stars: ✭ 245 (+99.19%)
Mutual labels:  async, redis
Yii2 Queue
Yii2 Queue Extension. Supports DB, Redis, RabbitMQ, Beanstalk and Gearman
Stars: ✭ 977 (+694.31%)
Mutual labels:  async, redis
Zhttp
基于swoole的异步轻量级web框架,内部封装协程异步非阻塞全套mysql、redis、mongo、memcached连接池,可以轻松start、reload、stop,加入数据库的查询模块,框架已经封装好近乎同步写法,底层异步调用
Stars: ✭ 131 (+6.5%)
Mutual labels:  async, redis
Mobc
A generic connection pool for Rust with async/await support
Stars: ✭ 141 (+14.63%)
Mutual labels:  async, redis
Rq
Simple job queues for Python
Stars: ✭ 8,065 (+6456.91%)
Mutual labels:  async, redis
Redis
Async Redis Client for PHP based on Amp.
Stars: ✭ 107 (-13.01%)
Mutual labels:  async, redis

PyProxy-Async

基于 Python 协程 + Redis 实现的简单的代理池维护,及代理 IP 抓取服务

流程图

流程图

Features

  • HTTP/HTTPS 检测
  • 协程实现
  • Web Api 接口支持

TODO

  • [x] Docker Support
  • [x] Custom check rule Support
  • [x] TSDB Support (Prometheus has been supported)
  • [ ] More api Support

Usage

环境依赖 Python 3.6 +

  1. 克隆
git clone https://github.com/pjialin/pyproxy-async
cd pyproxy-async
  1. 安装依赖
pip install -r requirements.txt 
  1. 完善配置文件
cp config.toml.example config.toml
  1. 启动
python main.py

Docker 使用

  1. 拉取镜像
docker pull pjialin/pyproxy-async:latest
  1. 下载配置文件
curl -o config.toml https://raw.githubusercontent.com/pjialin/pyproxy-async/master/config.toml.example
  1. 启动
docker run -d -v $(PWD)/config.toml:/code/config.toml -v pyproxy-data:/code/data --name pyproxy pjialin/pyproxy-async:latest

Web Api

启动完成之后,访问 127.0.0.1:8080/get_ip (配置文件中的端口),即可获得一个随机的 IP, 如

# curl http://127.0.0.1:8080/get_ip  
{"ip":"213.6.45.18","port":"39252","http":"http://213.6.45.18:39252"}

# 支持过滤条件 https,rule 如
curl http://127.0.0.1:8080/get_ip?https=1&rule=google

从文件或 Url 中加载已存在的 IP 列表

文件

  1. 将文件命名为 *.ip.txt,如 new.ip.txt,并放在根目录下,文件格式为 host:port,如
127.0.0.1:80
127.0.0.1:8080
  1. 加载到 IP 池中
python load.py [file_name]  # 默认加载所有 *.ip.txt 文件

从 Url 中加载

python load.py url # 如 python load.py https://ser.com/ip  支持任意文本,程序通过正则进行匹配

添加抓取服务

增加新的 IP 抓取服务非常简单,只需要定义好要抓取的页面和对应的解析器,框架会自动加载并进行抓取。 在 src/sites 目录中提供了一个示例文件,site.py.example,供参考

集群支持

目前支持使用同一个 Redis 地址,实现集群 IP 检测以及抓取

License

Apache License 2.0

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].