GlimmerBlocker Logo

GlimmerBlocker

HTTP based ad blocker for Mac OS X

No hacks, no instability
Upgrade Safari whenever you like, no need to wait for an upgraded hack

GlimmerBlocker is no longer maintained and should no longer be used as web sites have migrated from using plain http to using https (i.e. encrypted) which prohibits modification by a proxy unless you resort to install custom SSL certiticates on the client.

You should use a browser extension instead.

It was made as a hobby project during 2007-2008 by Peter Speck. It features both a custom http server and http client and a Mac OS X control panel.

GlimmerBlocker did not only block requests but also allowed for adding custom css and javascript to the pages. It also allowed for modification of the page html before the browser receives the html, which made some modifications much easier than DOM based modifications.

DNS Resolution

This is a feature for advanced users. The native Mac OS X dns resolver is normally used when looking up ip-addresses for an hostname, but you can specify the list of DNS servers that it should use instead of the native resolver, and the list can be URL-specific just like proxies.

Prerequisite understanding

It is important to understand all about GlimmerBlocker's support for proxies.

When GlimmerBlocker forwards the request to another proxy, it doesn't contact the server directly, and therefore doesn't resolve the hostname. It will be the remove proxy that resolves the hostname. The dynamic DNS resolution is only used when GlimmerBlocker contacts the web-server directly. So it either uses a remove proxy or resolves the hostname.

When GlimmerBlocker resolves hostnames itself, it sends requests to DNS servers using the dnsjava library, so the firewall must not block simple dns lookup UDP packets, or it will fail to resolve.

How it works

You can change the DNS server in the network proxy Javascript (case 3 on the proxy page) and in request modification scripts (case 4).

The DNS server is specified by assigning a comma/semicolon/whitespace separated list of ip numbers to the gb.network.dnsServers variable. Just like gb.network.proxy it is initially empty in the global script, and in request-specific scripts it is initialized to the global value.

Examples

If you want to use OpenDNS when using the University's wireless network, you can use a global proxy script like this:

if (gb.network.interfaces.en1.AirPort.ssid == 'The Great University')
  gb.network.dnsServers = "208.67.222.222 , 208.67.220.220";

If you want to use OpenDNS when resolving URLs for the university, no matter which AirPort network you are connected to, create a rule like this: