|
|
@ -247,6 +247,7 @@ sub start_websockify |
|
|
|
$ws_info = {}; |
|
|
|
$ws_info = {}; |
|
|
|
$ws_info->{pid} = $existing_websockify->{ws_pid}; |
|
|
|
$ws_info->{pid} = $existing_websockify->{ws_pid}; |
|
|
|
$ws_info->{source_port} = $existing_websockify->{ssh_tunnel_forward_port}; |
|
|
|
$ws_info->{source_port} = $existing_websockify->{ssh_tunnel_forward_port}; |
|
|
|
|
|
|
|
$ws_info->{is_existing} = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
@ -329,6 +330,7 @@ sub start_ssh_tunnel |
|
|
|
{ |
|
|
|
{ |
|
|
|
$ssh_tunnel_info = {}; |
|
|
|
$ssh_tunnel_info = {}; |
|
|
|
$ssh_tunnel_info->{pid} = $existing_ssh_tunnel->{ssh_tunnel_pid}; |
|
|
|
$ssh_tunnel_info->{pid} = $existing_ssh_tunnel->{ssh_tunnel_pid}; |
|
|
|
|
|
|
|
$ssh_tunnel_info->{is_existing} = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
@ -636,6 +638,8 @@ sub open_vnc_pipe |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (not $ws_info->{is_existing} or not $ssh_tunnel_info->{is_existing}) |
|
|
|
|
|
|
|
{ |
|
|
|
insert_vnc_pipe({ |
|
|
|
insert_vnc_pipe({ |
|
|
|
server_uuid => $server_uuid, |
|
|
|
server_uuid => $server_uuid, |
|
|
|
server_vnc_port => $vnc_info->{port}, |
|
|
|
server_vnc_port => $vnc_info->{port}, |
|
|
@ -645,6 +649,7 @@ sub open_vnc_pipe |
|
|
|
ssh_tunnel_pid => $ssh_tunnel_info->{pid}, |
|
|
|
ssh_tunnel_pid => $ssh_tunnel_info->{pid}, |
|
|
|
ssh_tunnel_forward_port => $ws_info->{source_port} |
|
|
|
ssh_tunnel_forward_port => $ws_info->{source_port} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sub close_vnc_pipe |
|
|
|
sub close_vnc_pipe |
|
|
|