diff --git a/generate-pac.sh b/generate-pac.sh index 49b7de4..7e5479a 100755 --- a/generate-pac.sh +++ b/generate-pac.sh @@ -65,7 +65,7 @@ echo " if (domains.length < 10) return \"DIRECT\"; // list is broken } 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|deviantart)\.[^.]+$/.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|wixmp)\.[^.]+$/.test(host)) shost = host; else shost = host.replace(/(.+)\.([^.]+\.[^.]+$)/, \"\$2\"); diff --git a/scripts/getzones.awk b/scripts/getzones.awk index d775d0d..97a8682 100644 --- a/scripts/getzones.awk +++ b/scripts/getzones.awk @@ -17,7 +17,7 @@ {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|deviantart)\.[^.]+$/)) + 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|wixmp)\.[^.]+$/)) {$1 = gensub(/(.+)\.([^.]+\.[^.]+$)/, "\\2", 1)} }