Merge branch 'dev' into nft-tun

This commit is contained in:
juewuy
2024-03-08 14:25:18 +08:00
25 changed files with 30 additions and 38 deletions

View File

@@ -89,11 +89,11 @@ jobs:
goos: linux goos: linux
goarch: mips goarch: mips
gomips: softfloat gomips: softfloat
- name: linux-mipsel-softfloat - name: linux-mipsle-softfloat
goos: linux goos: linux
goarch: mipsle goarch: mipsle
gomips: softfloat gomips: softfloat
- name: linux-mipsel-hardfloat - name: linux-mipsle-hardfloat
goos: linux goos: linux
goarch: mipsle goarch: mipsle
gomips: hardfloat gomips: hardfloat
@@ -163,7 +163,7 @@ jobs:
- name: Zip core by tar - name: Zip core by tar
run: | run: |
for arch in amd64 armv5 armv7 arm64 mips-softfloat mipsel-hardfloat mipsel-softfloat;do for arch in amd64 armv5 armv7 arm64 mips-softfloat mipsle-hardfloat mipsle-softfloat;do
mv -f ./tmp/linux-${arch}/meta ./tmp/CrashCore mv -f ./tmp/linux-${arch}/meta ./tmp/CrashCore
chmod +x ./tmp/CrashCore chmod +x ./tmp/CrashCore
tar --no-same-owner -zcvf ./tmp/clash-linux-${arch}.tar.gz -C ./tmp CrashCore tar --no-same-owner -zcvf ./tmp/clash-linux-${arch}.tar.gz -C ./tmp CrashCore

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,8 +1,8 @@
clashnet_v=v1.7.6 clashnet_v=v1.7.6
clashpre_v=2022.11.25 clashpre_v=2022.11.25
clash_v=v1.7.1 clash_v=v1.7.1
meta_v=v1.18.0 meta_v=v1.18.1
singboxp_v=1.8.5-73d97226 singboxp_v=1.8.5-73d97226
singbox_v=1.8.5 singbox_v=1.8.8
versionsh=1.9.0pre14 versionsh=1.9.0pre14
GeoIP_v=20240302 GeoIP_v=20240302

View File

@@ -9,7 +9,7 @@
107#$CRASHDIR/task/task.sh ntp#自动同步ntp时间 107#$CRASHDIR/task/task.sh ntp#自动同步ntp时间
111#$CRASHDIR/task/task.sh update_core#自动更新内核 111#$CRASHDIR/task/task.sh update_core#自动更新内核
112#$CRASHDIR/task/task.sh update_shellclash#自动更新脚本 112#$CRASHDIR/task/task.sh update_scripts#自动更新脚本
113#$CRASHDIR/task/task.sh update_mmdb#自动更新数据库文件 113#$CRASHDIR/task/task.sh update_mmdb#自动更新数据库文件
121#$CRASHDIR/task/task.sh reset_firewall#重设透明路由防火墙 121#$CRASHDIR/task/task.sh reset_firewall#重设透明路由防火墙

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# Copyright (C) Juewuy # Copyright (C) Juewuy
version=1.9.0pre14 version=1.9.0pre15
setdir(){ setdir(){
dir_avail(){ dir_avail(){

View File

@@ -318,7 +318,11 @@ get_core_config(){ #下载内核配置文件
fi fi
else else
Https="" Https=""
[ "$crashcore" = singbox -o "$crashcore" = singboxp ] && check_singbox_config || check_clash_config if [ "$crashcore" = singbox -o "$crashcore" = singboxp ];then
check_singbox_config
else
check_clash_config
fi
#如果不同则备份并替换文件 #如果不同则备份并替换文件
if [ -s $core_config ];then if [ -s $core_config ];then
compare $core_config_new $core_config compare $core_config_new $core_config
@@ -1420,6 +1424,9 @@ makehtml(){ #生成面板跳转文件
cat > ${BINDIR}/ui/index.html <<EOF cat > ${BINDIR}/ui/index.html <<EOF
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -1433,7 +1440,7 @@ makehtml(){ #生成面板跳转文件
<a href="https://metacubexd.pages.dev" style="font-size: 24px;">Meta XD面板(推荐)<br></a> <a href="https://metacubexd.pages.dev" style="font-size: 24px;">Meta XD面板(推荐)<br></a>
<a href="https://yacd.metacubex.one" style="font-size: 24px;">Meta YACD面板(推荐)<br></a> <a href="https://yacd.metacubex.one" style="font-size: 24px;">Meta YACD面板(推荐)<br></a>
<a href="https://yacd.haishan.me" style="font-size: 24px;">Clash YACD面板<br></a> <a href="https://yacd.haishan.me" style="font-size: 24px;">Clash YACD面板<br></a>
<a style="font-size: 18px;"><br>如已安装,请使用Ctrl+F5强制刷新!<br></a> <a style="font-size: 21px;"><br>如已安装,请刷新此页面<br></a>
</div> </div>
</body> </body>
</html </html
@@ -1509,31 +1516,24 @@ core_check(){ #检查及下载内核文件
[ "$start_old" != "已开启" -a "$(cat /proc/1/comm)" = "systemd" ] && restorecon -RF $CRASHDIR 2>/dev/null #修复SELinux权限问题 [ "$start_old" != "已开启" -a "$(cat /proc/1/comm)" = "systemd" ] && restorecon -RF $CRASHDIR 2>/dev/null #修复SELinux权限问题
return 0 return 0
} }
core_exchange(){ #升级为高级内核
#$1目标内核 $2提示语句
logger "检测到${2}!将改为使用${1}核心启动!" 33
rm -rf ${TMPDIR}/CrashCore
rm -rf ${BINDIR}/CrashCore
rm -rf ${BINDIR}/CrashCore.tar.gz
crashcore=${1}
setconfig crashcore ${1}
echo -----------------------------------------------
}
clash_check(){ #clash启动前检查 clash_check(){ #clash启动前检查
#检测vless/hysteria协议 #检测vless/hysteria协议
if [ "$crashcore" != "meta" ] && [ -n "$(cat $core_config | grep -oE 'type: vless|type: hysteria')" ];then [ "$crashcore" != "meta" ] && [ -n "$(cat $core_config | grep -oE 'type: vless|type: hysteria')" ] && core_exchange meta 'vless/hy协议'
echo -----------------------------------------------
logger "检测到vless/hysteria协议将改为使用meta核心启动" 33
rm -rf ${TMPDIR}/CrashCore
rm -rf ${BINDIR}/CrashCore
rm -rf ${BINDIR}/CrashCore.tar.gz
crashcore=meta
setconfig crashcore $crashcore
echo -----------------------------------------------
fi
#检测是否存在高级版规则或者tun模式 #检测是否存在高级版规则或者tun模式
if [ "$crashcore" = "clash" ];then if [ "$crashcore" = "clash" ];then
[ -n "$(cat $core_config | grep -aiE '^script:|proxy-providers|rule-providers|rule-set')" ] || \ [ -n "$(cat $core_config | grep -aiE '^script:|proxy-providers|rule-providers|rule-set')" ] || \
[ "$redir_mod" = "混合模式" ] || \ [ "$redir_mod" = "混合模式" ] || \
[ "$redir_mod" = "Tun模式" ] && { [ "$redir_mod" = "Tun模式" ] && core_exchange meta '当前内核不支持的配置'
echo -----------------------------------------------
logger "检测到高级功能将改为使用meta核心启动" 33
rm -rf ${TMPDIR}/CrashCore
rm -rf ${BINDIR}/CrashCore
rm -rf ${BINDIR}/CrashCore.tar.gz
crashcore=meta
echo -----------------------------------------------
}
fi fi
core_check core_check
#预下载GeoIP数据库 #预下载GeoIP数据库
@@ -1544,15 +1544,7 @@ clash_check(){ #clash启动前检查
} }
singbox_check(){ #singbox启动前检查 singbox_check(){ #singbox启动前检查
#检测PuerNya专属功能 #检测PuerNya专属功能
if [ "$crashcore" != "singboxp" ] && [ -n "$(cat ${CRASHDIR}/jsons/*.json | grep -oE 'shadowsocksr|providers')" ];then [ "$crashcore" != "singboxp" ] && [ -n "$(cat ${CRASHDIR}/jsons/*.json | grep -oE 'shadowsocksr|providers')" ] && core_exchange singboxp 'PuerNya内核专属功能'
echo -----------------------------------------------
logger "检测到PuerNya内核专属功能改为使用singboxp内核启动" 33
rm -rf ${TMPDIR}/CrashCore
rm -rf ${BINDIR}/CrashCore
rm -rf ${BINDIR}/CrashCore.tar.gz
crashcore=singboxp
setconfig crashcore $crashcore
fi
core_check core_check
#预下载geoip-cn.srs数据库 #预下载geoip-cn.srs数据库
[ -n "$(cat ${CRASHDIR}/jsons/*.json | grep -oEi '"rule_set" *: *"geoip-cn"')" ] && ckgeo geoip-cn.srs srs_geoip_cn.srs [ -n "$(cat ${CRASHDIR}/jsons/*.json | grep -oEi '"rule_set" *: *"geoip-cn"')" ] && ckgeo geoip-cn.srs srs_geoip_cn.srs

View File

@@ -86,7 +86,7 @@ update_core(){ #自动更新内核
fi fi
fi fi
} }
update_shellcrash(){ #自动更新脚本 update_scripts(){ #自动更新脚本
#检查版本 #检查版本
check_update check_update
if [ -z "$versionsh" -o "$versionsh" = "versionsh_l" ];then if [ -z "$versionsh" -o "$versionsh" = "versionsh_l" ];then