mirror of
https://bitbucket.org/anticensority/antizapret-pac-generator-light.git
synced 2025-02-22 09:23:14 +03:00
Parse: always force-include custom hosts to the list, regardless of reachability
This commit is contained in:
parent
f8a4d080fa
commit
c150c9535e
4
parse.sh
4
parse.sh
@ -22,13 +22,13 @@ sort -u temp/include-hosts.txt result/hostlist_original.txt > temp/hostlist_orig
|
||||
awk -F ';' '{split($1, a, /\|/); for (i in a) {print a[i]";"$2}}' temp/list.csv | \
|
||||
grep -f config/exclude-hosts-by-ips-dist.txt | awk -F ';' '{print $2}' >> temp/exclude-hosts.txt
|
||||
|
||||
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | sort -u > result/hostlist_zones.txt
|
||||
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | cat - temp/include-hosts.txt | sort -u > result/hostlist_zones.txt
|
||||
|
||||
if [[ "$RESOLVE_NXDOMAIN" == "yes" ]];
|
||||
then
|
||||
timeout 2h scripts/resolve-dns-nxdomain.py result/hostlist_zones.txt > temp/nxdomain-exclude-hosts.txt
|
||||
cat temp/nxdomain-exclude-hosts.txt >> temp/exclude-hosts.txt
|
||||
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | sort -u > result/hostlist_zones.txt
|
||||
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | cat - temp/include-hosts.txt | sort -u > result/hostlist_zones.txt
|
||||
fi
|
||||
|
||||
# Generate a list of IP addresses
|
||||
|
Loading…
x
Reference in New Issue
Block a user