一个入口完成首次安装,后续统一在管理页升级。
一键安装脚本会识别 Windows、macOS、Linux 的平台与架构,下载对应的服务版二进制,并在安装过程中交互采集首装所需的最小配置。
curl -fsSL https://idefav.github.io/ssh-tunnel/install | sh
irm https://idefav.github.io/ssh-tunnel/install | iex
sudo 才能写入系统目录和注册服务。
server.ip、server.ssh.port、login.username、ssh.private_key_path。local.address、http.local.address、admin.address。SHA256SUMS,校验成功后再写入磁盘和注册服务。socks5.enable=true、http.enable=false、admin.enable=true、自动更新开启。| 平台 | 二进制 | 配置 | 服务标识 |
|---|---|---|---|
| Windows | C:\ssh-tunnel\ssh-tunnel-svc.exe |
C:\ssh-tunnel\.ssh-tunnel\config.properties |
SSHTunnelService |
| Linux | /usr/local/bin/ssh-tunnel |
/etc/ssh-tunnel/config.properties |
ssh-tunnel.service 或 /etc/init.d/ssh-tunnel |
| macOS | /usr/local/bin/ssh-tunnel |
/etc/ssh-tunnel/config.properties |
/Library/LaunchDaemons/com.idefav.ssh-tunnel.plist |
手动安装服务时,也请沿用上面的服务名和路径,这样管理页中的重启和升级逻辑才能准确识别当前平台服务。
下面是与当前程序实现一致的规范配置键示例:
home.dir=/var/lib/ssh-tunnel
server.ip=your-ssh-server
server.ssh.port=22
ssh.private_key_path=/path/to/id_rsa
login.username=root
local.address=127.0.0.1:1081
http.local.address=127.0.0.1:1082
http.enable=false
socks5.enable=true
http.over-ssh.enable=false
http.domain-filter.enable=false
http.domain-filter.file-path=/var/lib/ssh-tunnel/domain.txt
admin.enable=true
admin.address=127.0.0.1:1083
log.file.path=/var/log/ssh-tunnel.log
auto-update.enabled=true
auto-update.owner=idefav
auto-update.repo=ssh-tunnel
auto-update.current-version=v0.0.0
auto-update.check-interval=3600
一键安装只用于首装。升级现有实例时,请打开管理页面版本页:
http://127.0.0.1:1083/view/version
如果安装时自定义了管理端口,请使用当前 admin.address 对应的地址访问版本页。