Merge branch 'dev' into gateway

# Conflicts:
#	scripts/start.sh
This commit is contained in:
juewuy
2025-12-15 21:35:44 +08:00
8 changed files with 1850 additions and 1804 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
meta_v=v1.19.17
singboxr_v=1.13.0-alpha.27
versionsh=1.9.3beta7fix
versionsh=1.9.3beta8
GeoIP_v=20251205

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
version=1.9.3beta7fix
version=1.9.3beta8
setdir() {
dir_avail() {
@@ -159,12 +159,12 @@ setconfig() { #脚本配置工具
fi
}
#特殊固件识别及标记
[ -f "/etc/storage/started_script.sh" ] && {
systype=Padavan #老毛子固件
[ -f "/etc/storage/started_script.sh" ] && { #老毛子固件
systype=Padavan
initdir='/etc/storage/started_script.sh'
}
[ -d "/jffs" ] && {
systype=asusrouter #华硕固件
[ -d "/jffs" ] && { #华硕固件
systype=asusrouter
[ -f "/jffs/.asusrouter" ] && initdir='/jffs/.asusrouter'
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
#华硕启用jffs
@@ -173,7 +173,8 @@ setconfig() { #脚本配置工具
}
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
#容器内环境
grep -qE '/(docker|lxc|kubepods|crio|containerd)/' /proc/1/cgroup || [ -f /run/.containerenv ] || [ -f /.dockerenv ] && systype=container
#检查环境变量
[ -z "$CRASHDIR" -a -n "$clashdir" ] && CRASHDIR=$clashdir
[ -z "$CRASHDIR" -a -d /tmp/SC_tmp ] && setdir
@@ -290,7 +291,6 @@ if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ]; then
uci set firewall.ShellCrash.path="$CRASHDIR/misnap_init.sh"
uci set firewall.ShellCrash.enabled='1'
uci commit firewall
setconfig systype $systype
else
rm -rf ${CRASHDIR}/misnap_init.sh
fi
@@ -303,6 +303,18 @@ fi
#华硕下载大师启动额外设置
[ -f "$dir/asusware.arm/etc/init.d/S50downloadmaster" ] && [ -z "$(grep 'ShellCrash' $dir/asusware.arm/etc/init.d/S50downloadmaster)" ] &&
sed -i "/^PATH=/a\\$CRASHDIR/start.sh init & #ShellCrash初始化脚本" "$dir/asusware.arm/etc/init.d/S50downloadmaster"
#容器环境额外设置
[ "$systype" = 'container' ] && {
setconfig userguide '1'
setconfig crashcore 'meta'
setconfig redir_mod "混合模式"
setconfig dns_mod 'mix'
setconfig firewall_area '1'
setconfig firewall_mod 'nftables'
setconfig start_old '已开启'
echo "$CRASHDIR/menu.sh" >> /etc/profile
}
setconfig systype $systype
#删除临时文件
rm -rf /tmp/*rash*gz
rm -rf /tmp/SC_tmp
@@ -360,7 +372,4 @@ sed -i "s/redir_mod=Nft混合/redir_mod=Tproxy模式/g" $configpath
sed -i "s/redir_mod=Tproxy混合/redir_mod=Tproxy模式/g" $configpath
sed -i "s/redir_mod=纯净模式/firewall_area=4/g" $configpath
#清理路由器空间
[ -d /data/etc_bak ] && rm -rf /data/etc_bak
echo -e "\033[32m脚本初始化完成,请输入\033[30;47m crash \033[0;33m命令开始使用\033[0m"

View File

@@ -694,7 +694,7 @@ setport() { #端口设置
esac
}
setdns() { #DNS详细设置
[ -z "$dns_nameserver" ] && dns_nameserver='180.184.1.1, 1.2.4.8'
[ -z "$dns_nameserver" ] && dns_nameserver='223.5.5.5, 1.2.4.8'
[ -z "$dns_fallback" ] && dns_fallback="1.1.1.1, 8.8.8.8"
[ -z "$dns_resolver" ] && dns_resolver="223.5.5.5, 2400:3200::1"
[ -z "$hosts_opt" ] && hosts_opt=已启用
@@ -811,7 +811,7 @@ setdns() { #DNS详细设置
openssldir="$(openssl version -d 2>&1 | awk -F '"' '{print $2}')"
if [ -s "$openssldir/certs/ca-certificates.crt" ] || [ -s "/etc/ssl/certs/ca-certificates.crt" ] ||
echo "$crashcore" | grep -qE 'meta|singbox'; then
dns_nameserver='https://doh.360.cn/dns-query, https://dns.alidns.com/dns-query, https://doh.pub/dns-query'
dns_nameserver='https://dns.alidns.com/dns-query, https://doh.pub/dns-query'
dns_fallback='https://cloudflare-dns.com/dns-query, https://dns.google/dns-query, https://doh.opendns.com/dns-query'
dns_resolver='https://223.5.5.5/dns-query, 2400:3200::1'
setconfig dns_nameserver "'$dns_nameserver'"

File diff suppressed because it is too large Load Diff

View File

@@ -452,7 +452,7 @@ EOF
"url": "${2}",
"path": "./providers/${1}.yaml",
"user_agent": "clash.meta;mihomo",
"update_interval": "24h",
"update_interval": "12h",
EOF
fi
#通用部分生成
@@ -2352,7 +2352,7 @@ userguide(){
fi
#设置加密DNS
if [ -s $openssldir/certs/ca-certificates.crt ];then
dns_nameserver='https://doh.360.cn/dns-query, https://dns.alidns.com/dns-query, https://doh.pub/dns-query'
dns_nameserver='https://dns.alidns.com/dns-query, https://doh.pub/dns-query'
dns_fallback='https://cloudflare-dns.com/dns-query, https://dns.google/dns-query, https://doh.opendns.com/dns-query'
dns_resolver='https://223.5.5.5/dns-query, 2400:3200::1'
setconfig dns_nameserver "'$dns_nameserver'"

View File

@@ -1 +1 @@
1.9.3beta7fix
1.9.3beta8