Create a custom proxy



Why a custom proxy?


From time to time, we would like to modify our personal comfort data streams that cannot be controlled. These days, for example, I was confronted with an RSS feed that does not contain all the data I need. So I created a custom HTTP proxy to enrich the RSS feed and get a completely satisfactory result.

Of course we can apply the same principle to a whole bunch of things. The big advantage of the operation is that you’re free to code with the language you choose, without complicating life. It remains finally to occupy only the interesting part of the code: the transformation of data received (or sent).


Set proxy preferences in Mac OS X


This is not to pass all traffic through our house script, but only very specific queries. This is done using the preferences of automatic proxy configuration. The proxy auto-configuration is based on a JavaScript file that provides the proxy rules that you want to use. Normally this file is distributed automatically via DHCP, or available on the network via a standard URL.


The first step is to create a PAC file that contains the rules you want. It is a simple text file.