![]() |
|
block all sites except preselected with pac file. - Printable Version +- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums) +-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38) +--- Forum: Filter Help/Request (/forumdisplay.php?fid=31) +--- Thread: block all sites except preselected with pac file. (/showthread.php?tid=718) |
block all sites except preselected with pac file. - Dj FM.AM - Jan. 18, 2006 02:21 AM i need help on blocking ALL websites in the pac file except ones i whitelist. I using pac file from schooner. some suggested this forum for help.. ![]() http://www.wilderssecurity.com/showpost.php?s=7&p=659204&postcount=6 I tried obviosu stuff like // ^((http:\/\/|www\.).*\.[a-z]) var re_webhost = ^((http:\/\/|www\.).*\.[a-z])/i; || shExpMatch(url, "*(com?|org|net|us|\wk|gov)*") // ^(||) non worked - z12 - Feb. 06, 2006 08:47 PM Hi Dj FM.AM If I understand correctly, you are not using proxo and you are trying to setup a pacfile to allow access to websites that have been "whitelisted" in the pacfile while blocking all other sites. The pacfile from http://www.schooner.com/~loverso/no-ads/ is essentially a blocking file. Basically, it allows everything that is not listed for blocking. While there is a lot of good info on that site, you would probably be better off creating your own pacfile instead of trying to use his. Something like this should do the trick: Code: // My "Automatic proxy configuration URL"The CheckWhiteList function uses the string search method with regular expressions as an alternative to shExpMatch(str, shexp) which is limited to shell expressions, not regular expressions. Also if you need to check the whole url, you can use u.search instead of h.search. Of course you can still use the special pacfile javascript functions that are described in the "Proxy Client Autoconfig File Format" in your whitelist. HTH Mike |