Sync older uncommited changes from the server

This commit is contained in:
ValdikSS 2020-09-05 12:18:13 +03:00
parent 239081d581
commit 682e59df4b
4 changed files with 9 additions and 11 deletions

View File

@ -6,8 +6,5 @@ PACHTTPSHOST='proxy-ssl.antizapret.prostovpn.org:3143'
# Usual proxy address # Usual proxy address
PACPROXYHOST='proxy-nossl.antizapret.prostovpn.org:29976' PACPROXYHOST='proxy-nossl.antizapret.prostovpn.org:29976'
# Special proxy address for ranges
PACPROXYSPECIAL='CCAHIHA.antizapret.prostovpn.org:3128'
PACFILE="result/proxy-host-ssl.pac" PACFILE="result/proxy-host-ssl.pac"
PACFILE_NOSSL="result/proxy-host-nossl.pac" PACFILE_NOSSL="result/proxy-host-nossl.pac"

View File

@ -18,7 +18,7 @@ awk -f scripts/generate-pac-domains.awk result/hostlist_zones.txt >> "$PACFILE"
# Collapse IP list # Collapse IP list
scripts/collapse_blockedbyip_noid2971.py scripts/collapse_blockedbyip_noid2971.py
echo "// This variable now excludes IP addresses blocked by 27-31-2018/Id2971-18 (since 27.06.2019)" >> "$PACFILE" echo "// This variable now excludes IP addresses blocked by 27-31-2018/Id2971-18 (since 27.06.2019) and 33a-5536/2019 (since 17.05.2020)" >> "$PACFILE"
sort -Vu temp/include-ips.txt result/iplist_blockedbyip_noid2971_collapsed.txt | \ sort -Vu temp/include-ips.txt result/iplist_blockedbyip_noid2971_collapsed.txt | \
grep -v -F -x -f temp/exclude-ips.txt | awk -f scripts/generate-pac-ipaddrs.awk >> "$PACFILE" grep -v -F -x -f temp/exclude-ips.txt | awk -f scripts/generate-pac-ipaddrs.awk >> "$PACFILE"
@ -65,7 +65,7 @@ echo " if (domains.length < 10) return \"DIRECT\"; // list is broken
} }
var shost; var shost;
if (/\.(ru|co|cu|com|info|net|org|gov|edu|int|mil|biz|pp|ne|msk|spb|nnov|od|in|ho|cc|dn|i|tut|v|dp|sl|ddns|dyndns|livejournal|herokuapp|azurewebsites|cloudfront|ucoz|3dn|nov|linode|amazonaws|sl-reverse|kiev|beget|kirov|akadns|scaleway|fastly|hldns|appspot|my1|hwcdn)\.[^.]+$/.test(host)) if (/\.(ru|co|cu|com|info|net|org|gov|edu|int|mil|biz|pp|ne|msk|spb|nnov|od|in|ho|cc|dn|i|tut|v|dp|sl|ddns|dyndns|livejournal|herokuapp|azurewebsites|cloudfront|ucoz|3dn|nov|linode|amazonaws|sl-reverse|kiev|beget|kirov|akadns|scaleway|fastly|hldns|appspot|my1|hwcdn|deviantart)\.[^.]+$/.test(host))
shost = host; shost = host;
else else
shost = host.replace(/(.+)\.([^.]+\.[^.]+$)/, \"\$2\"); shost = host.replace(/(.+)\.([^.]+\.[^.]+$)/, \"\$2\");
@ -93,8 +93,12 @@ echo " if (domains.length < 10) return \"DIRECT\"; // list is broken
iphex = parseInt(iphex[3]) + parseInt(iphex[2])*256 + parseInt(iphex[1])*65536 + parseInt(iphex[0])*16777216; iphex = parseInt(iphex[3]) + parseInt(iphex[2])*256 + parseInt(iphex[1])*65536 + parseInt(iphex[0])*16777216;
} }
var yip = 0; var yip = 0;
var rip = 0;
if (iphex && d_ipaddr.indexOf(iphex) !== -1) {yip = 1;} if (iphex && d_ipaddr.indexOf(iphex) !== -1) {yip = 1;}
if (yip === 1 || curarr.indexOf(curhost) !== -1) { for (var i = 0; i < special.length; i++) {
if (isInNet(oip, special[i][0], special[i][1])) {rip = 1; break;}
}
if (yip === 1 || rip === 1 || curarr.indexOf(curhost) !== -1) {
// WARNING! WARNING! WARNING! // WARNING! WARNING! WARNING!
// You should NOT use these proxy servers outside of PAC file! // You should NOT use these proxy servers outside of PAC file!
@ -106,9 +110,6 @@ echo " return \"HTTPS ${PACHTTPSHOST}; PROXY ${PACPROXYHOST}; DIRECT\";" >> "
echo " return \"PROXY ${PACPROXYHOST}; DIRECT\";" >> "$PACFILE_NOSSL" echo " return \"PROXY ${PACPROXYHOST}; DIRECT\";" >> "$PACFILE_NOSSL"
echo " } echo " }
for (var i = 0; i < special.length; i++) {
if (isInNet(oip, special[i][0], special[i][1])) {return \"PROXY ${PACPROXYSPECIAL}; DIRECT\";}
}
return \"DIRECT\"; return \"DIRECT\";
}" | tee -a "$PACFILE" "$PACFILE_NOSSL" >/dev/null }" | tee -a "$PACFILE" "$PACFILE_NOSSL" >/dev/null

View File

@ -28,7 +28,7 @@ awk -F ';' '($1 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}/) {gsub(/ \| /, RS, $1); print $
awk -F ';' '($1 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}/) && (($2 == "" && $3 == "") || ($1 == $2)) {gsub(/ \| /, RS); print $1}' temp/list.csv | \ awk -F ';' '($1 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}/) && (($2 == "" && $3 == "") || ($1 == $2)) {gsub(/ \| /, RS); print $1}' temp/list.csv | \
awk '/^([0-9]{1,3}\.){3}[0-9]{1,3}$/' | sort -u > result/iplist_blockedbyip.txt awk '/^([0-9]{1,3}\.){3}[0-9]{1,3}$/' | sort -u > result/iplist_blockedbyip.txt
grep -F -v 'Ид2971-18' temp/list.csv | \ grep -F -v 'Ид2971-18' temp/list.csv | grep -F -v '33а-5536/2019' | \
awk -F ';' '($1 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}/) && (($2 == "" && $3 == "") || ($1 == $2)) {gsub(/ \| /, RS); print $1}' | \ awk -F ';' '($1 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}/) && (($2 == "" && $3 == "") || ($1 == $2)) {gsub(/ \| /, RS); print $1}' | \
awk '/^([0-9]{1,3}\.){3}[0-9]{1,3}$/' | sort -u > result/iplist_blockedbyip_noid2971.txt awk '/^([0-9]{1,3}\.){3}[0-9]{1,3}$/' | sort -u > result/iplist_blockedbyip_noid2971.txt

View File

@ -17,7 +17,7 @@
{sub(/\.$/, "", $1)} {sub(/\.$/, "", $1)}
{ {
if (!(/\.(ru|co|cu|com|info|net|org|gov|edu|int|mil|biz|pp|ne|msk|spb|nnov|od|in|ho|cc|dn|i|tut|v|dp|sl|ddns|dyndns|livejournal|herokuapp|azurewebsites|cloudfront|ucoz|3dn|nov|linode|amazonaws|sl-reverse|kiev|beget|kirov|akadns|scaleway|fastly|hldns|appspot|my1|hwcdn)\.[^.]+$/)) if (!(/\.(ru|co|cu|com|info|net|org|gov|edu|int|mil|biz|pp|ne|msk|spb|nnov|od|in|ho|cc|dn|i|tut|v|dp|sl|ddns|dyndns|livejournal|herokuapp|azurewebsites|cloudfront|ucoz|3dn|nov|linode|amazonaws|sl-reverse|kiev|beget|kirov|akadns|scaleway|fastly|hldns|appspot|my1|hwcdn|deviantart)\.[^.]+$/))
{$1 = gensub(/(.+)\.([^.]+\.[^.]+$)/, "\\2", 1)} {$1 = gensub(/(.+)\.([^.]+\.[^.]+$)/, "\\2", 1)}
} }