1

Up front: the per browser (or per process, if you will) part is the important part here. I'm well aware of the /etc/hosts(and its Windows counterpart), but would like to avoid this system-global method.

What tools exist to override the IP for a given (i.e. configurable) name per browser? For Firefox there are "Modify Headers" and "Tamper Data". Both of them do not appear to be suitable for my case, because the DNS lookup is done before that. So I can only modify the HTTP headers (e.g. the Host header), but not influence the IP to which it gets sent. But manipulating to what IP it gets sent is exactly what I want to do.

2 Answers 2

3

That can be done using the .Net Proxy Fiddler2 and a little bit of FiddlerScript.

The sample script for redirecting traffic can be found in the sample script section "Point all requests for one server to a different server, including HTTPS tunnels" on: http://www.fiddler2.com/fiddler/dev/scriptsamples.asp

0

A method that works with all browsers is to set up a proxy server, such as Privoxy or Squid, that has the ability to rewrite requests. When a HTTP proxy server is used, the full URL is sent to the proxy without performing any name resolution.

2
  • Thanks. But how do I get the proxy to send the request to an IP that does not match the host name via DNS lookup (on the proxy)? It seems to me this ultimately just shifts the problem to the proxy ... Apr 26, 2011 at 10:13
  • Perhaps you could set up a proxy running in a chroot environment with a modified /etc/hosts, listening on a local port. Then configure each browser to use/not use this local proxy as required. A bit convoluted, but it might work.
    – user89061
    Jul 8, 2011 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .