更新 bin/ ZeroWrt.backup
Signed-off-by: zhao <zhao@noreply.localhost>
This commit is contained in:
parent
e10c7c2752
commit
3e823739b3
@ -250,12 +250,12 @@ one_click_setup() {
|
|||||||
color_output "\e[36m┃ ┃\e[0m"
|
color_output "\e[36m┃ ┃\e[0m"
|
||||||
color_output "\e[36m┃\e[0m 1. SmartDNS + AdGuardHome \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 1. SmartDNS + AdGuardHome \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃\e[0m 2. MosDNS + AdGuardHome \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 2. MosDNS + AdGuardHome \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃\e[0m 3. 恢复默认设置 \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 3. 恢复默认设置 \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃\e[0m 0. 返回上一级 \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 0. 返回上一级 \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃ ┃\e[0m"
|
color_output "\e[36m┃ ┃\e[0m"
|
||||||
color_output "\e[36m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\e[0m"
|
color_output "\e[36m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\e[0m"
|
||||||
|
|
||||||
read -p "$(color_output "\e[33m请输入您的选择 [0-2]: \e[0m")" setup_choice
|
read -p "$(color_output "\e[33m请输入您的选择 [0-3]: \e[0m")" setup_choice
|
||||||
|
|
||||||
case "$setup_choice" in
|
case "$setup_choice" in
|
||||||
1)
|
1)
|
||||||
@ -307,6 +307,7 @@ one_click_setup() {
|
|||||||
/etc/init.d/smartdns restart
|
/etc/init.d/smartdns restart
|
||||||
|
|
||||||
# AdguardHome 设置
|
# AdguardHome 设置
|
||||||
|
cp /etc/config/default_AdGuardHome /etc/config/AdGuardHome.yaml
|
||||||
sed -i 's/cache_size: .*/cache_size: 0/' /etc/AdGuardHome.yaml
|
sed -i 's/cache_size: .*/cache_size: 0/' /etc/AdGuardHome.yaml
|
||||||
sed -i 's/upstream_mode: .*/upstream_mode: parallel/' /etc/AdGuardHome.yaml
|
sed -i 's/upstream_mode: .*/upstream_mode: parallel/' /etc/AdGuardHome.yaml
|
||||||
sed -i 's/upstream_dns_file:.*/upstream_dns_file: \/etc\/AdGuardHome-dnslist.yaml/' /etc/AdGuardHome.yaml
|
sed -i 's/upstream_dns_file:.*/upstream_dns_file: \/etc\/AdGuardHome-dnslist.yaml/' /etc/AdGuardHome.yaml
|
||||||
@ -417,6 +418,7 @@ one_click_setup() {
|
|||||||
/etc/init.d/mosdns restart
|
/etc/init.d/mosdns restart
|
||||||
|
|
||||||
# 配置 AdGuardHome
|
# 配置 AdGuardHome
|
||||||
|
cp /etc/config/default_AdGuardHome /etc/config/AdGuardHome.yaml
|
||||||
sed -i 's/upstream_dns_file:.*/upstream_dns_file: \/etc\/AdGuardHome-mosdns.yaml/' /etc/AdGuardHome.yaml
|
sed -i 's/upstream_dns_file:.*/upstream_dns_file: \/etc\/AdGuardHome-mosdns.yaml/' /etc/AdGuardHome.yaml
|
||||||
sed -i 's/cache_size: .*/cache_size: 0/' /etc/AdGuardHome.yaml
|
sed -i 's/cache_size: .*/cache_size: 0/' /etc/AdGuardHome.yaml
|
||||||
sed -i 's|upstream_dns_file: ""|upstream_dns_file: "/etc/AdGuardHome-mosdns.yaml"|' /etc/AdGuardHome.yaml
|
sed -i 's|upstream_dns_file: ""|upstream_dns_file: "/etc/AdGuardHome-mosdns.yaml"|' /etc/AdGuardHome.yaml
|
||||||
@ -487,7 +489,7 @@ one_click_setup() {
|
|||||||
read -p "按 Enter 键继续..."
|
read -p "按 Enter 键继续..."
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
color_output "\e[36m┃\e[0m 3. 恢复默认设置 \e[36m┃\e[0m"
|
color_output "\e[34m[恢复默认设置]\e[0m"
|
||||||
|
|
||||||
# 恢复 SmartDNS 配置
|
# 恢复 SmartDNS 配置
|
||||||
cp /etc/config/default_smartdns /etc/config/smartdns
|
cp /etc/config/default_smartdns /etc/config/smartdns
|
||||||
@ -506,7 +508,9 @@ one_click_setup() {
|
|||||||
cp /etc/config/default_openclash /etc/config/openclash
|
cp /etc/config/default_openclash /etc/config/openclash
|
||||||
uci commit openclash
|
uci commit openclash
|
||||||
/etc/init.d/openclash restart
|
/etc/init.d/openclash restart
|
||||||
|
color_output "\e[32m恢复默认设置 配置完成。\e[0m"
|
||||||
|
read -p "按 Enter 键继续..."
|
||||||
|
;;
|
||||||
0)
|
0)
|
||||||
show_menu
|
show_menu
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user