diff options
author | Joe <rbo@gmx.us> | 2024-05-07 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-05-07 20:20:20 +0200 |
commit | faa4de4a0c187cca6aa9faf0cf403266a9738f76 (patch) | |
tree | fec7edb42e7397ba029b63469ef25a08d7f025ea /src | |
parent | fix (diff) | |
download | hardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.tar.gz hardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.tar.bz2 hardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.tar.xz hardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.tar.zst hardflip-faa4de4a0c187cca6aa9faf0cf403266a9738f76.zip |
fix
Diffstat (limited to 'src')
-rw-r--r-- | src/c_exec.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c_exec.go b/src/c_exec.go index 5afca7a..eb711cd 100644 --- a/src/c_exec.go +++ b/src/c_exec.go @@ -265,6 +265,7 @@ func c_exec(host *HostNode, opts HardOpts, ui *HardUI) { if host == nil { return } + save_host, save_port := host.Host, host.Port tmp_host := host if host.Protocol == PROTOCOL_RDP && len(host.Jump.Host) != 0 { local_host := "127.0.0.1" @@ -277,6 +278,10 @@ func c_exec(host *HostNode, opts HardOpts, ui *HardUI) { tmp_host.Port = local_port } cmd_fmt, cmd_env := c_format_cmd(tmp_host, opts, ui) + if tmp_host.Port != save_port { + tmp_host.Host = save_host + tmp_host.Port = save_port + } if cmd_fmt == nil { return } |