Skip to content

Commit

Permalink
fix add fallback-filter issue vernesong#156
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Feb 21, 2020
1 parent b52b07e commit 2d12936
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions luci-app-openclash/files/etc/init.d/openclash
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ yml_dns_custom()
if [ ! -z "$(grep '^ \{0,\}fallback:' $2)" ]; then
if [ -z "$(grep '^ \{0,\}fallback-filter:' $2)" ]; then
awk '/^ {0,}fallback:/,/OpenClash-General-Settings/{print}' "$2" |sed '1d' |sed '$d' >/tmp/fallback.cache 2>/dev/null
sed -i '/cfw-bypass:/,$d' /tmp/fallback.cache 2>/dev/null
sed -i '/cfw-latency-timeout:/,$d' /tmp/fallback.cache 2>/dev/null
sed -i '/fallback:/,$d' "$2" 2>/dev/null
echo " fallback:" >>"$2"
sed -i '/ fallback:/a\ - 240.0.0.0/4' "$2" 2>/dev/null
Expand Down

0 comments on commit 2d12936

Please sign in to comment.