This commit is contained in:
juewuy
2026-03-25 19:49:20 +08:00
parent b1622958e0
commit 13aa2f20cf
4 changed files with 22 additions and 129 deletions

View File

@@ -51,17 +51,6 @@ DNS_IPV6_NOT_SUPPORT="该选项暂不支持IPv6加密DNS"
DNS_ENCRYPT_OK="已设置加密DNS如遇DNS解析问题请重置DNS配置" DNS_ENCRYPT_OK="已设置加密DNS如遇DNS解析问题请重置DNS配置"
DNS_CORE_REQUIRE="请使用Mihomo或SingBox内核" DNS_CORE_REQUIRE="请使用Mihomo或SingBox内核"
DNS_SET_TO="设为" DNS_SET_TO="设为"
DNS_PROTECT_NOW="当前"
DNS_HOSTS_NOW="当前"
DNS_ENABLED="已启用"
DNS_DISABLED="已禁用"
DNS_PROTECT_DISABLE_Q="DNS防泄漏是否确认禁用"
DNS_PROTECT_ENABLE_Q="DNS防泄漏是否确认启用"
DNS_HOSTS_DISABLE_Q="Hosts优化是否确认禁用"
DNS_HOSTS_ENABLE_Q="Hosts优化是否确认启用"
DNS_YES="是"
DNS_RESET_DEFAULT="重置为默认值"
DNS_NO_BACK="否,返回上级菜单"
DNS_REMOVE_OK="移除成功" DNS_REMOVE_OK="移除成功"
DNS_REMOVE_FAIL="移除失败" DNS_REMOVE_FAIL="移除失败"
DNS_INPUT_REDIR_PORT="请直接输入旁路由IPV4地址" DNS_INPUT_REDIR_PORT="请直接输入旁路由IPV4地址"

View File

@@ -53,17 +53,6 @@ DNS_IPV6_NOT_SUPPORT="This option does not support IPv6 encrypted DNS!"
DNS_ENCRYPT_OK="Encrypted DNS has been configured. If DNS issues occur, please reset DNS settings." DNS_ENCRYPT_OK="Encrypted DNS has been configured. If DNS issues occur, please reset DNS settings."
DNS_CORE_REQUIRE="Please use the Mihomo or SingBox core" DNS_CORE_REQUIRE="Please use the Mihomo or SingBox core"
DNS_SET_TO="Set to" DNS_SET_TO="Set to"
DNS_PROTECT_NOW="Current status: "
DNS_HOSTS_NOW="Current status: "
DNS_ENABLED="enabled"
DNS_DISABLED="disabled"
DNS_PROTECT_DISABLE_Q=" DNS leak protection. Disable now?"
DNS_PROTECT_ENABLE_Q=" DNS leak protection. Enable now?"
DNS_HOSTS_DISABLE_Q=" Hosts optimization. Disable now?"
DNS_HOSTS_ENABLE_Q=" Hosts optimization. Enable now?"
DNS_YES="Yes"
DNS_RESET_DEFAULT="Reset to defaults"
DNS_NO_BACK="No, back"
DNS_REMOVE_OK="Removed successfully" DNS_REMOVE_OK="Removed successfully"
DNS_REMOVE_FAIL="Remove failed" DNS_REMOVE_FAIL="Remove failed"
DNS_INPUT_REDIR_PORT="Please input bypass-router IPv4 address" DNS_INPUT_REDIR_PORT="Please input bypass-router IPv4 address"

View File

