LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 01-27-2005, 09:23 AM   #1
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: LinuxMint Elyssa
Posts: 373

Rep: Reputation: 32
My Konqueror ad blocker (allso firefox, opera etc)


Spent some time today researching/making this. Seems to work very well for me so far.

Works with Konqueror, Firefox, IE, Opera and mayb others

This file will block a wide range of adverts. Its very easy to install and very easy to customize!

To use the file,

1) copy and paste the below code into a "proxy.pac" file.
2) Configure your browsers proxy settings to use a proxy configuration URL (select the proxy.pac file)
3) Start browsing and you will notice many banner ad's are gone!


Code:
    function FindProxyForURL(url, host)
    {
  if (       shExpMatch(host, '*.ad*') 
   || shExpMatch(host, '*.ads*') 
   || shExpMatch(host, '*banners*') 
   || shExpMatch(host, '*doubleclick*')
   || shExpMatch(host, '*googlesyndication*')   
  )   
  return "PROXY 0.0.0.0:8000;"; 
 else
    return "DIRECT";
    }

This script works by checking all url's coming into your browser, if the url contains the word "banners", the script tells your browser to use a proxy that dosent exist.

I have my PROXY point to a webserver (xx.xx.xx.xx:80) where the index.htm page is transparent, this removes any errors you see in place of the adds.

WARNING:
Don't put in too many filters, as a large list does slow you down, however i notice no difference with the defaults.


Hope this is of use
 
Old 03-17-2005, 08:58 PM   #2
static_drc
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian GNU/Linux
Posts: 23

Rep: Reputation: 15
First of all, I love you.

Second of all, could you please write a bit more on how to have the proxy point to a blank index.html file, so that I don't have to see "An error occurred while loading..." messages?

Thank you so much!
 
Old 03-18-2005, 02:41 AM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
To preserve this for posterity, could I ask that you submit it to our Tutorials section - suitably fleshed out, of course. Otherwise, it may get lost among the other threads.
 
Old 03-18-2005, 06:20 AM   #4
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: LinuxMint Elyssa
Posts: 373

Original Poster
Rep: Reputation: 32
ill get to work on a tutorial, covering the use of thttpd to take care of the error messages, ill post back here when its up
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Konqueror works but firefox or opera doesn't! pcustance Linux - Software 14 05-25-2006 07:29 PM
DISCUSSION: Konqueror ad blocker cadj LinuxAnswers Discussion 0 04-23-2005 08:42 PM
Konqueror pop up blocker? SLAY3R Linux - Newbie 8 08-28-2004 08:29 AM
Firefox pop-up blocker not functioning jmr0311 Linux - Software 1 07-25-2004 06:19 PM
Popup and/or Ad-Blocker for Konqueror ? diam0nd Linux - Software 1 03-28-2004 05:20 PM


All times are GMT -5. The time now is 01:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration