Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--token-plugin error #213

Closed
kc1116 opened this issue Nov 27, 2015 · 4 comments
Closed

--token-plugin error #213

kc1116 opened this issue Nov 27, 2015 · 4 comments

Comments

@kc1116
Copy link

kc1116 commented Nov 27, 2015

Hello,
I am using websockify to bridge a connection from my spice virtual machine server to the spice html5 browser application. The parameters it takes are Host IP of the websockify server, Port websockify is listening on and a password. My target_list.config file looks like this .....

target1: 165.168.2.54:5908
target2: 165.168.2.54:5910
target3: 165.168.2.54:5909

when i run websockify as ./websockify.py --token-plugin TokenFile --token-source target_list.config 8080

and then try to connect via spice-html5 client, I get this response from websockify

10.0.0.2: Token not present

Is there something I am doing wrong ?

@kc1116 kc1116 closed this as completed Nov 27, 2015
@DirectXMan12
Copy link
Member

Did you fix your issue?

@zhangqunshi
Copy link

I got the same problem, why this issue closed?
BTW: i use the spice_auto.html, and change the token, it doesn't work. Also variable path is not used in spice_auto.html.

zhangqunshi added a commit to zhangqunshi/spice-html5 that referenced this issue Jan 7, 2016
Fix the issue: novnc/websockify#213.
When the websockify use --token-plugin, the spice_auto.html cannot pass the token value to websockify. Because websockfiy use the path, but the path variable is useless in spice_auto.html. So i added the token to the uri if token is not empty.
zhangqunshi added a commit to zhangqunshi/spice-html5 that referenced this issue Jan 7, 2016
Fix the issue: novnc/websockify#213.
When the websockify use --token-plugin, the spice_auto.html cannot pass the token value to websockify. Because websockfiy use the path, but the path variable is useless in spice_auto.html. So i added the token to the uri if token is not empty.
@DirectXMan12
Copy link
Member

why this issue closed?

The original submitter closed it.

You'll need to somehow pass the token as a query parameter in the websocket path (e.g. wss://somehost:6080/websockify?token=mytoken)

@srajan96
Copy link

Try opening the URL as below:
http://localhost:6080/vnc.html?path=?token=token2
This solved the issue for me.

Also, in case you get file not found error, try providing absolute path of the token source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants