From da3d44fc2a7bac338f487ef8127132c5e907754a Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:00:34 +0800 Subject: [PATCH 01/24] Update requirements.txt --- requirements.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index c1a3efeca..6d0f798e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,12 +21,12 @@ Flask-SQLAlchemy>=2.5.1 #Flask-Security-Too==5.5.*; python_version >= '3.10' #Flask-Security-Too==5.4.*; python_version <= '3.9' pyOpenSSL==23.2.0 -cryptography>=40.0.2 +cryptography==40.0.2 configparser==5.2.0 -python-engineio>=4.3.2 -python-socketio>=4.2.0 -flask-socketio>=5.2.0 -flask-sockets>=0.2.1 +python-engineio==4.3.2 +python-socketio==4.2.0 +flask-socketio==5.2.0 +flask-sockets==0.2.1 zmq==0.0.0 paramiko>=2.8.0 pymongo From 35c18c807f49861fb47aea3dc1dfdccc66b87361 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:02:48 +0800 Subject: [PATCH 02/24] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6d0f798e6..f4fef4dd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,7 +24,7 @@ pyOpenSSL==23.2.0 cryptography==40.0.2 configparser==5.2.0 python-engineio==4.3.2 -python-socketio==4.2.0 +python-socketio>=4.2.0 flask-socketio==5.2.0 flask-sockets==0.2.1 zmq==0.0.0 From 94c51196cf097ad12d4c37cfed5faaba7ca980a6 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:07:23 +0800 Subject: [PATCH 03/24] Update requirements.txt --- requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index f4fef4dd1..c1a3efeca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,12 +21,12 @@ Flask-SQLAlchemy>=2.5.1 #Flask-Security-Too==5.5.*; python_version >= '3.10' #Flask-Security-Too==5.4.*; python_version <= '3.9' pyOpenSSL==23.2.0 -cryptography==40.0.2 +cryptography>=40.0.2 configparser==5.2.0 -python-engineio==4.3.2 +python-engineio>=4.3.2 python-socketio>=4.2.0 -flask-socketio==5.2.0 -flask-sockets==0.2.1 +flask-socketio>=5.2.0 +flask-sockets>=0.2.1 zmq==0.0.0 paramiko>=2.8.0 pymongo From ec5a5c8d15c9dd716d8865ae61f8e123b31946eb Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:21:20 +0800 Subject: [PATCH 04/24] Update index.py --- plugins/webhook/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/webhook/index.py b/plugins/webhook/index.py index 9d92ee009..e58dd919f 100755 --- a/plugins/webhook/index.py +++ b/plugins/webhook/index.py @@ -152,7 +152,7 @@ def getLog(): logPath = args['path'] - content = mw.getLastLine(logPath, 100) + content = mw.getLastLine(logPath, 1000) return mw.returnJson(True, 'ok', content) From b7850eaa29f5208c8f299c68114e4503d59964d2 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:22:27 +0800 Subject: [PATCH 05/24] Update index.py --- plugins/webhook/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/webhook/index.py b/plugins/webhook/index.py index e58dd919f..f2c66ec0e 100755 --- a/plugins/webhook/index.py +++ b/plugins/webhook/index.py @@ -152,7 +152,7 @@ def getLog(): logPath = args['path'] - content = mw.getLastLine(logPath, 1000) + content = mw.getLastLine(logPath, 500) return mw.returnJson(True, 'ok', content) From c900048329a5b4811ecd9f519b7f969c55864866 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:35:02 +0800 Subject: [PATCH 06/24] update --- plugins/webhook/index.py | 6 ++++++ plugins/webhook/js/webhook.js | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/plugins/webhook/index.py b/plugins/webhook/index.py index f2c66ec0e..dd2448cf8 100755 --- a/plugins/webhook/index.py +++ b/plugins/webhook/index.py @@ -155,6 +155,12 @@ def getLog(): content = mw.getLastLine(logPath, 500) return mw.returnJson(True, 'ok', content) +def getLogCb(args): + # print(args) + logPath = args['path'] + content = mw.getLastLine(logPath, 500) + return mw.returnData(True, 'ok', content) + def runShellArgs(args): data = getCfg() diff --git a/plugins/webhook/js/webhook.js b/plugins/webhook/js/webhook.js index 72111a09f..dc3a30192 100755 --- a/plugins/webhook/js/webhook.js +++ b/plugins/webhook/js/webhook.js @@ -78,6 +78,30 @@ function whPostCallbak(method, version, args,callback){ },'json'); } +function whPostCallbakN(method, version, args,callback){ + var req_data = {}; + req_data['name'] = 'webhook'; + req_data['func'] = method; + args['version'] = version; + + if (typeof(args) == 'string'){ + req_data['args'] = JSON.stringify(toArrayObject(args)); + } else { + req_data['args'] = JSON.stringify(args); + } + + $.post('/plugins/callback', req_data, function(data) { + if (!data.status){ + layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']}); + return; + } + + if(typeof(callback) == 'function'){ + callback(data); + } + },'json'); +} + function getFileName(file){ var list = file.split('/'); var f = list[list.length-1]; @@ -275,6 +299,23 @@ function getLogsTimer(path,success,error){ }); } +function getLogsTimerCb(path,success,error){ + whPostCallbakN('getLogCb', "", {"path":path}, function(rdata){ + var rdata = rdata.data; + if (!rdata.status){ + if (typeof(error) == 'function'){ + error(); + } + return; + } + + $('[name="site_logs"]').text(rdata.data); + if (typeof(success) == 'function'){ + success(); + } + }); +} + //查看日志 function getLogs(path){ logs_web = layer.open({ @@ -290,7 +331,7 @@ function getLogs(path){ $('[name="site_logs"]').scrollTop($('[name="site_logs"]')[0].scrollHeight); logs_timer = setInterval(function(){ - getLogsTimer(path,function(){ + getLogsTimerCb(path,function(){ },function(){ layer.msg(rdata.msg,{icon:2}); From 2be79ead78d932d8f31d28808e92ebc0dab7b16f Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:36:12 +0800 Subject: [PATCH 07/24] Update index.py --- plugins/webhook/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/webhook/index.py b/plugins/webhook/index.py index dd2448cf8..aca5bebbd 100755 --- a/plugins/webhook/index.py +++ b/plugins/webhook/index.py @@ -158,7 +158,7 @@ def getLog(): def getLogCb(args): # print(args) logPath = args['path'] - content = mw.getLastLine(logPath, 500) + content = mw.getLastLine(logPath, 1000) return mw.returnData(True, 'ok', content) From b8aa2ffc382107af8e3876df591e7cc8883e8226 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:36:46 +0800 Subject: [PATCH 08/24] Update index.py --- plugins/webhook/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/webhook/index.py b/plugins/webhook/index.py index aca5bebbd..0536c3f0d 100755 --- a/plugins/webhook/index.py +++ b/plugins/webhook/index.py @@ -158,7 +158,7 @@ def getLog(): def getLogCb(args): # print(args) logPath = args['path'] - content = mw.getLastLine(logPath, 1000) + content = mw.getLastLine(logPath, 3000) return mw.returnData(True, 'ok', content) From f556eb96073a4bc8734036e9ce80e9ac6c0eff1a Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:41:32 +0800 Subject: [PATCH 09/24] Update git.tpl --- plugins/webhook/tpl/git.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/webhook/tpl/git.tpl b/plugins/webhook/tpl/git.tpl index e7f6776d0..2ec1e9c0f 100644 --- a/plugins/webhook/tpl/git.tpl +++ b/plugins/webhook/tpl/git.tpl @@ -3,6 +3,7 @@ echo "" > {$ROOT_PATH}/server/webhook/scripts/{$REPO_NAME}.log export HOME=/tmp date "+%Y-%m-%d %H:%M:%S" +# 和手动命令一起执行 git config --global credential.helper store git config --global pull.rebase false From f84fcc035c439636c7ebef1d4f57d463cf4892ab Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:43:04 +0800 Subject: [PATCH 10/24] Update git.tpl --- plugins/webhook/tpl/git.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/webhook/tpl/git.tpl b/plugins/webhook/tpl/git.tpl index 2ec1e9c0f..7a04d73be 100644 --- a/plugins/webhook/tpl/git.tpl +++ b/plugins/webhook/tpl/git.tpl @@ -3,7 +3,7 @@ echo "" > {$ROOT_PATH}/server/webhook/scripts/{$REPO_NAME}.log export HOME=/tmp date "+%Y-%m-%d %H:%M:%S" -# 和手动命令一起执行 +# 和手动命令一起执行一次 git config --global credential.helper store git config --global pull.rebase false From b4fa69642ce1a1529f450862c0c0ddd23fcf3b3b Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 23 May 2025 23:44:08 +0800 Subject: [PATCH 11/24] Update index.py --- plugins/webhook/index.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/webhook/index.py b/plugins/webhook/index.py index 0536c3f0d..473f3bbfe 100755 --- a/plugins/webhook/index.py +++ b/plugins/webhook/index.py @@ -196,7 +196,11 @@ def getRunShellCmd(): if 'params' in args: param = args['params'] param = re.sub("\"", '', param) - cmd = "bash {} {}".format(shellFile, param) + + cmd = "" + cmd += "git config --global credential.helper store\n" + cmd += "git config --global pull.rebase false\n" + cmd += "bash {} {}".format(shellFile, param) return mw.returnJson(True, 'ok', cmd) From 545dbeeccaa797ef35fca0f633924a1150647071 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 00:44:49 +0800 Subject: [PATCH 12/24] =?UTF-8?q?=E5=85=88=E5=B0=9D=E8=AF=95=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/utils/ssh/ssh_local.py | 2 ++ web/utils/ssh/ssh_terminal.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/web/utils/ssh/ssh_local.py b/web/utils/ssh/ssh_local.py index 48e4e663e..566646cad 100644 --- a/web/utils/ssh/ssh_local.py +++ b/web/utils/ssh/ssh_local.py @@ -68,6 +68,8 @@ class ssh_local(object): port = mw.getSSHPort() try: + ssh.connect('127.0.0.1', 22, timeout=5) + except Exception as e: ssh.connect('127.0.0.1', port, timeout=5) except Exception as e: ssh.connect('localhost', port, timeout=5) diff --git a/web/utils/ssh/ssh_terminal.py b/web/utils/ssh/ssh_terminal.py index e683e60c0..ddaa8a84d 100644 --- a/web/utils/ssh/ssh_terminal.py +++ b/web/utils/ssh/ssh_terminal.py @@ -182,6 +182,8 @@ class ssh_terminal(object): self.__port = mw.getSSHPort() try: + self.__ps.connect(self.__host, 22, timeout=60) + except Exception as e: self.__ps.connect(self.__host, self.__port, timeout=60) except Exception as e: self.__ps.connect('127.0.0.1', self.__port) From b2785070bc6b9555da3372a30551903bcae8a013 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 00:46:53 +0800 Subject: [PATCH 13/24] Update ssh_terminal.py --- web/utils/ssh/ssh_terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/utils/ssh/ssh_terminal.py b/web/utils/ssh/ssh_terminal.py index ddaa8a84d..908e2ecbd 100644 --- a/web/utils/ssh/ssh_terminal.py +++ b/web/utils/ssh/ssh_terminal.py @@ -182,7 +182,7 @@ class ssh_terminal(object): self.__port = mw.getSSHPort() try: - self.__ps.connect(self.__host, 22, timeout=60) + self.__ps.connect(self.__host, 22, timeout=10) except Exception as e: self.__ps.connect(self.__host, self.__port, timeout=60) except Exception as e: From caeff7de5507ed8673be67e3656e26357f21ea61 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 00:51:29 +0800 Subject: [PATCH 14/24] Update ssh_local.py --- web/utils/ssh/ssh_local.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/utils/ssh/ssh_local.py b/web/utils/ssh/ssh_local.py index 566646cad..410fa864a 100644 --- a/web/utils/ssh/ssh_local.py +++ b/web/utils/ssh/ssh_local.py @@ -34,6 +34,7 @@ class ssh_local(object): __log_type = 'SSH终端' __ssh = None + __lock = False # lock _instance_lock = threading.Lock() @@ -61,6 +62,11 @@ class ssh_local(object): def connectSsh(self): + if self.__lock : + return False + + self.__lock = True + import paramiko ssh = paramiko.SSHClient() mw.createSshInfo() @@ -80,6 +86,8 @@ class ssh_local(object): shell = ssh.invoke_shell(term='xterm', width=83, height=21) shell.setblocking(0) + + self.__lock = True return shell def send(self): From 045d672d683f9024cfe463ef4627602cb3049e71 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 00:51:38 +0800 Subject: [PATCH 15/24] Update ssh_local.py --- web/utils/ssh/ssh_local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/utils/ssh/ssh_local.py b/web/utils/ssh/ssh_local.py index 410fa864a..94c63a5e9 100644 --- a/web/utils/ssh/ssh_local.py +++ b/web/utils/ssh/ssh_local.py @@ -87,7 +87,7 @@ class ssh_local(object): shell = ssh.invoke_shell(term='xterm', width=83, height=21) shell.setblocking(0) - self.__lock = True + self.__lock = False return shell def send(self): From eae75e24f97e12f06d14d863e65e893c3de2574e Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 00:53:34 +0800 Subject: [PATCH 16/24] Update ssh_terminal.py --- web/utils/ssh/ssh_terminal.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/utils/ssh/ssh_terminal.py b/web/utils/ssh/ssh_terminal.py index 908e2ecbd..d1b36547b 100644 --- a/web/utils/ssh/ssh_terminal.py +++ b/web/utils/ssh/ssh_terminal.py @@ -175,7 +175,15 @@ class ssh_terminal(object): else: return self.connectBySocket(sid) + __lock = False + def connectLocalSsh(self, sid): + + if self.__lock : + return False + + self.__lock = True + mw.createSshInfo() self.__ps = paramiko.SSHClient() self.__ps.set_missing_host_key_policy(paramiko.AutoAddPolicy()) @@ -219,6 +227,8 @@ class ssh_terminal(object): mw.writeLog(self.__log_type, '成功登录到SSH服务器 [{}:{}]'.format( self.__host, self.__port)) self.debug('local-ssh:通道已构建') + + self.__lock = False return self.returnMsg(True, '连接成功!') def connectBySocket(self, sid): From 1e9e437b1c0e781a9aba5f66b5db4c54bd44ad79 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 00:54:02 +0800 Subject: [PATCH 17/24] update --- web/utils/ssh/ssh_local.py | 1 - web/utils/ssh/ssh_terminal.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/web/utils/ssh/ssh_local.py b/web/utils/ssh/ssh_local.py index 94c63a5e9..742ddd156 100644 --- a/web/utils/ssh/ssh_local.py +++ b/web/utils/ssh/ssh_local.py @@ -64,7 +64,6 @@ class ssh_local(object): def connectSsh(self): if self.__lock : return False - self.__lock = True import paramiko diff --git a/web/utils/ssh/ssh_terminal.py b/web/utils/ssh/ssh_terminal.py index d1b36547b..904cda3bc 100644 --- a/web/utils/ssh/ssh_terminal.py +++ b/web/utils/ssh/ssh_terminal.py @@ -178,10 +178,8 @@ class ssh_terminal(object): __lock = False def connectLocalSsh(self, sid): - if self.__lock : return False - self.__lock = True mw.createSshInfo() From cc0d0407af4f7f49a271df9b9f94098cd601c0c1 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 00:56:05 +0800 Subject: [PATCH 18/24] Update ssh_terminal.py --- web/utils/ssh/ssh_terminal.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/utils/ssh/ssh_terminal.py b/web/utils/ssh/ssh_terminal.py index 904cda3bc..344d1ba5c 100644 --- a/web/utils/ssh/ssh_terminal.py +++ b/web/utils/ssh/ssh_terminal.py @@ -230,6 +230,9 @@ class ssh_terminal(object): return self.returnMsg(True, '连接成功!') def connectBySocket(self, sid): + if self.__lock : + return False + self.__lock = True if not self.__host: return self.returnMsg(False, '错误的连接地址') if not self.__user: @@ -338,6 +341,7 @@ class ssh_terminal(object): mw.writeLog(self.__log_type, '成功登录到SSH服务器 [{}:{}]'.format( self.__host, self.__port)) self.debug('通道已构建') + self.__lock = False return self.returnMsg(True, '连接成功.') def getSshInfo(self, file): From 3ec2d5e7573b93cdefa9f706f29c36969b0a4d9b Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 00:56:16 +0800 Subject: [PATCH 19/24] Update ssh_terminal.py --- web/utils/ssh/ssh_terminal.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/utils/ssh/ssh_terminal.py b/web/utils/ssh/ssh_terminal.py index 344d1ba5c..32c8b99e6 100644 --- a/web/utils/ssh/ssh_terminal.py +++ b/web/utils/ssh/ssh_terminal.py @@ -188,8 +188,6 @@ class ssh_terminal(object): self.__port = mw.getSSHPort() try: - self.__ps.connect(self.__host, 22, timeout=10) - except Exception as e: self.__ps.connect(self.__host, self.__port, timeout=60) except Exception as e: self.__ps.connect('127.0.0.1', self.__port) From 1390afae0eb421b81dea72e91db238ac303fb9cd Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 01:00:59 +0800 Subject: [PATCH 20/24] Update ssh_local.py --- web/utils/ssh/ssh_local.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/utils/ssh/ssh_local.py b/web/utils/ssh/ssh_local.py index 742ddd156..a7edfad54 100644 --- a/web/utils/ssh/ssh_local.py +++ b/web/utils/ssh/ssh_local.py @@ -117,8 +117,9 @@ class ssh_local(object): if not self.__ssh: self.__ssh = self.connectSsh() - if self.__ssh.exit_status_ready(): - self.__ssh = self.connectSsh() + if hasattr(self.__ssh, 'exit_status_ready'): + if self.__ssh.exit_status_ready(): + self.__ssh = self.connectSsh() self.__ssh.send(info) try: From d11dbbccb78b2c02ed75170b5d692125f6bc3c5b Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 01:03:08 +0800 Subject: [PATCH 21/24] Update ssh_local.py --- web/utils/ssh/ssh_local.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/web/utils/ssh/ssh_local.py b/web/utils/ssh/ssh_local.py index a7edfad54..130e29a7f 100644 --- a/web/utils/ssh/ssh_local.py +++ b/web/utils/ssh/ssh_local.py @@ -117,14 +117,17 @@ class ssh_local(object): if not self.__ssh: self.__ssh = self.connectSsh() - if hasattr(self.__ssh, 'exit_status_ready'): - if self.__ssh.exit_status_ready(): - self.__ssh = self.connectSsh() + if self.__ssh: + if hasattr(self.__ssh, 'exit_status_ready'): + if self.__ssh.exit_status_ready(): + self.__ssh = self.connectSsh() - self.__ssh.send(info) - try: - time.sleep(0.005) - recv = self.__ssh.recv(8192) - return self.wsSend(recv) - except Exception as ex: - return self.wsSend('') + self.__ssh.send(info) + try: + time.sleep(0.005) + recv = self.__ssh.recv(8192) + return self.wsSend(recv) + except Exception as ex: + return self.wsSend('') + else: + return self.wsSend('连接中...') \ No newline at end of file From b2586adda020aec7a24be93426e7fa4650ba3332 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 01:03:31 +0800 Subject: [PATCH 22/24] Update ssh_local.py --- web/utils/ssh/ssh_local.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/utils/ssh/ssh_local.py b/web/utils/ssh/ssh_local.py index 130e29a7f..1a7e47222 100644 --- a/web/utils/ssh/ssh_local.py +++ b/web/utils/ssh/ssh_local.py @@ -118,9 +118,8 @@ class ssh_local(object): self.__ssh = self.connectSsh() if self.__ssh: - if hasattr(self.__ssh, 'exit_status_ready'): - if self.__ssh.exit_status_ready(): - self.__ssh = self.connectSsh() + if self.__ssh.exit_status_ready(): + self.__ssh = self.connectSsh() self.__ssh.send(info) try: From 90714961eb5f57f07a77a69f4bda5c06ff5714f3 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 01:04:26 +0800 Subject: [PATCH 23/24] Update ssh_local.py --- web/utils/ssh/ssh_local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/utils/ssh/ssh_local.py b/web/utils/ssh/ssh_local.py index 1a7e47222..9a5450303 100644 --- a/web/utils/ssh/ssh_local.py +++ b/web/utils/ssh/ssh_local.py @@ -129,4 +129,4 @@ class ssh_local(object): except Exception as ex: return self.wsSend('') else: - return self.wsSend('连接中...') \ No newline at end of file + return self.wsSend("连接中...\n") \ No newline at end of file From 2d10a3a69ecd11fccf9f1f60c2ec22441c4159ad Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 24 May 2025 01:05:41 +0800 Subject: [PATCH 24/24] Update ssh_local.py --- web/utils/ssh/ssh_local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/utils/ssh/ssh_local.py b/web/utils/ssh/ssh_local.py index 9a5450303..13d2795a5 100644 --- a/web/utils/ssh/ssh_local.py +++ b/web/utils/ssh/ssh_local.py @@ -129,4 +129,4 @@ class ssh_local(object): except Exception as ex: return self.wsSend('') else: - return self.wsSend("连接中...\n") \ No newline at end of file + return self.wsSend("连接中...\r\n") \ No newline at end of file