Home » Questions » Computers [ Ask a new question ]

Using Proxy Server to act as hosts file

Using Proxy Server to act as hosts file

I am trying to see if I can have a specific Hosts file that only a Proxy Server application on my machine will use while the remainder of the machine uses the normal proxy server.

Asked by: Guest | Views: 327
Total answers/comments: 1
Guest [Entry]

"Fiddler can do this. Using custom rules in it's CustomRules.js file, you can simulate the Windows hosts file by pointing one hostname to a different IP address. An example is provided on their script samples page:

// All requests for subdomain.example.com should be directed to the development server at 128.123.133.123
if (oSession.HostNameIs(""subdomain.example.com""))
{
oSession.bypassGateway = true; // Prevent this request from going through an upstream proxy
oSession[""x-overrideHost""] = ""128.123.133.123""; // DNS name or IP address of target server
}"