Using Fiddler as a Reverse Proxy

Fiddler sets two parameters for use as a reverse proxy.

Option 1:

Fiddler can be configured so that any traffic sent to http://127.0.0.1:8888 is automatically sent to another port on the same computer. To install this configuration:

Run REGEDIT

Create a new DWORD named ReverseProxyForPort inside HKCU \ SOFTWARE \ Microsoft \ Fiddler2.

Install DWORD on the local port to which you want to redirect incoming traffic (usually port 80 for a standard HTTP server)

Restart fiddler

Go to the browser http://127.0.0.1:8888

Option 2:

Alternatively, you can write a rule that does the same.

Suppose you are using a website on port 80 of a machine named WEBSERVER. You connect to a> website using Internet Explorer Mobile Edition on a Windows SmartPhone device for which you cannot configure a web proxy. You want to capture traffic from your phone and server response.

Launch Fiddler on the WEBSERVER machine by defaulting to port 8888.

Click "Tools" | Fiddler Options and check the box "Allow remote clients to connect." Restart if necessary.

Select Rules | Customize the rules.

Inside the OnBeforeRequest handler, add a new line of code: if (oSession.host.toLowerCase () == "webserver: 8888") oSession.host = "webserver: 80";

On your smartphone, go to http: // webserver: 8888

Both options include using Fiddler on the same computer, but what if Fiddler and the web server are running on two different machines? For example, say example.com is requested by some users and resolves to 1.2.3.4. Can I run Fiddler on 1.2.3.4 to forward traffic to 1.2.3.5 whenever example.com asks? Assuming I use option 2 to configure Fiddler, I would set up a “web server”, for example, example.com, www.example.com, or the IP address of example.com (suppose that www.example.com is an example alias .com)?

+7
source share
3 answers
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 } 

Simulate a Windows HOSTS file by specifying one hostname with a different IP address

+9
source

Sometimes you can use Fiddler to capture traffic, but for some reason you cannot configure the client to use a proxy server.

Fiddler can act as a “reverse proxy”, which means that it can run on the server and forward incoming requests to another port or web server.

Video on how to configure a violinist as a reverse proxy

0
source

I set up the reverse proxy correctly on Fiddler 2 and connected my iOS device. However, I could not get Fiddler to show traffic. If you have this problem, it turns out that you need an unbearably simple, but required critical configuration step.

At the bottom of the traffic capture window there is an option that determines why you need to capture traffic. By default, it is a "web browser", which means web browsers on the host machine, not browsers from remote computers.

Web browser options

Change this to "All processes and work to capture traffic."

All process options

0
source

All Articles