新增 重定向防火墙53 udp/tcp 端口 开关

This commit is contained in:
Hyy2001X 2021-01-19 21:49:05 +08:00
parent 291a552cf6
commit 34cf4eb3d6
2 changed files with 5 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Diy_Core() {
INCLUDE_Passwall=false
INCLUDE_Latest_Xray=true
INCLUDE_mt7621_OC1000MHz=false
INCLUDE_Enable_FirewallPort_53=false
}
Diy-Part1() {

View File

@ -6,7 +6,7 @@
GET_TARGET_INFO() {
[ -f ${GITHUB_WORKSPACE}/Openwrt.info ] && . ${GITHUB_WORKSPACE}/Openwrt.info
Default_File="package/lean/default-settings/files/zzz-default-settings"
[ -f ${Default_File} ] && Lede_Version="$(egrep -o "R[0-9]+\.[0-9]+\.[0-9]+" $Default_File)"
[ -f ${Default_File} ] && Lede_Version="$(egrep -o "R[0-9]+\.[0-9]+\.[0-9]+" ${Default_File})"
[[ -z ${Lede_Version} ]] && Lede_Version="Openwrt"
Openwrt_Version="${Lede_Version}-${Compile_Date}"
TARGET_PROFILE="$(egrep -o "CONFIG_TARGET.*DEVICE.*=y" .config | sed -r 's/.*DEVICE_(.*)=y/\1/')"
@ -42,6 +42,9 @@ Diy_Part1_Base() {
Diy_Part2_Base() {
Diy_Core
GET_TARGET_INFO
if [[ "${INCLUDE_Enable_FirewallPort_53}" == "true" ]];then
sed -i "s?iptables?#iptables?g" ${Default_File} > /dev/null 2>&1
fi
if [[ "${INCLUDE_AutoUpdate}" == "true" ]];then
ExtraPackages git lean luci-app-autoupdate https://github.com/Hyy2001X main
sed -i '/luci-app-autoupdate/d' .config > /dev/null 2>&1