Skip to content

Commit 96224f1

Browse files
authored
Merge pull request unraid#2505 from SimonFair/Fix-VM-Block-commit-processing.-
Fix: Updates for VNC ports
2 parents 2e466e4 + 35f6692 commit 96224f1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

emhttp/plugins/dynamix.vm.manager/include/VMMachines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
if ($vmrcprotocol == "vnc") $vmrcscale = "&resize=scale"; else $vmrcscale = "";
9696
$vmrcurl = autov('/plugins/dynamix.vm.manager/'.$vmrcprotocol.'.html',true).$vmrcscale.'&autoconnect=true&host='._var($_SERVER,'HTTP_HOST');
9797
if ($vmrcprotocol == "spice") $vmrcurl .= '&vmname='. urlencode($vm) .'&port=/wsproxy/'.$vmrcport.'/'; else $vmrcurl .= '&port=&path=/wsproxy/'.$wsport.'/';
98-
$graphics = strtoupper($vmrcprotocol).':'._($auto)."$vrtdriver\n";
98+
$graphics = strtoupper($vmrcprotocol).':'.$vmrcport."$vrtdriver\n";
9999
$virtual = true ;
100100
} elseif ($vmrcport == -1 || $autoport) {
101101
$vmrcprotocol = $lv->domain_get_vmrc_protocol($res);

emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
'model' => 'qxl',
106106
'keymap' => 'none',
107107
'port' => 5900,
108-
'wsport' => 5901,
108+
'wsport' => 5700,
109109
'copypaste' => 'no',
110110
'render' => 'auto',
111111
'DisplayOptions' => ""
@@ -1331,7 +1331,7 @@
13311331
<span id="Porttext" class="label <?=$hiddenport?>">_(VM Console Port)_:</span>
13321332
<input id="port" onchange="checkVNCPorts()" min="5900" max="65535" type="number" size="5" maxlength="5" class="trim second <?=$hiddenport?>" name="gpu[<?=$i?>][port]" value="<?=$arrGPU['port']?>">
13331333
<span id="WSPorttext" class="label <?=$hiddenwsport?>">_(VM Console WS Port)_:</span>
1334-
<input id="wsport" onchange="checkVNCPorts()" min="5900" max="65535" type="number" size="5" maxlength="5" class="trim second <?=$hiddenwsport?>" name="gpu[<?=$i?>][wsport]" value="<?=$arrGPU['wsport']?>">
1334+
<input id="wsport" onchange="checkVNCPorts()" min="5700" max="5899" type="number" size="5" maxlength="5" class="trim second <?=$hiddenwsport?>" name="gpu[<?=$i?>][wsport]" value="<?=$arrGPU['wsport']?>">
13351335
</td>
13361336
<td></td>
13371337
</tr>
@@ -2131,10 +2131,10 @@
21312131
function checkVNCPorts() {
21322132
const port = $("#port").val();
21332133
const wsport = $("#wsport").val();
2134-
if (port < 5900 || port > 65535 || wsport < 5900 || wsport > 65535 || port == wsport) {
2134+
if (port < 5900 || port > 65535 || wsport < 5700 || wsport > 5899 || port == wsport) {
21352135
swal({
21362136
title: "_(Invalid Port)_",
2137-
text: "_(VNC/SPICE ports must be between 5900 and 65535, and cannot be equal to each other)_",
2137+
text: "_(VNC/SPICE ports must be between 5900 and 65535, and cannot be equal to each other. WS port should be between 5700 and 5899)_",
21382138
type: "error",
21392139
confirmButtonText: "_(Ok)_"
21402140
});

0 commit comments

Comments
 (0)