GithubHelp home page GithubHelp logo

leohazy / proxypool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wenson/proxypool

0.0 1.0 0.0 182 KB

This project provides a http proxy pool for use when you want a http proxy server.

Python 100.00%

proxypool's Introduction

目的

解决抓取站点对访问频率的限制问题,通过匿名代理访问目标站点。

功能

通过一个 HTTP API 提供匿名代理列表。

配置

1、安装项目的依赖 与 python 相关的依赖 (注意该项目使用 python3.3):

$ pip3 install -r requirements.txt

此外系统中还需要安装 redis-server。

2、获取验证代理 在项目根目录下,执行:

$ python3.3 proxypool.py

3、配置 nginx 一个简单的 nginx.conf 形式:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

	upstream frontends {
	    server 127.0.0.1:8000;
		server 127.0.0.1:8001;
		server 127.0.0.1:8002;
		server 127.0.0.1:8003;
		server 127.0.0.1:8004;
	}

	server {
	    listen 9000;
		server_name localhost;

		location / {
			proxy_pass http://frontends;
			proxy_set_header Host $host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_set_header X-Forwarded-Proto $scheme;
		}
	}	
}

启动 nginx:

# nginx -t
# nginx &

4、启动 handler
在该项目目录下,运行:

$ cd handlers
$ python3.3 handler_800* &

5、测试 在 chrome 中下载 Postman 插件,然后通过 POST 方法请求 http://127.0.0.1:9000/proxylist 来查看返回结果。

其他文档

1、API 使用文档

2、项目设计文档

问题反馈

可随时向我 ([email protected]) 反馈使用该项目过程中遇到的问题。

proxypool's People

Contributors

flyer103 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.