summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Osorio <rodrigo.osorio@honeywell.com>2018-03-07 15:52:02 +0100
committerrosorio <rodrigo@osorio.me>2018-03-11 21:28:06 +0100
commitb71081fc657581e621d3b814f1e1d9f044c43af4 (patch)
treee565db69981f1d78f60f8ae529145e2a665aed72
parent788f43e263d7b446916000328c5180a0b2015aa9 (diff)
downloadphpvirtualbox-b71081fc657581e621d3b814f1e1d9f044c43af4.zip
phpvirtualbox-b71081fc657581e621d3b814f1e1d9f044c43af4.tar.gz
phpvirtualbox-b71081fc657581e621d3b814f1e1d9f044c43af4.tar.bz2
Add a configuration variable to set the VRDE address
-rw-r--r--config.php-example2
-rw-r--r--endpoints/lib/vboxconnector.php1
2 files changed, 3 insertions, 0 deletions
diff --git a/config.php-example b/config.php-example
index 81eb6a2..e84bf8b 100644
--- a/config.php-example
+++ b/config.php-example
@@ -23,6 +23,8 @@ var $language = 'en';
/* Set the standard VRDE Port Number / Range, e.g. 1010-1020 or 1027 */
var $vrdeports = '9000-9100';
+/* Set the default VRDE address, e.g. 192.168.1.1 */
+#var $vrdeaddress = '192.168.1.1';
/*
*
diff --git a/endpoints/lib/vboxconnector.php b/endpoints/lib/vboxconnector.php
index 01f8384..7f57fba 100644
--- a/endpoints/lib/vboxconnector.php
+++ b/endpoints/lib/vboxconnector.php
@@ -3828,6 +3828,7 @@ class vboxconnector {
$this->session->machine->VRDEServer->enabled = 1;
$this->session->machine->VRDEServer->authTimeout = 5000;
$this->session->machine->VRDEServer->setVRDEProperty('TCP/Ports',($this->settings->vrdeports ? $this->settings->vrdeports : '3390-5000'));
+ $this->session->machine->VRDEServer->setVRDEProperty('TCP/Address',($this->settings->vrdeaddress ? $this->settings->vrdeaddress : '127.0.0.1');
}
} catch (Exception $e) {
//Ignore