diff --git a/scripts/proxies.sh b/scripts/proxies.sh index 3108e81..6ae2bcf 100755 --- a/scripts/proxies.sh +++ b/scripts/proxies.sh @@ -15,13 +15,9 @@ elif [ -S /tmp/autoconf.sock ] ; then fi # generate the new conf -curl -s "https://iplists.firehol.org/files/firehol_proxies.netset" | grep -v "^\#.*" | -while read entry ; do - check=$(echo $entry | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$") - if [ "$check" != "" ] ; then - echo "deny ${entry};" >> /tmp/block-proxies.conf - fi -done +curl -s "https://iplists.firehol.org/files/firehol_proxies.netset" | \ + grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$" \ + sed 's/^/deny /;s/$/;/' > /tmp/block-proxies.conf # check if we have at least 1 line lines="$(wc -l /tmp/block-proxies.conf | cut -d ' ' -f 1)"