webssh

Web based ssh client https://github.com/huashengdun/webssh webssh.huashengdun.org/
git clone http://git.hanabi.in/repos/webssh.git
Log | Files | Refs | README | LICENSE

commit b25fbd7b5733ac84ec0f407d515dd302cf29a356
parent 4b27da5f383be1adb372286a465f0f8ccb91de96
Author: Sheng <webmaster0115@gmail.com>
Date:   Thu, 21 Feb 2019 16:12:48 +0800

Changed exception error message

Diffstat:
Mtests/test_app.py | 2+-
Mwebssh/handler.py | 2+-
Mwebssh/settings.py | 3++-
3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/test_app.py b/tests/test_app.py @@ -653,7 +653,7 @@ class TestAppWithTooManyConnections(OtherTestBase): url = self.get_url('/') response = yield self.async_post(url, self.body) data = json.loads(to_str(response.body)) - self.assertEqual('Too many connections.', data['status']) + self.assertEqual('Too many live connections.', data['status']) clients['127.0.0.1'].clear() response = yield self.async_post(url, self.body) diff --git a/webssh/handler.py b/webssh/handler.py @@ -368,7 +368,7 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler): self.src_addr = self.get_client_addr() if len(clients.get(self.src_addr[0], {})) >= options.maxconn: - raise tornado.web.HTTPError(403, 'Too many connections.') + raise tornado.web.HTTPError(403, 'Too many live connections.') self.check_origin() diff --git a/webssh/settings.py b/webssh/settings.py @@ -41,7 +41,8 @@ define('origin', default='same', help='''Origin policy, separated by comma; '*': wildcard policy, matches any domain, allowed in debug mode only.''') define('wpintvl', type=int, default=0, help='Websocket ping interval') -define('maxconn', type=int, default=20, help='Maximum connections per client') +define('maxconn', type=int, default=20, + help='Maximum live connections (ssh sessions) per client') define('version', type=bool, help='Show version information', callback=print_version)