2个不稳定版本
0.2.0 | 2024年6月25日 |
---|---|
0.1.0 | 2023年7月5日 |
#343 in Web编程
每月81次下载
26KB
456 代码行
yxorp
具有实时重载和TLS支持的反向代理。
安装
cargo install yxorp
使用
yxorp
实时重载
kill -HUP <pid>
配置
环境变量
HTTP_PORT
:绑定HTTP服务器的端口。默认为8080
。HTTPS_PORT
:绑定HTTPS服务器的端口。默认为8443
。CONFIG_FILE
:配置文件的路径。默认为config.toml
。
配置文件
cert_file = "cert.pem"
key_file = "key.pem"
[[routes]]
host = "example.com"
address = "192.168.0.1:80"
[[routes]]
host = "example.net"
address = "192.168.0.2:80"
[[routes]]
host = "*.example.com"
address = "192.168.0.3:80"
[[routes]]
host = "*"
address = "192.168.0.4:80"
依赖项
~13–23MB
~414K SLoC