mirror of https://github.com/jumpserver/jumpserver
commit
bf3fb24c3a
|
@ -317,6 +317,8 @@ class WebTerminalHandler(tornado.websocket.WebSocketHandler):
|
||||||
self.term = WebTty(self.user, asset, login_role, login_type='web')
|
self.term = WebTty(self.user, asset, login_role, login_type='web')
|
||||||
# self.term.remote_ip = self.request.remote_ip
|
# self.term.remote_ip = self.request.remote_ip
|
||||||
self.term.remote_ip = self.request.headers.get("X-Real-IP")
|
self.term.remote_ip = self.request.headers.get("X-Real-IP")
|
||||||
|
if not self.term.remote_ip:
|
||||||
|
self.term.remote_ip = self.request.remote_ip
|
||||||
self.ssh = self.term.get_connection()
|
self.ssh = self.term.get_connection()
|
||||||
self.channel = self.ssh.invoke_shell(term='xterm')
|
self.channel = self.ssh.invoke_shell(term='xterm')
|
||||||
WebTerminalHandler.tasks.append(MyThread(target=self.forward_outbound))
|
WebTerminalHandler.tasks.append(MyThread(target=self.forward_outbound))
|
||||||
|
|
|
@ -30,7 +30,7 @@ start() {
|
||||||
echo "jumpserver is running..."
|
echo "jumpserver is running..."
|
||||||
success "$jump_start"
|
success "$jump_start"
|
||||||
else
|
else
|
||||||
daemon python $base_dir/manage.py runserver 0.0.0.0:80 &>> /tmp/jumpserver.log 2>&1 &
|
# daemon python $base_dir/manage.py runserver 0.0.0.0:80 &>> /tmp/jumpserver.log 2>&1 &
|
||||||
daemon python $base_dir/manage.py crontab add &>> /tmp/jumpserver.log 2>&1
|
daemon python $base_dir/manage.py crontab add &>> /tmp/jumpserver.log 2>&1
|
||||||
daemon python $base_dir/run_websocket.py &> /dev/null 2>&1 &
|
daemon python $base_dir/run_websocket.py &> /dev/null 2>&1 &
|
||||||
sleep 4
|
sleep 4
|
||||||
|
|
Loading…
Reference in New Issue