skip to content
Liu Yang's Blog

Gost 实现SSH Local Port Forwarding

/ 1 min read

Updated:
# 文档地址: https://latest.gost.run/
services:
# 部署的基础服务
- {"name": "mysql", "addr": ":3306", "handler": {"type": "tcp", "chain": "chain-0"}, "listener": {"type": "tcp"}, "forwarder": {"nodes": [{"name": "target-0", "addr": "127.0.0.1:3306"}]}}
# 远程服务器
chains:
- name: chain-0
hops:
# 第一跳
- name: hop-0
# 第一跳节点列表
nodes:
- name: node-0
addr: server:22
connector:
type: sshd
dialer:
type: sshd
auth:
username: root
# password: 不告诉你
metadata:
privateKeyFile: ~\.ssh\id_rsa
# 日志设置
log:
output: stderr
level: error
format: text
rotation:
maxSize: 100
maxAge: 10
maxBackups: 3
localTime: true
compress: false