1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-03-23 11:04:49 +00:00

For novnc, only need a tunnel to physical host if connhost is not localhost

This commit is contained in:
Valentin Samir 2016-05-04 14:02:37 +02:00
parent 17cb7ace88
commit 2c4a6e16eb

View file

@ -154,7 +154,8 @@ class CompatibilityMixIn(object):
self.msg('Try to open local socket %s' % console_socket)
tsock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
tsock.connect(console_socket)
elif console_socket or re.match('^127\.', console_host):
# only need a tunnel to physical host if host is not localhost
elif connhost != "localhost" and (console_socket or re.match('^127\.', console_host)):
# Need tunnel to physical host
if conntype != CONN_SSH:
self.msg("Need a tunnel to access console but can't mount " +