TokenFile and multiple targets

626 views
Skip to first unread message

Ian H

unread,
Nov 19, 2021, 2:55:24 PM11/19/21
to noVNC
Hi, thanks for noVNC!

I'm trying to setup multiple targets. I've been following the guides on TokenFiles (maybe its just out of date guide).  But I'm getting an error '--token-plugin option requires 1 argument' then fails to start websockets proxy.

1) I have a token file, in the style of 
machine1: 1.2.3.4:5900
2) I'm starting with
./utils/novnc_proxy --vnc --token-plugin TokenFile --token-source token.list localhost:8080

If someone has any hint, much appreciated!

Ian H

unread,
Nov 19, 2021, 4:22:45 PM11/19/21
to noVNC
I'm getting close (maybe), at least no errors. But no VNC page is displayed.
With the syntax:
vncproxy@vncproxy@~/noVNC/utils/websockify$ ./run --web /home/vncproxy/noVNC --target-config /home/vncproxy/noVNC/token.list localhost:8080

The websocket server seems to start...

- Listen on localhost:8080
- web server. web root: /home/vncproxy/noVNC
- No SSL/TLS
- proxying from localhost:8080 to targets generated by TokenFile

but then I dont see the usual statement which display the "Navigate to this URL: ... etc.etc Press Ctrl-C to exit

Which makes me think something isnt working.  In the examples I've seen online, the URL being used is "  /vnc_auto.html?path?token=machinenickname  "
But I dont see vnc_auto.html in the repo.

Again.. any support or hints, is worth many internet points.  Thanks

Ian H

unread,
Nov 20, 2021, 4:01:55 PM11/20/21
to noVNC
UPDATE
Am able to get the regular VNC landing page to load now.  Just a silly mistake with IP address/localhost.

But I still dont see any connection to machines specified in my token.list

It doesnt seem to matter what --target-config points to.. even a non existent file.
The webserver starts. But it doesnt seem to check/parse anything to see if a target token file exists or if its in the correct format.

Ian H

unread,
Nov 21, 2021, 12:11:43 PM11/21/21
to noVNC
SOVLED:  If anyone is reading along.  There were a few of my simple mistakes, and some details wrong in the guides I was following. These should help others out.  
TLDR: It works: check the URL and start syntax, test from a different device.

1) URL to access the targets:  http://<noVNC_IP>:<port>/vnc.html?path=?token=<name in token file>
2) Startup Websockify with:    ~/noVNC/utils/websockify$ ./run --target-config=token.list --web /home/vncproxy/noVNC <noVNC_IP>:<port>
3) Token file (just my example)  
machine1: <IP of target1>:<port of target1>
machine2: <IP of target2>:<port of target2>

Maybe my use case is unusual, but I also had strange behaviour while testing from a browser on what actually is the same host where target machines run inside VMs.
So test from 'another' host on the network.

Again.. Thanks for noVNC, solves my problem!

Reply all
Reply to author
Forward
0 new messages