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 4f9b5e202908640b68cc42a5a262078639f8a403
parent 15740538f780d527b5392334069db3e6a7c59515
Author: Sheng <webmaster0115@gmail.com>
Date:   Thu, 19 Sep 2019 09:29:24 +0800

Added get_context_addr method

Diffstat:
Mwebssh/handler.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/webssh/handler.py b/webssh/handler.py @@ -255,11 +255,14 @@ class MixinHandler(object): raise InvalidValueError('Missing value {}'.format(name)) return value + def get_context_addr(self): + return self.context.address[:2] + def get_client_addr(self): if options.xheaders: - return self.get_real_client_addr() or self.context.address[:2] + return self.get_real_client_addr() or self.get_context_addr() else: - return self.context.address[:2] + return self.get_context_addr() def get_real_client_addr(self): ip = self.request.remote_ip