Alpaca is a local HTTP proxy for command-line tools. It supports proxy auto-configuration (PAC) files and NTLM authentication.
Sample proxy.pac
function FindProxyForURL(url, host) { return "DIRECT"; }
Read this to create your own.