block all sites except preselected with pac file.
|
Jan. 18, 2006, 02:21 AM
Post: #1
|
|||
|
|||
block all sites except preselected with pac file.
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....ostcount=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 |
|||
Feb. 06, 2006, 08:47 PM
Post: #2
|
|||
|
|||
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 |
|||
« Next Oldest | Next Newest »
|