mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
~优化tg-bot启动流程,兼容更多设备
~优化nftables启动流程,优化启用cn绕过时的运行效率和数据显示 ~修复tg机器人守护进程没有生效的bug ~修复tg机器人总是绑定失败的bug ~修复9-8功能找不到文件的bug ~修复停止服务时的报错 ~修复启动时自动下载缺失数据库时的意外报错 ~修复nftables启用了本机代理后局域网代理出错的bug
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
. "$CRASHDIR"/libs/set_proxy.sh
|
||||
#$1:目标地址 $2:json字符串
|
||||
web_data_get() {
|
||||
setproxy
|
||||
if curl --version >/dev/null 2>&1; then
|
||||
curl -ksSl --connect-timeout 3 "$1" 2>/dev/null
|
||||
else
|
||||
wget -Y on -q --timeout=3 -O - "$1"
|
||||
fi
|
||||
}
|
||||
web_data_post() {
|
||||
setproxy
|
||||
if curl --version >/dev/null 2>&1; then
|
||||
curl -ksSl -X POST --connect-timeout 3 "$1" "$2" >/dev/null 2>&1
|
||||
else
|
||||
wget -Y on -q --timeout=3 --header="Content-Type: application/octet-stream" --method=POST --body-file="$2" "$1"
|
||||
fi
|
||||
}
|
||||
10
scripts/libs/web_get_lite.sh
Normal file
10
scripts/libs/web_get_lite.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
. "$CRASHDIR"/libs/set_proxy.sh
|
||||
#$1:目标地址 $2:json字符串
|
||||
web_get_lite() {
|
||||
setproxy
|
||||
if curl --version >/dev/null 2>&1; then
|
||||
curl -ksSl --connect-timeout 3 "$1" 2>/dev/null
|
||||
else
|
||||
wget -Y on -q --timeout=3 -O - "$1"
|
||||
fi
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
web_json_post() {
|
||||
setproxy
|
||||
if curl --version >/dev/null 2>&1; then
|
||||
curl -kfsSl -X POST --connect-timeout 3 -H "Content-Type: application/json" "$1" -d "$2" >/dev/null
|
||||
curl -kfsSl -X POST --connect-timeout 3 -H "Content-Type: application/json" "$1" -d "$2" >/dev/null 2>&1
|
||||
else
|
||||
wget -Y on -q --timeout=3 --method=POST --header="Content-Type: application/json" --body-data="$2" "$1"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user