Yes, there is a way!
In IE9 if you have the proxy manually configured in Internet Options, you can click on Advanced and simply add <-loopback>
to the proxy bypass list. In IE6, localhost URLs go through the proxy when the proxy is manually configured. It is only versions IE7+ that don't send localhost requests to the proxy server.
If you want a more global solution, you can create a automatic proxy configuration script. It is basically a javascript file that contains the function FindProxyForURL. You can configure Internet Options with the URL of that script. All HTTP requests will query FindProxyForURL for the proxy server it needs. So if you want all URLs to go through the proxy you would do something like:
function FindProxyForURL(url, host) {
return "PROXY localhost:1234";
}
If you only want external addresses to go to your localhost proxy then you would do something like:
function FindProxyForURL(url, host) {
if (isPlainHostName(host)) {
return "DIRECT";
}
return "PROXY localhost:1234";
}