diff --git a/websockify/token_plugins.py b/websockify/token_plugins.py index 03800e7..eb9a673 100644 --- a/websockify/token_plugins.py +++ b/websockify/token_plugins.py @@ -70,6 +70,9 @@ class BaseTokenAPI(BasePlugin): def process_result(self, resp): host, port = resp.text.split(':') port = port.encode('ascii','ignore') + port = str.strip(port) + if str.isdigit(port): + port = int(port) return [ host, port ] def lookup(self, token):