[GH-ISSUE #144] noVNC not working on https #97

Closed
opened 2026-02-27 15:57:19 +03:00 by kerem · 5 comments
Owner

Originally created by @lord-kyron on GitHub (May 10, 2018).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/144

Hello,
Over HTTPS everything else is working, except the noVNC. I have a domain name and when I try to access the system over the domain name, the noVNC is timing out. It is working when I use the IPaddress:port. I am using the WebVirtCloud project now, but the issue is the same and persists there too.
I am using this project, cloned from github - not the docker version.
Did any one of you found a solution to this?

Originally created by @lord-kyron on GitHub (May 10, 2018). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/144 Hello, Over HTTPS everything else is working, except the noVNC. I have a domain name and when I try to access the system over the domain name, the noVNC is timing out. It is working when I use the IPaddress:port. I am using the WebVirtCloud project now, but the issue is the same and persists there too. I am using this project, cloned from github - not the docker version. Did any one of you found a solution to this?
kerem closed this issue 2026-02-27 15:57:19 +03:00
Author
Owner

@mplx commented on GitHub (May 14, 2018):

I'm proxying novnc through nginx - maybe my patch is of help to you.

https://github.com/mplx/docker-webvirtcloud/blob/master/01-wsproxy.patch

<!-- gh-comment-id:388722799 --> @mplx commented on GitHub (May 14, 2018): I'm proxying novnc through nginx - maybe my patch is of help to you. https://github.com/mplx/docker-webvirtcloud/blob/master/01-wsproxy.patch
Author
Owner

@lord-kyron commented on GitHub (May 15, 2018):

I've made the changes from your patched files and when I try to open the console now, I am getting:
`

Request Method: GET
http://my.host.com:443/console/?token=1-d8c2d010-1e89-428f-8557-16302b0c89cc
1.8.11
UnboundLocalError
local variable 'ws_host' referenced before assignment
/srv/webvirtcloud/console/views.py in console, line 47
/srv/webvirtcloud/venv/bin/python2
2.7.12
['/srv/webvirtcloud', '/srv/webvirtcloud/venv/bin', '/srv/webvirtcloud/venv/lib/python2.7', '/srv/webvirtcloud/venv/lib/python2.7/plat-x86_64-linux-gnu', '/srv/webvirtcloud/venv/lib/python2.7/lib-tk', '/srv/webvirtcloud/venv/lib/python2.7/lib-old', '/srv/webvirtcloud/venv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/srv/webvirtcloud/venv/local/lib/python2.7/site-packages']
Tue, 15 May 2018 07:35:21 +0000

`
FYI - I am using https, but my certificate is not local. I am using CloudFlare and the SSL cert is offloaded there.

<!-- gh-comment-id:389073095 --> @lord-kyron commented on GitHub (May 15, 2018): I've made the changes from your patched files and when I try to open the console now, I am getting: ` Request Method: | GET -- | -- http://my.host.com:443/console/?token=1-d8c2d010-1e89-428f-8557-16302b0c89cc 1.8.11 UnboundLocalError local variable 'ws_host' referenced before assignment /srv/webvirtcloud/console/views.py in console, line 47 /srv/webvirtcloud/venv/bin/python2 2.7.12 ['/srv/webvirtcloud', '/srv/webvirtcloud/venv/bin', '/srv/webvirtcloud/venv/lib/python2.7', '/srv/webvirtcloud/venv/lib/python2.7/plat-x86_64-linux-gnu', '/srv/webvirtcloud/venv/lib/python2.7/lib-tk', '/srv/webvirtcloud/venv/lib/python2.7/lib-old', '/srv/webvirtcloud/venv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/srv/webvirtcloud/venv/local/lib/python2.7/site-packages'] Tue, 15 May 2018 07:35:21 +0000 ` FYI - I am using https, but my certificate is not local. I am using CloudFlare and the SSL cert is offloaded there.
Author
Owner

@zingmars commented on GitHub (Jun 6, 2018):

Odd, because his patch file worked for me (though I did need to apply an additional fix for https://github.com/retspen/webvirtcloud/issues/126#issuecomment-394981688). I think you might have deleted something, because ws_host is one of the things that you shouldn't have touched.

Also you might want to allow for direct connections in CloudFlare if possible. In my experience CloudFlare does not play well with proxied apps and it usually takes a bit to set up properly.

<!-- gh-comment-id:394982713 --> @zingmars commented on GitHub (Jun 6, 2018): Odd, because his patch file worked for me (though I did need to apply an additional fix for https://github.com/retspen/webvirtcloud/issues/126#issuecomment-394981688). I think you might have deleted something, because ws_host is one of the things that you shouldn't have touched. Also you might want to allow for direct connections in CloudFlare if possible. In my experience CloudFlare does not play well with proxied apps and it usually takes a bit to set up properly.
Author
Owner

@lord-kyron commented on GitHub (Jun 6, 2018):

From another person using the app I've understand, that it is working for him, but he is using local ssl certificate. It is better for me to use the ssl offload on Cloudflare. I also use the DDoS protection there so...
I will check everything again and see if I allow direct connections, would it help!
Thanks!

<!-- gh-comment-id:395033339 --> @lord-kyron commented on GitHub (Jun 6, 2018): From another person using the app I've understand, that it is working for him, but he is using local ssl certificate. It is better for me to use the ssl offload on Cloudflare. I also use the DDoS protection there so... I will check everything again and see if I allow direct connections, would it help! Thanks!
Author
Owner

@zingmars commented on GitHub (Jun 6, 2018):

Afaik DDoS protection essentially proxies everything through their servers. According to this it only proxies HTTP connections, and since you're asking for WebSocket connection, it won't go through (and even if it did, you would essentially be sending all data to Cloudflare which would send it to the client adding quite a bit of latency).

I suppose you could try figuring out a way to send the data over another subdomain or by using a direct IP connection (though WebVirtCloud uses cookies to get the token of the node you want to connect to, and you would need to find a way to set that cookie for that particular domain), but that's a lot of headache.

<!-- gh-comment-id:395123348 --> @zingmars commented on GitHub (Jun 6, 2018): Afaik DDoS protection essentially proxies everything through their servers. According to [this](https://support.cloudflare.com/hc/en-us/articles/200169406-How-do-I-SSH-) it only proxies HTTP connections, and since you're asking for WebSocket connection, it won't go through (and even if it did, you would essentially be sending all data to Cloudflare which would send it to the client adding quite a bit of latency). I suppose you could try figuring out a way to send the data over another subdomain or by using a direct IP connection (though WebVirtCloud uses cookies to get the token of the node you want to connect to, and you would need to find a way to set that cookie for that particular domain), but that's a lot of headache.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#97
No description provided.