What is ADGate
ADGate is an Internet/Web utility for MacOSX for blocking unwanted hosts, popup windows and removing unwanted images, flash, iframe and even links in HTML by URL, all with easy to use pattern matches. MacOS 10.1.3 or higher is required. ADGate is 15 USD shareware.
The secret behind host blocking of ADGate is to modify the DNS lookup results. Once it gets a matched result with your choice of patterns, it changes the IP to the one of localhost. At the same time MacOSX built-in Apache web server is started to handle the HTTP requests and returns empty pictures or documents that match the HTTP requests.
URL blocking is done by redirecting matched HTTP requests, filtering the HTML from web servers just before browsers get it. ADGate does pattern matches on URL of HTTP requests and on HTML tags of received HTML codes. Matched HTTP requests are redirected to localhost, as well as matched HTML tags are modified to point to to localhost. If some are too short, they are just erased.
ADGate contains four parts. Two network kernel extensions: DNSFaker converts matched hostname's IP to 127.0.0.1 (localhost), and HTMLFilter modifies HTML codes. Configurations for Apache server, so Apache httpd has to be installed in MacOSX (it is installed by default). Client application ADGate to control both the extension and Apache web server.
The configuration for Apache server is in the package of ADGate. Choose Show Package Contents on ADGate to view and modify it. Patterns are combination of chars, '*' and '?' to match host names. Some patterns are pre-installed. Only registered version of ADGate can add or delete patterns.
ADGate requires root or administrator rights to function. So correct root or admin password must be given when starting ADGate, and it does not work on a read-only media like disk image or CD-ROM. Please copy it to disk before testing.