Skip to content

The PigPig is a distributed proxy server and it send your request to what you require remote server, the PigPig support service automatic register and discover, internal load balance, and plugins handles the request traffic.

License

Notifications You must be signed in to change notification settings

notone0010/pigpig

Repository files navigation

PigPig - 分布式代理服务器

PigPig 是受anyproxy的启发并且结合工作中所遇到的一些问题的解决方案,基于go语言开发的分布式代理服务器。 支持插件化的HTTP/HTTPS代理服务器,支持动态水平扩容。可供二次开发更灵活的处理请求逻辑,并且支持HTTPS的解析

代码架构 来源于极客时间专栏 Go 语言项目开发实战

特此申明: 项目中很多基础代码都是通过该专栏习得,部分直接引用。

Github地址: https://github.com/notone0010/pigpig

Docker image

docker pull notone0011/pigpig-arm64

安装

  1. Docker/Docker-Compose
  2. 源码安装

Pre-requisite (Docker/Docker-Compose)

  • Docker 18.03+
  • Docker Compose 1.24+

Pre-requisite (源码安装)

  • Go 1.16+
  • Redis 5.x+
  • Etcd v3

快速开始

$ git clone https://github.com/notone0010/pigpig.git $GOPATH/src/github.com/notone0010/pigpig
$ cd $GOPATH/src/github.com/notone0010/pigpig
$ docker-compose up -d

命令执行完成后,可以访问 http://localhost:8080/version 查看当前服务版本信息

version

构建

  1. git clone
$ git clone https://github.com/notone0010/pigpig.git $GOPATH/src/github.com/notone0010/pigpig
  1. 编译
$ cd $GOPATH/src/github.com/notone0010/pigpig
$ make

构建后的二进制文件保存在 _output/platforms/linux/amd64/ 目录下。

  1. 如需解析HTTPS

证书生成

$ make gen.ca

浏览器若使用please trust this CA

信任CA证书(不想写了~歇一歇! 可以不用click, 将会跳转到主页 after your click)

并在配置文件或者命令行指定证书地址

使用指南&&参数详解

Documentation

Benchmark

a-benchmark

TODO:

  • plugins系统
  • PigPig 服务
  • IP资源调度组件
  • IP代理池
  • flink实时分析

About

The PigPig is a distributed proxy server and it send your request to what you require remote server, the PigPig support service automatic register and discover, internal load balance, and plugins handles the request traffic.

Resources

License

Stars

Watchers

Forks

Packages