- 修复SSH资产修改终端类型无效的问题

- 增加「预连接 PDU (Hyper-V / VMConnect)」功能
This commit is contained in:
dushixiang
2022-04-18 21:28:50 +08:00
parent 277599a3b7
commit 4d294e5043
7 changed files with 30 additions and 6 deletions

View File

@ -83,6 +83,9 @@ func (g *Gateway) OpenSshTunnel(id, ip string, port int) (exposedIP string, expo
return "", 0, err
}
// TODO debug
hostname = "0.0.0.0"
localAddr := fmt.Sprintf("%s:%d", hostname, localPort)
listener, err := net.Listen("tcp", localAddr)
if err != nil {
@ -91,8 +94,9 @@ func (g *Gateway) OpenSshTunnel(id, ip string, port int) (exposedIP string, expo
ctx, cancel := context.WithCancel(context.Background())
tunnel := &Tunnel{
ID: id,
LocalHost: hostname,
ID: id,
//LocalHost: hostname,
LocalHost: "docker.for.mac.host.internal",
LocalPort: localPort,
Gateway: g,
RemoteHost: ip,