@@ -153,7 +153,7 @@ ckstatus() {
zip_type=$(echo "$file" | grep -oE 'tar.gz$|upx$|gz$') zip_type=$(echo "$file" | grep -oE 'tar.gz$|upx$|gz$')
. "$CRASHDIR"/menus/9_upgrade.sh && setcoretype . "$CRASHDIR"/menus/9_upgrade.sh && setcoretype
. "$CRASHDIR"/libs/core_tools.sh && core_check "/tmp/$file" . "$CRASHDIR"/libs/core_tools.sh && core_check "/tmp/$file"
if [ "$?" = 0 ]; then if [ "$?" = 0 ] && [ -n "$crashcore" ]; then
msg_alert "\033[32m$MENU_CORE_LOADED_OK\033[0m" msg_alert "\033[32m$MENU_CORE_LOADED_OK\033[0m"
switch_core switch_core
else else

View File

@@ -48,116 +48,31 @@ set_dns_mod() {
msg_alert "\033[36m$DNS_SET_OK$dns_mod\033[0m" msg_alert "\033[36m$DNS_SET_OK$dns_mod\033[0m"
;; ;;
4) 4)
while true; do
line_break
separator_line "="
if [ "$dns_protect" = ON ]; then
content_line "$DNS_PROTECT_NOW\033[33m$DNS_ENABLED\033[0m$DNS_PROTECT_DISABLE_Q"
else
content_line "$DNS_PROTECT_NOW\033[33m$DNS_DISABLED\033[0m$DNS_PROTECT_ENABLE_Q"
fi
separator_line "="
btm_box "1) $DNS_YES" \
"2) $DNS_RESET_DEFAULT" \
"0) $DNS_NO_BACK"
read -r -p "$COMMON_INPUT> " num
case "$num" in
0)
break
;;
1)
if [ "$dns_protect" = ON ]; then if [ "$dns_protect" = ON ]; then
dns_protect=OFF dns_protect=OFF
else else
dns_protect=ON dns_protect=ON
fi fi
;;
2)
dns_protect=ON
;;
*)
errornum
continue
;;
esac
setconfig dns_protect "$dns_protect" setconfig dns_protect "$dns_protect"
common_success common_success
done
;; ;;
5) 5)
while true; do
line_break
separator_line "="
if [ "$hosts_opt" = ON ]; then
content_line "$DNS_HOSTS_NOW\033[33m$DNS_ENABLED\033[0m$DNS_HOSTS_DISABLE_Q"
else
content_line "$DNS_HOSTS_NOW\033[33m$DNS_DISABLED\033[0m$DNS_HOSTS_ENABLE_Q"
fi
separator_line "="
btm_box "1) $DNS_YES" \
"2) $DNS_RESET_DEFAULT" \
"0) $DNS_NO_BACK"
read -r -p "$COMMON_INPUT> " num
case "$num" in
0)
break
;;
1)
if [ "$hosts_opt" = ON ]; then if [ "$hosts_opt" = ON ]; then
hosts_opt=OFF hosts_opt=OFF
else else
hosts_opt=ON hosts_opt=ON
fi fi
;; setconfig hosts_opt "$hosts_opt"
2)
hosts_opt=ON
;;
*)
errornum
continue
;;
esac
setconfig dns_protect "$hosts_opt"
common_success common_success
done
;; ;;
6) 6)
while true; do
line_break
separator_line "="
if [ "$ecs_subnet" = ON ]; then
content_line "$DNS_HOSTS_NOW\033[33m$DNS_ENABLED\033[0m$DNS_HOSTS_DISABLE_Q"
else
content_line "$DNS_HOSTS_NOW\033[33m$DNS_DISABLED\033[0m$DNS_HOSTS_ENABLE_Q"
fi
separator_line "="
btm_box "1) $DNS_YES" \
"2) $DNS_RESET_DEFAULT" \
"0) $DNS_NO_BACK"
read -r -p "$COMMON_INPUT> " num
case "$num" in
0)
break
;;
1)
if [ "$ecs_subnet" = ON ]; then if [ "$ecs_subnet" = ON ]; then
ecs_subnet=OFF ecs_subnet=OFF
else else
ecs_subnet=ON ecs_subnet=ON
fi fi
;; setconfig ecs_subnet "$ecs_subnet"
2)
ecs_subnet=OFF
;;
*)
errornum
continue
;;
esac
setconfig dns_protect "$ecs_subnet"
common_success common_success
done
;; ;;
7) 7)
while true; do while true; do