mirror of https://gogs.blitter.com/RLabs/xs
Basic -T tun opt parsing
Signed-off-by: Russ Magee <rmagee@gmail.com>
This commit is contained in:
parent
a9ebb102bd
commit
2cb254ef69
|
@ -355,9 +355,15 @@ func parseNonSwitchArgs(a []string) (user, host, path string, isDest bool, other
|
||||||
return fancyUser, fancyHost, fancyPath, isDest, otherArgs
|
return fancyUser, fancyHost, fancyPath, isDest, otherArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
func launchTuns(conn *hkexnet.Conn, remoteHost string, tunSpecs string) {
|
func launchTuns(conn *hkexnet.Conn, remoteHost string, tuns string) {
|
||||||
remAddrs, _ := net.LookupHost(remoteHost)
|
remAddrs, _ := net.LookupHost(remoteHost)
|
||||||
reqTunnel(conn, 6001, remAddrs[0], 7001)
|
|
||||||
|
tunSpecs := strings.Split(tuns, ",")
|
||||||
|
for _,tunItem := range tunSpecs {
|
||||||
|
var lPort, rPort uint16
|
||||||
|
_, _ = fmt.Sscanf(tunItem, "%d:%d", &lPort, &rPort)
|
||||||
|
reqTunnel(conn, lPort, remAddrs[0], rPort)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// hkexsh - a client for secure shell and file copy operations.
|
// hkexsh - a client for secure shell and file copy operations.
|
||||||
|
|
Loading…
Reference in New Issue