This is a small extension for the Mercurial DVCS to enable the use of a SOCKS5 proxy. To use it, download the file and put something like this in your hgrc file:

socks_proxy = /path/to/

host = localhost:9150

You'll also need to install from the SocksiPy project, which is used for the actual SOCKS protocol.

To experiment with a SOCKS5 proxy you can use the -D option of SSH, which creates such a proxy that runs over the SSH connection. Alternatively you can run Tor, which also starts a SOCKS5 proxy (probably either on port 9050 or port 9150).