pigpig

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 3 Imported by: 0

README

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

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

使用指南&&参数详解

Documentation

Benchmark

a-benchmark

TODO:

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
internal
pigpig/analytics
Package analytics defines functions and structs used to transport authorization audit data to redis.
Package analytics defines functions and structs used to transport authorization audit data to redis.
pigpig/config
Package config defines pigpig configuration.
Package config defines pigpig configuration.
pigpig/discover/etcd
Package etcd implements `github.com/marmotedu/iam/internal/apiserver/discover.Store` interface.
Package etcd implements `github.com/marmotedu/iam/internal/apiserver/discover.Store` interface.
pigpig/options
Package options contains flags and options for initializing an apiserver
Package options contains flags and options for initializing an apiserver
pkg/code
Package code defines error codes for iam platform.
Package code defines error codes for iam platform.
pkg/logger
Package logger defines gorm logger
Package logger defines gorm logger
pkg/middleware
Package middleware defines multiple gin middlewares
Package middleware defines multiple gin middlewares
pkg/options
Package options is the public flags and options used by a generic api server.
Package options is the public flags and options used by a generic api server.
pkg/server
Package server defines the generic apiserver used by all iam platform.
Package server defines the generic apiserver used by all iam platform.
pkg/util/gormutil
Package gormutil is a util to convert offset and limit to default values.
Package gormutil is a util to convert offset and limit to default values.
pkg/validation
Package validation defines validate functions internal used by iam.
Package validation defines validate functions internal used by iam.
pkg
app
Package app defines an application framework used to create application.
Package app defines an application framework used to create application.
cli/genericclioptions
Package genericclioptions contains flags which can be added to you command, bound, completed, and produce useful helper functions.
Package genericclioptions contains flags which can be added to you command, bound, completed, and produce useful helper functions.
db
Package db provide useful functions to create mysql instance.
Package db provide useful functions to create mysql instance.
log
shutdown
Package shutdown Providing shutdown callbacks for graceful app shutdown
Package shutdown Providing shutdown callbacks for graceful app shutdown
shutdown/shutdownmanagers/posixsignal
Package posixsignal provides a listener for a posix signal.
Package posixsignal provides a listener for a posix signal.
storage
Package storage defines redis storage.
Package storage defines redis storage.
util/fileutil
fileutil
fileutil
util
third_party
forked/murmur3
Package murmur3 implements Austin Appleby's non-cryptographic MurmurHash3.
Package murmur3 implements Austin Appleby's non-cryptographic MurmurHash3.
tools
codegen
Package main is a tool to automate the creation of code init function.
Package main is a tool to automate the creation of code init function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL