Revision: 7748 http://sourceforge.net/p/ipcop/svn/7748 Author: owes Date: 2014-12-15 07:04:32 +0000 (Mon, 15 Dec 2014) Log Message: ----------- Add bing safe search, might work. Document Google alternatives, testing.
Modified Paths: -------------- ipcop/trunk/html/cgi-bin/urlfilter.cgi ipcop/trunk/updates/2.1.8/ROOTFILES.i486-2.1.8 Modified: ipcop/trunk/html/cgi-bin/urlfilter.cgi =================================================================== --- ipcop/trunk/html/cgi-bin/urlfilter.cgi 2014-12-12 16:00:55 UTC (rev 7747) +++ ipcop/trunk/html/cgi-bin/urlfilter.cgi 2014-12-15 07:04:32 UTC (rev 7748) @@ -3016,15 +3016,23 @@ END ; if ($filtersettings{'ENABLE_SAFESEARCH'} eq 'on') { - print FILE "rewrite rew-rule-safesearch {\n"; - print FILE " # rewrite safesearch\n"; - print FILE " s@(.*\\Wgoogle\\.\\w+/(webhp|search|imghp|images|grphp|groups|frghp|froogle)\\?)(.*)(\\bsafe=\\w+)(.*)\@\\1\\3safe=strict\\5\@i\n"; - print FILE " s@(.*\\Wgoogle\\.\\w+/(webhp|search|imghp|images|grphp|groups|frghp|froogle)\\?)(.*)\@\\1safe=strict\\\&\\3\@i\n"; - print FILE " s@(.*\\Wsearch\\.yahoo\\.\\w+/search\\W)(.*)(\\bvm=\\w+)(.*)\@\\1\\2vm=r\\4\@i\n"; - print FILE " s@(.*\\Wsearch\\.yahoo\\.\\w+/search\\W.*)\@\\1\\\&vm=r\@i\n"; - print FILE " s@(.*\\Walltheweb\\.com/customize\\?)(.*)(\\bcopt_offensive=\\w+)(.*)\@\\1\\2copt_offensive=on\\4\@i\n"; - print FILE "}\n\n"; +# These 2 alternatives for Google safe search ar currently under investigation +# s@(^http[s]?://[0-9a-z]+\.google\\.[a-z]+[-/%.0-9a-z]*/.*(\\?|q=).*)\@\\1&safe=vss\@i +# s@(.*\\Wgoogle\\.\\w+/)(.*)\@forcesafesearch.google.com/\2\@i + + print FILE <<END +rewrite rew-rule-safesearch { + # rewrite safesearch + s@(.*\\Wgoogle\\.\\w+/(webhp|search|imghp|images|grphp|groups|frghp|froogle)\\?)(.*)(\\bsafe=\\w+)(.*)\@\\1\\3safe=strict\\5\@i + s@(.*\\Wgoogle\\.\\w+/(webhp|search|imghp|images|grphp|groups|frghp|froogle)\\?)(.*)\@\\1safe=strict\\\&\\3\@i + s@(.*\\Wbing\\.\\w+/)(.*)(\\badlt=\\w+)(.*)\@\\1\\2\\4&adlt=strict\@i + s@(.*\\Wsearch\\.yahoo\\.\\w+/search\\W)(.*)(\\bvm=\\w+)(.*)\@\\1\\2vm=r\\4\@i + s@(.*\\Wsearch\\.yahoo\\.\\w+/search\\W.*)\@\\1\\\&vm=r\@i + s@(.*\\Walltheweb\\.com/customize\\?)(.*)(\\bcopt_offensive=\\w+)(.*)\@\\1\\2copt_offensive=on\\4\@i +} + +END } if (!($filtersettings{'UNFILTERED_CLIENTS'} eq '')) { Modified: ipcop/trunk/updates/2.1.8/ROOTFILES.i486-2.1.8 =================================================================== --- ipcop/trunk/updates/2.1.8/ROOTFILES.i486-2.1.8 2014-12-12 16:00:55 UTC (rev 7747) +++ ipcop/trunk/updates/2.1.8/ROOTFILES.i486-2.1.8 2014-12-15 07:04:32 UTC (rev 7748) @@ -1,6 +1,7 @@ ## please place IPCop files first, then packages sorted by alphabetical order /home/httpd/cgi-bin/sysinfo.cgi /home/httpd/cgi-bin/updates.cgi +/home/httpd/cgi-bin/urlfilter.cgi /usr/local/sbin/setup ## ## acpid-2.0.23 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn