Rslocal是一个类似ngrok的Rust实现,使用它可以很方便的构建一条内网穿透隧道。
- 支持HTTP协议
- 支持TCP协议
- 支持UDP协议
- 支持Token登录
- 支持OIDC登录
- 支持连接断开重连
- 客户端支持输出访问日志
运行在本地的客户端程序,用于接收服务器请求并转发给本地的服务
Mac用户
brew install saltbo/bin/rslocal
其他用户(该脚本暂不支持Windows,需要手动下载)
curl -sSf https://raw.githubusercontent.com/saltbo/rslocal/master/install.sh | sh
rslocal config
rslocal http 8000
rslocal http 8000 --subdomain test
rslocal tcp 8000
服务端程序,用于接收外部请求并转发给rslocal
访问 localtest.rs 了解详情
mkdir /etc/rslocal
touch /etc/rslocal/rslocald.toml
#edit your config like example configfile
docker run -it -p 8422:8422 -p 8423:8423 -v /etc/rslocal:/etc/rslocal saltbo/rslocald
[core]
debug = false
bind_addr = "0.0.0.0:8422"
auth_method = "token" # token, oidc
allow_ports = "18000-19000" #TCP端口可用范围,如果有防火墙,可批量开放这部分端口
[http]
bind_addr = "0.0.0.0:8423"
default_domain = "localtest.me:8423"
#default_static = "/etc/rslocal/webroot"
[tokens]
bob = "rslocald_abc11"
alice = "rslocald_abc32"
#[oidc]
#issuer = ""
#audience = ""
- 搜索代码中的todo和fixme标记,解决它
- 实现项目状态中没有打钩的选项
rslocal is under the Apache-2.0 license. See the LICENSE file for details.