代理单个虚机
cd D:\novnc\node_modules\noVNC-1.4.0\websockify-js-master\websockify
node websockify.js --web D:\novnc\node_modules\noVNC-1.4.0 6080 192.168.0.111:5900
http://127.0.0.1:6080/vnc.html?password=12345678
代理多个虚机,用token.conf配置
target1: 10.10.19.152:5900
target2: 10.10.19.152:5901
target3: 192.168.0.111:5900
"D:\Program Files\Python\Python38-32\python.exe" -m websockify --web D:\novnc\node_modules\noVNC-1.4.0\ --target-config=D:\novnc\node_modules\noVNC-1.4.0\token\token.conf 6080
http://127.0.0.1:6080/vnc.html?path=websockify/?token=target1&password=12345678
http://127.0.0.1:6080/vnc.html?path=websockify/?token=target2&password=1q2w3e
对接redis方式,下载websockify-master.zip,
docker build -t novnc/websockify .
把noVNC加到/data/noVNC目录
redis的docker部署
docker run --restart=always --log-opt max-size=100m --log-opt max-file=2 -p 6379:6379 --name myredis -v /etc/redis/redis.conf -d redis redis-server /etc/redis/redis.conf --appendonly yes
set host1 '{"host": "10.10.19.152:5900"}'
set host2 '{"host": "10.10.19.152:5901"}'
set host3 '{"host": "192.168.0.111:5900"}'
用docker部署启动
docker run -it --rm -p 7000:80 -d novnc/websockify1 --web /data/noVNC 80 --token-plugin TokenRedis --token-source 10.10.19.214:6379
访问http://127.0.0.1:6080/vnc.html?path=websockify/?token=host1&password=12345678
部署到开发环境启动:redis指定db0和密码
docker run -it --rm -p 7000:80 -d hub.cloud.huaxiacloud.com:5480/cmpziyanxiangmu15c4/library/novnc:1.0 --web /data/noVNC 80 --token-plugin TokenRedis --token-source 120.46.150.77:16379:0:gDtsU3IPVa
标签:websockify,--,novnc,redis,token,noVNC From: https://www.cnblogs.com/yaoyu1983/p/17308740.html