commit e01d6b216e53284b2a9aead5dcb4d42131f68f8f Author: Florian Best Date: Thu Nov 14 09:57:06 2019 +0100 Bug #50494: WIP diff --git virtualization/univention-novnc/univention-novnc virtualization/univention-novnc/univention-novnc deleted file mode 100755 index d0408fbf86..0000000000 --- virtualization/univention-novnc/univention-novnc +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# univention-novnc -# wrapper script to execute websockify -# -# Copyright 2019 Univention GmbH -# -# https://www.univention.de/ -# -# All rights reserved. -# -# The source code of this program is made available -# under the terms of the GNU Affero General Public License version 3 -# (GNU AGPL V3) as published by the Free Software Foundation. -# -# Binary versions of this program provided by Univention to you as -# well as other copyrighted, protected or trademarked materials like -# Logos, graphics, fonts, specific documentations and configurations, -# cryptographic keys etc. are subject to a license agreement between -# you and Univention and not subject to the GNU AGPL V3. -# -# In the case you use this program under the terms of the GNU AGPL V3, -# the program is provided in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public -# License with the Debian GNU/Linux or Univention distribution in file -# /usr/share/common-licenses/AGPL-3; if not, see -# . - -DAEMON_ARGS="" -HOSTNAME="$(hostname)" -if [ -r "/etc/univention/ssl/$HOSTNAME/cert.pem" ] && [ -r "/etc/univention/ssl/$HOSTNAME/private.key" ] -then - DAEMON_ARGS="$DAEMON_ARGS --cert /etc/univention/ssl/$HOSTNAME/cert.pem" - DAEMON_ARGS="$DAEMON_ARGS --key /etc/univention/ssl/$HOSTNAME/private.key" -fi - -exec /usr/bin/python3-websockify $DAEMON_ARGS "$@" diff --git virtualization/univention-novnc/univention-novnc.conf virtualization/univention-novnc/univention-novnc.conf index b170a0de64..adc8da23de 100644 --- virtualization/univention-novnc/univention-novnc.conf +++ virtualization/univention-novnc/univention-novnc.conf @@ -1,7 +1 @@ - - RewriteEngine On - RewriteCond %{HTTPS} !=on - RewriteRule ^/univention-novnc/?(.*) http://%{SERVER_NAME}:6080/$1 [R,L] - RewriteCond %{HTTPS} =on - RewriteRule ^/univention-novnc/?(.*) https://%{SERVER_NAME}:6080/$1 [R,L] - +Alias /novnc /usr/share/novnc diff --git virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js index 1b5c3fb5bc..552617552d 100644 --- virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js +++ virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js @@ -452,11 +452,8 @@ define([ vncLink: function( ids, items ) { array.forEach(items, function(item) { - var id = item.id; - var uuid = encodeURIComponent(id.slice(id.indexOf('#') + 1)); - var port = window.location.port ? ':' + window.location.port : ''; var title = encodeURIComponent(item.label + '@' + item.nodeName); - var url = window.location.protocol + '//' + window.location.host + port + '/univention-novnc/vnc_auto.html?port=6080&path=?token=' + uuid + '&title=' + title; + var url = '/novnc/vnc_auto.html?port=' + encodeURIComponent(item.websocket_port) + '&host=' + encodeURIComponent(item.websocket_host) + '&title=' + title; window.open(url, '_blank'); }); },