diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 6abb8b53f..016ea08a7 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall -PKG_VERSION:=4.38 +PKG_VERSION:=4.39 PKG_RELEASE:=1 #20211008 diff --git a/luci-app-passwall/root/usr/share/passwall/subscribe.lua b/luci-app-passwall/root/usr/share/passwall/subscribe.lua index f8123d69f..ec5c42539 100755 --- a/luci-app-passwall/root/usr/share/passwall/subscribe.lua +++ b/luci-app-passwall/root/usr/share/passwall/subscribe.lua @@ -422,7 +422,7 @@ local function processData(szType, content, add_mode, add_from) if not info.security then result.security = "auto" end if info.tls == "tls" or info.tls == "1" then result.tls = "1" - result.tls_serverName = info.sni + result.tls_serverName = (info.sni and info.sni ~= "") and info.sni or info.host result.tls_allowInsecure = allowInsecure_default and "1" or "0" else result.tls = "0" @@ -735,9 +735,7 @@ local function processData(szType, content, add_mode, add_from) result.xtls = "1" result.flow = params.flow or "xtls-rprx-direct" end - if params.sni then - result.tls_serverName = params.sni - end + result.tls_serverName = (params.sni and params.sni ~= "") and params.sni or params.host end result.port = port diff --git a/luci-app-serverchan/luasrc/model/cbi/serverchan/advanced.lua b/luci-app-serverchan/luasrc/model/cbi/serverchan/advanced.lua index 704953db7..2e3edf339 100644 --- a/luci-app-serverchan/luasrc/model/cbi/serverchan/advanced.lua +++ b/luci-app-serverchan/luasrc/model/cbi/serverchan/advanced.lua @@ -43,7 +43,7 @@ a:depends({soc_code="pve"}) a=s:option(Value,"server_port",translate("宿主机 SSH 端口")) a.rmempty=true a.default="22" -a.description = translate("SSH 端口默认为 22,如有自定义,请填写自定义 SSH 端口
请确认已经设置好密钥登陆,否则会引起脚本无法运行等错误!
PVE 安装 sensors 命令自行百度
密钥登陆例(自行修改地址与端口号):
opkg update #更新列表
opkg install openssh-client openssh-keygen #安装openssh客户端
ssh-keygen -t rsa # 生成密钥文件(自行设定密码等信息)
ssh root@10.0.0.2 -p 22 \"tee -a ~/.ssh/id_rsa.pub\" < ~/.ssh/id_rsa.pub # 传送公钥到 PVE
ssh root@10.0.0.2 -p 22 \"cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys\" # 写入公钥到 PVE
ssh -i ~/.ssh/id_rsa root@10.0.0.2 -p 22 sensors # 使用私钥连接 PVE 测试温度命令") +a.description = translate("SSH 端口默认为 22,如有自定义,请填写自定义 SSH 端口
请确认已经设置好密钥登陆,否则会引起脚本无法运行等错误!
PVE 安装 sensors 命令自行百度
密钥登陆例(自行修改地址与端口号):
opkg update #更新列表
opkg install openssh-client openssh-keygen #安装openssh客户端
ssh-keygen -t rsa # 生成密钥文件(自行设定密码等信息)
ssh root@10.0.0.2 -p 22 \"tee -a ~/.ssh/id_rsa.pub\" < ~/.ssh/id_rsa.pub # 传送公钥到 PVE
ssh root@10.0.0.2 -p 22 \"cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys\" # 写入公钥到 PVE
ssh -i /root/.ssh/id_rsa root@10.0.0.2 -p 22 sensors # 使用私钥连接 PVE 测试温度命令") a:depends({soc_code="pve"}) a=s:option(Button,"soc",translate("测试温度命令")) diff --git a/luci-app-serverchan/root/usr/bin/serverchan/serverchan b/luci-app-serverchan/root/usr/bin/serverchan/serverchan index be7122e33..06ddfcd20 100755 --- a/luci-app-serverchan/root/usr/bin/serverchan/serverchan +++ b/luci-app-serverchan/root/usr/bin/serverchan/serverchan @@ -248,7 +248,7 @@ function getcpu(){ function soc_temp(){ [ -z "$soc_code" ] && local soctemp=`sensors 2>/dev/null|grep °C|sed -nr 's#^.*:.*\+(.*)°C .*#\1#gp'|sort -nr|head -n1` [ -z "$soc_code" ] && [ -z "$soctemp" ] && local soctemp=`cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null|sort -nr|head -n1|cut -c-2` - [ "$soc_code" == "pve" ] && [ ! -z "$server_host" ] && local soctemp=`ssh -i ~/.ssh/id_rsa root@${server_host} -p ${server_port} sensors 2>/dev/null|grep °C|sed -nr 's#^.*:.*\+(.*)°C .*#\1#gp'|sort -nr|head -n1` + [ "$soc_code" == "pve" ] && [ ! -z "$server_host" ] && local soctemp=`ssh -i /root/.ssh/id_rsa root@${server_host} -p ${server_port} sensors 2>/dev/null|grep Core|sed -nr 's#^.*:.*\+(.*)°C .*#\1#gp'|sort -nr|head -n1` [ ! -z "$soctemp" ] && echo "$soctemp" && return [ ! -z "$soc_code" ] && eval `echo "$soc_code"` 2>/dev/null }