# README
网络代理服务
计划
- 适配 macos 系统
- 自动安装证书
使用方式
纯数据中间人
rproxy.RegisterDataMiddle(rproxy.NewMiniDataMiddle("GET", "sspai.com", "/api/v1/recommend/page/get", func(res *http.Response, body []byte) {
fmt.Println(res.Request.URL.String())
}))
证书位置
Windows: %APPDATA%\rockrabbit\rproxy\rproxy-ca-cert.crt
Macos: %HOME%/Library/Containers/rockrabbit/rproxy/rproxy-ca-cert.crt
Windows 安装证书
certutil.exe -addstore root rproxy-ca-cert.crt
Macos 安装证书
sudo security add-trusted-cert -d -p ssl -p basic -k /Library/Keychains/System.keychain rproxy-ca-cert.crt
# Functions
FileExists 文件是否存在.
FiltreResource 过滤静态资源.
GenerateCA 生成根证书.
GetAppDatadir 获取当前系统的 app 数据目录.
GetCommandStdout 获取命令行输出.
LoadRootCA 加载根证书.
No description provided by the author
NewMiniMiddle 实例化微型中间件.
No description provided by the author
RegisterDataMiddle 注册数据中间件.
Run 运行代理服务.
SetCA 设置根证书.
# Structs
No description provided by the author
MiniMiddle 实现微型中间件.
No description provided by the author
RproxyService 代理服务.
# Interfaces
DataMiddle 数据中间代理接口.