luci: let chinadns-ng support nftset
This commit is contained in:
parent
49ea53eaa9
commit
27f11fbe6a
@ -416,14 +416,22 @@ run_chinadns_ng() {
|
||||
[ -s "${RULES_PATH}/chnlist" ] && {
|
||||
local _chnlist_file="${TMP_PATH}/chinadns_chnlist"
|
||||
cp -a "${RULES_PATH}/chnlist" "${_chnlist_file}"
|
||||
_extra_param="${_extra_param} -m ${_chnlist_file} -M -a"
|
||||
local chnroute4_set="chnroute"
|
||||
local chnroute6_set="chnroute6"
|
||||
[ "$nftflag" = "1" ] && {
|
||||
chnroute4_set="inet@fw4@chnroute"
|
||||
chnroute6_set="inet@fw4@chnroute6"
|
||||
}
|
||||
_extra_param="${_extra_param} -4 ${chnroute4_set} -6 ${chnroute6_set} -m ${_chnlist_file} -M -a"
|
||||
}
|
||||
}
|
||||
|
||||
([ -n "$_chnlist" ] || [ -n "$_gfwlist" ]) && [ -s "${RULES_PATH}/gfwlist" ] && {
|
||||
local _gfwlist_file="${TMP_PATH}/chinadns_gfwlist"
|
||||
cp -a "${RULES_PATH}/gfwlist" "${_gfwlist_file}"
|
||||
_extra_param="${_extra_param} -g ${_gfwlist_file} -A gfwlist,gfwlist6"
|
||||
local gfwlist_set="gfwlist,gfwlist6"
|
||||
[ "$nftflag" = "1" ] && gfwlist_set="inet@fw4@gfwlist,inet@fw4@gfwlist6"
|
||||
_extra_param="${_extra_param} -g ${_gfwlist_file} -A ${gfwlist_set}"
|
||||
#当只有使用gfwlist模式时设置默认DNS为本地直连
|
||||
[ -n "$_gfwlist" ] && [ -z "$_chnlist" ] && _default_tag="chn"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user