Merge branch 'dev' into sb
This commit is contained in:
8
.github/workflows/core_auto_update.yml
vendored
8
.github/workflows/core_auto_update.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: PuerNya/sing-box
|
repository: reF1nd/sing-box
|
||||||
ref: building
|
ref: building
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Check version
|
- name: Check version
|
||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
git remote add sekai https://github.com/SagerNet/sing-box.git
|
git remote add sekai https://github.com/SagerNet/sing-box.git
|
||||||
git fetch --tags sekai
|
git fetch --tags sekai
|
||||||
version_new=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag)
|
version_new=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag)
|
||||||
version_old=$(curl -sSl https://github.com/juewuy/ShellCrash/releases/download/singbox_core_PuerNya/version)
|
version_old=$(curl -sSl https://github.com/juewuy/ShellCrash/releases/download/singbox_core_reF1nd/version)
|
||||||
if [ "$version_old" != "$version_new" ];then
|
if [ "$version_old" != "$version_new" ];then
|
||||||
echo a=$version_old >> $GITHUB_ENV
|
echo a=$version_old >> $GITHUB_ENV
|
||||||
echo b=$version_new >> $GITHUB_ENV
|
echo b=$version_new >> $GITHUB_ENV
|
||||||
@@ -35,9 +35,9 @@ jobs:
|
|||||||
permissions: write-all
|
permissions: write-all
|
||||||
uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev
|
uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev
|
||||||
with:
|
with:
|
||||||
tag1: PuerNya/sing-box
|
tag1: reF1nd/sing-box
|
||||||
tag2: building
|
tag2: building
|
||||||
tag3: singbox_core_PuerNya
|
tag3: singbox_core_reF1nd
|
||||||
tag5: with_quic,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_gvisor
|
tag5: with_quic,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_gvisor
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
|||||||
6
.github/workflows/update_singbox_core.yaml
vendored
6
.github/workflows/update_singbox_core.yaml
vendored
@@ -82,10 +82,10 @@ jobs:
|
|||||||
[ -z "$version" ] && version=${{ inputs.tag2 }}
|
[ -z "$version" ] && version=${{ inputs.tag2 }}
|
||||||
echo version=$version >> $GITHUB_OUTPUT
|
echo version=$version >> $GITHUB_OUTPUT
|
||||||
if [ -z "$TAGS" ];then
|
if [ -z "$TAGS" ];then
|
||||||
if [ "$REPO" = 'PuerNya/sing-box' ];then
|
if [ "$REPO" = 'SagerNet/sing-box' ];then
|
||||||
echo tags=with_quic,with_shadowsocksr,with_clash_api >> $GITHUB_OUTPUT
|
echo tags=with_quic,with_utls,with_clash_api >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo tags=with_quic,with_clash_api >> $GITHUB_OUTPUT
|
echo tags=with_quic,with_utls,with_clash_api,with_shadowsocksr >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo tags=$TAGS >> $GITHUB_OUTPUT
|
echo tags=$TAGS >> $GITHUB_OUTPUT
|
||||||
|
|||||||
10
README_CN.md
10
README_CN.md
@@ -55,13 +55,11 @@
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -i #切换到root用户,如果需要密码,请输入密码
|
sudo -i #切换到root用户,如果需要密码,请输入密码
|
||||||
bash #如已处于bash环境可跳过
|
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && bash /tmp/install.sh && source /etc/profile &> /dev/null
|
||||||
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && bash /tmp/install.sh && source /etc/profile &> /dev/null
|
|
||||||
```
|
```
|
||||||
或者
|
或者
|
||||||
```shell
|
```shell
|
||||||
sudo -i #切换到root用户,如果需要密码,请输入密码
|
sudo -i #切换到root用户,如果需要密码,请输入密码
|
||||||
bash #如已处于bash环境可跳过
|
|
||||||
export url='https://gh.jwsc.eu.org/master' && bash -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
export url='https://gh.jwsc.eu.org/master' && bash -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -74,7 +72,7 @@ export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' && sh -c
|
|||||||
或者
|
或者
|
||||||
```shell
|
```shell
|
||||||
#jsDelivrCDN源
|
#jsDelivrCDN源
|
||||||
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
```
|
```
|
||||||
或者
|
或者
|
||||||
```shell
|
```shell
|
||||||
@@ -91,7 +89,7 @@ export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' && wget
|
|||||||
或者
|
或者
|
||||||
```shell
|
```shell
|
||||||
#jsDelivrCDN源
|
#jsDelivrCDN源
|
||||||
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
~**老旧设备使用低版本wge安装**:<br>
|
~**老旧设备使用低版本wge安装**:<br>
|
||||||
@@ -117,7 +115,7 @@ docker exec -it ShellCrash sh
|
|||||||
apk add curl
|
apk add curl
|
||||||
apk add nftables
|
apk add nftables
|
||||||
#执行安装命令
|
#执行安装命令
|
||||||
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -4,5 +4,5 @@ clash_v=v1.7.1
|
|||||||
meta_v=v1.19.11
|
meta_v=v1.19.11
|
||||||
singboxp_v=1.10.0-alpha.29-067c81a7
|
singboxp_v=1.10.0-alpha.29-067c81a7
|
||||||
singbox_v=1.10.7
|
singbox_v=1.10.7
|
||||||
versionsh=1.9.2beta6
|
versionsh=1.9.2beta7
|
||||||
GeoIP_v=20251121
|
GeoIP_v=20251121
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
version=1.9.2beta6
|
version=1.9.2beta7
|
||||||
|
|
||||||
setdir() {
|
setdir() {
|
||||||
dir_avail() {
|
dir_avail() {
|
||||||
|
|||||||
@@ -116,17 +116,16 @@ ckstatus() {
|
|||||||
[ ! -x ${CRASHDIR}/start.sh ] && chmod +x ${CRASHDIR}/start.sh
|
[ ! -x ${CRASHDIR}/start.sh ] && chmod +x ${CRASHDIR}/start.sh
|
||||||
#检查/tmp内核文件
|
#检查/tmp内核文件
|
||||||
for file in $(ls /tmp | grep -v [/$] | grep -v ' ' | grep -Ev ".*(gz|zip|7z|tar)$" | grep -iE 'CrashCore|^clash$|^clash-linux.*|^mihomo.*|^sing.*box|^clash.meta.*'); do
|
for file in $(ls /tmp | grep -v [/$] | grep -v ' ' | grep -Ev ".*(gz|zip|7z|tar)$" | grep -iE 'CrashCore|^clash$|^clash-linux.*|^mihomo.*|^sing.*box|^clash.meta.*'); do
|
||||||
file=/tmp/$file
|
chmod +x /tmp/$file
|
||||||
chmod +x $file
|
echo -e "发现可用的内核文件: \033[36m/tmp/$file\033[0m "
|
||||||
echo -e "发现可用的内核文件: \033[36m$file\033[0m "
|
|
||||||
read -p "是否加载(会停止当前服务)?(1/0) > " res
|
read -p "是否加载(会停止当前服务)?(1/0) > " res
|
||||||
[ "$res" = 1 ] && {
|
[ "$res" = 1 ] && {
|
||||||
${CRASHDIR}/start.sh stop
|
${CRASHDIR}/start.sh stop
|
||||||
core_v=$($file -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
|
core_v=$(/tmp/$file -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
|
||||||
[ -z "$core_v" ] && core_v=$($file version 2>/dev/null | grep -Eo 'version .*' | sed 's/version //')
|
[ -z "$core_v" ] && core_v=$(/tmp/$file version 2>/dev/null | grep -Eo 'version .*' | sed 's/version //')
|
||||||
if [ -n "$core_v" ]; then
|
if [ -n "$core_v" ]; then
|
||||||
source ${CRASHDIR}/webget.sh && setcoretype &&
|
source ${CRASHDIR}/webget.sh && setcoretype &&
|
||||||
mv -f $file ${TMPDIR}/CrashCore &&
|
mv -f /tmp/$file ${TMPDIR}/CrashCore &&
|
||||||
tar -zcf ${BINDIR}/CrashCore.tar.gz ${tar_para} -C ${TMPDIR} CrashCore &&
|
tar -zcf ${BINDIR}/CrashCore.tar.gz ${tar_para} -C ${TMPDIR} CrashCore &&
|
||||||
echo -e "\033[32m内核加载完成!\033[0m " &&
|
echo -e "\033[32m内核加载完成!\033[0m " &&
|
||||||
setconfig crashcore $crashcore &&
|
setconfig crashcore $crashcore &&
|
||||||
@@ -135,7 +134,7 @@ ckstatus() {
|
|||||||
sleep 1
|
sleep 1
|
||||||
else
|
else
|
||||||
echo -e "\033[33m检测到不可用的内核文件!可能是文件受损或CPU架构不匹配!\033[0m"
|
echo -e "\033[33m检测到不可用的内核文件!可能是文件受损或CPU架构不匹配!\033[0m"
|
||||||
rm -rf $file
|
rm -rf /tmp/$file
|
||||||
echo -e "\033[33m内核文件已移除,请认真检查后重新上传!\033[0m"
|
echo -e "\033[33m内核文件已移除,请认真检查后重新上传!\033[0m"
|
||||||
sleep 2
|
sleep 2
|
||||||
fi
|
fi
|
||||||
@@ -144,14 +143,14 @@ ckstatus() {
|
|||||||
done
|
done
|
||||||
#检查/tmp配置文件
|
#检查/tmp配置文件
|
||||||
for file in $(ls /tmp | grep -v [/$] | grep -v ' ' | grep -iE '.yaml$|.yml$|config.json$'); do
|
for file in $(ls /tmp | grep -v [/$] | grep -v ' ' | grep -iE '.yaml$|.yml$|config.json$'); do
|
||||||
file=/tmp/$file
|
tmp_file=/tmp/$file
|
||||||
echo -e "发现内核配置文件: \033[36m$file\033[0m "
|
echo -e "发现内核配置文件: \033[36m/tmp/$file\033[0m "
|
||||||
read -p "是否加载为$crashcore的配置文件?(1/0) > " res
|
read -p "是否加载为$crashcore的配置文件?(1/0) > " res
|
||||||
[ "$res" = 1 ] && {
|
[ "$res" = 1 ] && {
|
||||||
if [ -n "$(echo $file | grep -iE '.json$')" ]; then
|
if [ -n "$(echo /tmp/$file | grep -iE '.json$')" ]; then
|
||||||
mv -f $file ${CRASHDIR}/jsons/config.json
|
mv -f /tmp/$file ${CRASHDIR}/jsons/config.json
|
||||||
else
|
else
|
||||||
mv -f $file ${CRASHDIR}/yamls/config.yaml
|
mv -f /tmp/$file ${CRASHDIR}/yamls/config.yaml
|
||||||
fi
|
fi
|
||||||
echo -e "\033[32m配置文件加载完成!\033[0m "
|
echo -e "\033[32m配置文件加载完成!\033[0m "
|
||||||
sleep 1
|
sleep 1
|
||||||
@@ -1965,7 +1964,7 @@ tools() {
|
|||||||
[ -f /etc/firewall.user ] && echo -e " 4 \033[32m配置\033[0m外网访问SSH"
|
[ -f /etc/firewall.user ] && echo -e " 4 \033[32m配置\033[0m外网访问SSH"
|
||||||
[ -x /usr/sbin/otapredownload ] && echo -e " 5 \033[33m$mi_update\033[0m小米系统自动更新"
|
[ -x /usr/sbin/otapredownload ] && echo -e " 5 \033[33m$mi_update\033[0m小米系统自动更新"
|
||||||
[ -f ${CRASHDIR}/misnap_init.sh ] && echo -e " 6 小米设备软固化SSH ———— \033[$mi_autoSSH_type \033[0m"
|
[ -f ${CRASHDIR}/misnap_init.sh ] && echo -e " 6 小米设备软固化SSH ———— \033[$mi_autoSSH_type \033[0m"
|
||||||
[ -f /etc/config/ddns -a -d "/etc/ddns" ] && echo -e " 7 配置\033[32mDDNS服务\033[0m(需下载相关脚本)"
|
[ -f /etc/config/ddns ] && echo -e " 7 配置\033[32mDDNS服务\033[0m(需下载相关脚本)"
|
||||||
[ -f ${CRASHDIR}/misnap_init.sh ] && echo -e " 8 小米设备Tun模块修复 ———— \033[$mi_tunfix \033[0m"
|
[ -f ${CRASHDIR}/misnap_init.sh ] && echo -e " 8 小米设备Tun模块修复 ———— \033[$mi_tunfix \033[0m"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e " 0 返回上级菜单"
|
echo -e " 0 返回上级菜单"
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ getconfig() { #读取配置及全局变量
|
|||||||
#自动生成ua
|
#自动生成ua
|
||||||
[ -z "$user_agent" -o "$user_agent" = "auto" ] && {
|
[ -z "$user_agent" -o "$user_agent" = "auto" ] && {
|
||||||
if [ "$crashcore" = singbox -o "$crashcore" = singboxp ];then
|
if [ "$crashcore" = singbox -o "$crashcore" = singboxp ];then
|
||||||
user_agent="sing-box/$core_v"
|
user_agent="sing-box/singbox/$core_v"
|
||||||
elif [ "$crashcore" = meta ];then
|
elif [ "$crashcore" = meta ];then
|
||||||
user_agent="mihomo/$core_v"
|
user_agent="clash.meta/mihomo/$core_v"
|
||||||
else
|
else
|
||||||
user_agent="clash"
|
user_agent="clash"
|
||||||
fi
|
fi
|
||||||
@@ -199,7 +199,7 @@ put_save() { #推送面板选择
|
|||||||
}
|
}
|
||||||
get_bin() { #专用于项目内部文件的下载
|
get_bin() { #专用于项目内部文件的下载
|
||||||
. "$CRASHDIR"/configs/ShellCrash.cfg >/dev/null
|
. "$CRASHDIR"/configs/ShellCrash.cfg >/dev/null
|
||||||
[ -z "$update_url" ] && update_url=https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master
|
[ -z "$update_url" ] && update_url=https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master
|
||||||
if [ -n "$url_id" ]; then
|
if [ -n "$url_id" ]; then
|
||||||
[ -z "$release_type" ] && release_type=master
|
[ -z "$release_type" ] && release_type=master
|
||||||
if [ "$url_id" = 101 -o "$url_id" = 104 ]; then
|
if [ "$url_id" = 101 -o "$url_id" = 104 ]; then
|
||||||
@@ -541,7 +541,7 @@ EOF
|
|||||||
mv -f "$TMPDIR"/rules.add "$TMPDIR"/rules.yaml
|
mv -f "$TMPDIR"/rules.add "$TMPDIR"/rules.yaml
|
||||||
}
|
}
|
||||||
#mix模式生成rule-providers
|
#mix模式生成rule-providers
|
||||||
[ "$dns_mod" = "mix" ] && ! grep -q 'geosite-cn:' "$TMPDIR"/rule-providers.yaml && ! grep -q 'rule-providers' "$CRASHDIR"/yamls/others.yaml 2>/dev/null && {
|
[ "$dns_mod" = "mix" ] && ! grep -q 'geosite-cn:' "$TMPDIR"/rule-providers.yaml && ! grep -q '^rule-providers' "$CRASHDIR"/yamls/others.yaml 2>/dev/null && {
|
||||||
space=$(sed -n "1p" "$TMPDIR"/rule-providers.yaml | grep -oE '^ *') #获取空格数
|
space=$(sed -n "1p" "$TMPDIR"/rule-providers.yaml | grep -oE '^ *') #获取空格数
|
||||||
[ -z "$space" ] && space=' '
|
[ -z "$space" ] && space=' '
|
||||||
echo "${space}geosite-cn: {type: file, behavior: domain, format: mrs, path: geosite-cn.mrs}" >> "$TMPDIR"/rule-providers.yaml
|
echo "${space}geosite-cn: {type: file, behavior: domain, format: mrs, path: geosite-cn.mrs}" >> "$TMPDIR"/rule-providers.yaml
|
||||||
@@ -1757,7 +1757,7 @@ start_firewall() { #路由规则总入口
|
|||||||
getlanip #获取局域网host地址
|
getlanip #获取局域网host地址
|
||||||
#设置策略路由
|
#设置策略路由
|
||||||
[ "$firewall_area" != 4 ] && {
|
[ "$firewall_area" != 4 ] && {
|
||||||
local table=100
|
local table=166
|
||||||
[ "$redir_mod" = "Tproxy模式" ] && ip route add local default dev lo table $table 2>/dev/null
|
[ "$redir_mod" = "Tproxy模式" ] && ip route add local default dev lo table $table 2>/dev/null
|
||||||
[ "$redir_mod" = "Tun模式" -o "$redir_mod" = "混合模式" ] && {
|
[ "$redir_mod" = "Tun模式" -o "$redir_mod" = "混合模式" ] && {
|
||||||
i=1
|
i=1
|
||||||
@@ -2401,7 +2401,7 @@ webget)
|
|||||||
export all_proxy="http://${auth}127.0.0.1:$mix_port"
|
export all_proxy="http://${auth}127.0.0.1:$mix_port"
|
||||||
url=$(echo $3 | sed 's#https://.*jsdelivr.net/gh/juewuy/ShellCrash[@|/]#https://raw.githubusercontent.com/juewuy/ShellCrash/#' | sed 's#https://gh.jwsc.eu.org/#https://raw.githubusercontent.com/juewuy/ShellCrash/#')
|
url=$(echo $3 | sed 's#https://.*jsdelivr.net/gh/juewuy/ShellCrash[@|/]#https://raw.githubusercontent.com/juewuy/ShellCrash/#' | sed 's#https://gh.jwsc.eu.org/#https://raw.githubusercontent.com/juewuy/ShellCrash/#')
|
||||||
else
|
else
|
||||||
url=$(echo $3 | sed 's#https://raw.githubusercontent.com/juewuy/ShellCrash/#https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@#')
|
url=$(echo $3 | sed 's#https://raw.githubusercontent.com/juewuy/ShellCrash/#https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@#')
|
||||||
fi
|
fi
|
||||||
#参数【$2】代表下载目录,【$3】代表在线地址
|
#参数【$2】代表下载目录,【$3】代表在线地址
|
||||||
#参数【$4】代表输出显示,【$5】不启用重定向
|
#参数【$4】代表输出显示,【$5】不启用重定向
|
||||||
|
|||||||
@@ -1054,6 +1054,7 @@ set_core_config(){ #配置文件功能
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
gen_core_config_link
|
gen_core_config_link
|
||||||
|
set_core_config
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
if [ -f "$CRASHDIR"/v2b_api.sh ];then
|
if [ -f "$CRASHDIR"/v2b_api.sh ];then
|
||||||
@@ -1062,6 +1063,7 @@ set_core_config(){ #配置文件功能
|
|||||||
else
|
else
|
||||||
set_core_config_link
|
set_core_config_link
|
||||||
fi
|
fi
|
||||||
|
set_core_config
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
if [ "$crashcore" = meta -o "$crashcore" = clashpre ];then
|
if [ "$crashcore" = meta -o "$crashcore" = clashpre ];then
|
||||||
@@ -1094,6 +1096,7 @@ set_core_config(){ #配置文件功能
|
|||||||
checkcfg_new=$(cat $CFG_PATH)
|
checkcfg_new=$(cat $CFG_PATH)
|
||||||
[ "$checkcfg" != "$checkcfg_new" ] && checkrestart
|
[ "$checkcfg" != "$checkcfg_new" ] && checkrestart
|
||||||
fi
|
fi
|
||||||
|
set_core_config
|
||||||
;;
|
;;
|
||||||
7)
|
7)
|
||||||
if [ -z "$Url" -a -z "$Https" ];then
|
if [ -z "$Url" -a -z "$Https" ];then
|
||||||
@@ -1498,15 +1501,15 @@ setcore(){ #内核选择菜单
|
|||||||
echo -e "1 \033[43;30m Clash \033[0m: \033[32m占用低\033[0m"
|
echo -e "1 \033[43;30m Clash \033[0m: \033[32m占用低\033[0m"
|
||||||
echo -e " >>\033[32m$clash_v \033[33m不支持Tun、Rule-set等\033[0m"
|
echo -e " >>\033[32m$clash_v \033[33m不支持Tun、Rule-set等\033[0m"
|
||||||
echo -e " 说明文档: \033[36;4mhttps://lancellc.gitbook.io\033[0m"
|
echo -e " 说明文档: \033[36;4mhttps://lancellc.gitbook.io\033[0m"
|
||||||
echo -e "2 \033[43;30m SingBox \033[0m: \033[32m支持全面占用低\033[0m"
|
#echo -e "2 \033[43;30m SingBox \033[0m: \033[32m支持全面占用低\033[0m"
|
||||||
echo -e " >>\033[32m$singbox_v \033[33m不支持providers\033[0m"
|
#echo -e " >>\033[32m$singbox_v \033[33m不支持providers\033[0m"
|
||||||
echo -e " 说明文档: \033[36;4mhttps://sing-box.sagernet.org\033[0m"
|
#echo -e " 说明文档: \033[36;4mhttps://sing-box.sagernet.org\033[0m"
|
||||||
echo -e "3 \033[43;30m Mihomo \033[0m: \033[32m(原meta内核)支持全面\033[0m"
|
echo -e "3 \033[43;30m Mihomo \033[0m: \033[32m(原meta内核)支持全面\033[0m"
|
||||||
echo -e " >>\033[32m$meta_v \033[33m占用略高,GeoSite可能不兼容华硕固件\033[0m"
|
echo -e " >>\033[32m$meta_v \033[33m占用略高,GeoSite可能不兼容华硕固件\033[0m"
|
||||||
echo -e " 说明文档: \033[36;4mhttps://wiki.metacubex.one\033[0m"
|
echo -e " 说明文档: \033[36;4mhttps://wiki.metacubex.one\033[0m"
|
||||||
echo -e "4 \033[43;30m SingBoxP \033[0m: \033[32m支持ssr、providers、dns并发……\033[0m"
|
#echo -e "4 \033[43;30m SingBoxP \033[0m: \033[32m支持ssr、providers、dns并发……\033[0m"
|
||||||
echo -e " >>\033[32m$singboxp_v \033[33mPuerNya分支版本\033[0m"
|
#echo -e " >>\033[32m$singboxp_v \033[33mPuerNya分支版本\033[0m"
|
||||||
echo -e " 说明文档: \033[36;4mhttps://sing-boxp.dustinwin.top\033[0m"
|
#echo -e " 说明文档: \033[36;4mhttps://sing-boxp.dustinwin.top\033[0m"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "5 \033[36m自定义内核\033[0m $custcore"
|
echo -e "5 \033[36m自定义内核\033[0m $custcore"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
@@ -1663,13 +1666,13 @@ setcustgeo(){ #下载自定义数据库文件
|
|||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
project=DustinWin/ruleset_geodata
|
project=DustinWin/ruleset_geodata
|
||||||
api_tag=mihomo
|
api_tag=mihomo-geodata
|
||||||
checkcustgeo
|
checkcustgeo
|
||||||
setcustgeo
|
setcustgeo
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
project=DustinWin/ruleset_geodata
|
project=DustinWin/ruleset_geodata
|
||||||
api_tag=sing-box
|
api_tag=sing-box-geodata
|
||||||
checkcustgeo
|
checkcustgeo
|
||||||
setcustgeo
|
setcustgeo
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
ddns_dir=/etc/config/ddns
|
ddns_dir=/etc/config/ddns
|
||||||
tmp_dir=/tmp/ddns_$USER
|
tmp_dir=/tmp/ddns_$USER
|
||||||
|
|
||||||
[ ! -f "$ddns_dir" -o ! -d "/etc/ddns" ] && echo -e "本脚本依赖OpenWrt内置的DDNS服务,当前设备无法运行,已退出!" && exit 1
|
[ ! -f "$ddns_dir" ] && echo -e "本脚本依赖OpenWrt内置的DDNS服务,当前设备无法运行,已退出!" && exit 1
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "\033[30;46m欢迎使用ShellDDNS!\033[0m"
|
echo -e "\033[30;46m欢迎使用ShellDDNS!\033[0m"
|
||||||
echo -e "TG群:\033[36;4mhttps://t.me/ShellCrash\033[0m"
|
echo -e "TG群:\033[36;4mhttps://t.me/ShellCrash\033[0m"
|
||||||
@@ -135,15 +135,15 @@ rev_service() {
|
|||||||
|
|
||||||
load_ddns() {
|
load_ddns() {
|
||||||
nr=0
|
nr=0
|
||||||
cat $ddns_dir | grep 'config service' | awk '{print $3}' | sed "s/\'//g" >$tmp_dir
|
cat $ddns_dir | grep 'config service' | awk '{print $3}' | sed "s/\'//g" | sed "s/\"//g" >$tmp_dir
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "列表 域名 启用 IP地址"
|
echo -e "列表 域名 启用 IP地址"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
for service in $(cat $tmp_dir); do
|
for service in $(cat $tmp_dir); do
|
||||||
echo $service >>$tmp_dir
|
#echo $service >>$tmp_dir
|
||||||
nr=$((nr + 1))
|
nr=$((nr + 1))
|
||||||
enabled=$(uci show ddns.$service | grep 'enabled' | awk -F "\'" '{print $2}')
|
enabled=$(uci show ddns.$service 2>/dev/null | grep 'enabled' | awk -F "\'" '{print $2}')
|
||||||
domain=$(uci show ddns.$service | grep 'domain' | awk -F "\'" '{print $2}')
|
domain=$(uci show ddns.$service 2>/dev/null | grep 'domain' | awk -F "\'" '{print $2}')
|
||||||
local_ip=$(cat /var/log/ddns/$service.log | grep 'Local IP' | tail -1 | awk -F "\'" '{print $2}')
|
local_ip=$(cat /var/log/ddns/$service.log | grep 'Local IP' | tail -1 | awk -F "\'" '{print $2}')
|
||||||
echo -e " $nr $domain $enabled $local_ip"
|
echo -e " $nr $domain $enabled $local_ip"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user