novnc / websockify

Websockify is a WebSocket to TCP proxy/bridge. This allows a browser to connect to any application/server/service.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use --token-plugin=CLASS and --token-source=ARG ( __main__.py: error: Too many arguments)

shiomax opened this issue · comments

commented

When running websockify like this

./run --token-plugin=JWTTokenApi --token-source=placeholder 6088 127.0.0.1:5900

It prints out

Usage: 
    __main__.py [options] [source_addr:]source_port [target_addr:target_port]
    __main__.py [options] [source_addr:]source_port -- WRAP_COMMAND_LINE

__main__.py: error: Too many arguments

Not sure why. It runs when not specifying token-plugin and also when specifying an auth-plugin instead. Although it fails on something else, at least takes the arguments. Does not work without equals signs either. --help states there should be an equals, but here https://github.com/novnc/websockify/wiki/Token-based-target-selection aren't any. Not sure if it matters and which way arguments should be supplied.

Im using v0.10.0 from the releases not the latest commit. In docker (debian bullseye). I also installed it from the dnf repository on Fedora and the same thing happens there. No idea what Im doing wrong at this point.

That is intended, although a bit unclear from the help output. The token plugin is supposed to provide the target information. So you can not specify that on the command line as well.

Just remove 127.0.0.1:5900 from your command line, and you should be fine.

commented

Oh thanks. Somehow did not read the Token target selection part at the very top of the link I also shared. It's ok then, but behaviour I absolutely did not expect. Seems like this is more a matter of disbelieving the part of the documentation I read. Was thinking it must be incomplete or something. They surely just did not feel like specifying the IP/port there...