代码拉取完成,页面将自动刷新
PBS Server is a http/https proxy balancer, used for select best proxies automaticly.
本工具是为了简单快速的实现一个动态 Http(s) 代理而写,项目上最近有用到 HaProxy 进行相关实现,但是还是感觉太重,而且不支持根据代理的质量(比如时延)进行择优,毕竟代理的网络稳定性并不能得到保障,本着简单的事情只需要简单的实现原则,动手写了一个小工具,分享出来给用得到的人。
├── LICENSE
├── Readme.md
├── go.mod
├── go.sum
├── pbc
│ ├── config.go
│ └── pbc.go // pbc client, used for config a proxy
├── pbs
│ ├── checker.go
│ ├── config.go
│ ├── pbs.go // pbs server, used for manage proxies
│ ├── pbs.json
│ ├── pbs.json.example
│ └── proxy.go
└── test
└── testServer.go // tools for test servers
下载编译构建好的 PBS 客户端,执行./pbs -h
Usage: Config your pbs.json and start pbs with command ./pbs -c ./config.json &
Args:
-c Specify a config json
-h Help and quit
-v Show current version and quit
配置pbs.json
{
"Port": 7788, // port for pbs listening
"ActiveProxyGroups": "all", // select which groups actived, eg: 'all' or 'asia,africa' are same
"Proxies": {
"asia": [
"127.0.0.1:7791 5", // ip:port weight
"127.0.0.1:7792 1"
],
"africa": [
"127.0.0.1:7793 1"
]
}
}
使用 ./pbs -c ./pbs.json
启动即可
PBC 配置在你的代理节点,执行./pbc -h
Usage: you can start pbc at port 7799 with command ./pbc -p 7799 &
Args:
-p Specify PBC client port to start
-h Help and quit
-v Show current version and quit
使用./pbc -p 7791
即可将服务启动在 7791 端口
项目很简单,你只需要下载代码,然后分别执行
go build pbs.go
go build pbc.go
go build test/testServer.go
即可得到对应的二进制可执行文件
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型