Simplify getting a hostinfo or starting a handshake with one (#954)

This commit is contained in:
Nate Brown
2023-08-21 18:51:45 -05:00
committed by GitHub
parent 7edcf620c0
commit 076ebc6c6e
12 changed files with 158 additions and 215 deletions

3
ssh.go
View File

@@ -607,11 +607,10 @@ func sshCreateTunnel(ifce *Interface, fs interface{}, a []string, w sshd.StringW
}
}
hostInfo = ifce.handshakeManager.AddVpnIp(vpnIp)
hostInfo = ifce.handshakeManager.StartHandshake(vpnIp, nil)
if addr != nil {
hostInfo.SetRemote(addr)
}
ifce.getOrHandshake(vpnIp)
return w.WriteLine("Created")
}