mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 12:16:49 +00:00
feat(console): the VNC console uses the panel's own address
The console pages connect to /novncd/ on the address, scheme and port the page itself was loaded from; nginx proxies it to novncd, which listens on the loopback only. There is nothing to configure: the console works on HTTPS (wss), behind another proxy and on any published port. Before, the page connected to WS_PUBLIC_HOST/PORT/PATH, port 6080 by default: straight to novncd, past nginx and without TLS, so an HTTPS panel and a Docker container published on another port had no console until the public port was set by hand, and novncd listened on every interface. Gone: WS_PUBLIC_PORT, WS_PUBLIC_HOST, WS_PUBLIC_PATH and WS_CERT, the installer's two public console questions and its 6080 firewall rule, the Docker image's WS_PUBLIC_PORT and its init script lines, the manual install's firewall rule for 6080 and nginx's unused /websockify location. WS_HOST defaults to 127.0.0.1. A VM with a QEMU websocket port is still reached on that port of the panel's host name (left for a separate decision).
This commit is contained in:
parent
82af555d45
commit
68b104dfe4
14 changed files with 43 additions and 164 deletions
|
|
@ -37,14 +37,15 @@ The platform provides:
|
|||
| Web Browser / Client |
|
||||
+--------------+--------------+
|
||||
|
|
||||
HTTP / HTTPS (Port 80/443) WebSockets (Port 6080)
|
||||
| |
|
||||
v v
|
||||
HTTP / HTTPS and WebSockets (Port 80/443)
|
||||
|
|
||||
v
|
||||
+------------------------------------------------------------------------------------+
|
||||
| Nginx Reverse Proxy |
|
||||
| ├── /static/ --> Static Assets (WhiteNoise / Nginx) |
|
||||
| ├── / --> Gunicorn (Django WSGI Application) |
|
||||
| └── :6080 --> WebSockify (novncd background service) |
|
||||
| ├── /novncd/ --> novncd (VNC console proxy, 127.0.0.1:6080) |
|
||||
| └── /socket.io/ --> socketiod (serial console, 127.0.0.1:6081) |
|
||||
+-------------------------------------+----------------------------------------------+
|
||||
|
|
||||
v
|
||||
|
|
@ -160,7 +161,7 @@ Built on Django REST Framework with `drf-nested-routers`, providing a structured
|
|||
## 6. Deployment & Service Lifecycle
|
||||
|
||||
1. **Gunicorn**: WSGI application server running `webvirtcloud.wsgi:application` (binds to a Unix socket or port 8000).
|
||||
2. **novncd**: Background WebSockify daemon translating VNC TCP ports to WebSockets on port 6080.
|
||||
2. **novncd**: Background WebSockify daemon translating VNC TCP ports to WebSockets; it listens on 127.0.0.1:6080 behind nginx's `/novncd/`.
|
||||
3. **Nginx**: Front-facing reverse proxy handling ports 80/443, serving static assets directly, proxying dynamic web requests to Gunicorn, and routing WebSocket console traffic to `novncd`.
|
||||
4. **systemd / runit**: systemd units on hosts (`conf/systemd/`) and runit services in the Docker image (`conf/runit/`) run Gunicorn, novncd, socketiod and the job worker with automatic restarts.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue