Scenario 1: Configure Fiddler to capture outgoing requests from asp.net core process
You need to define a custom Class Implementing IWebProxy as below
Now, you need configure HttpClientHandler in your controller with the custom class (MyHttpProxy) to feed the fiddler proxy settings
Now, the outgoing call from the methods should be proxied through fiddler.
Scenario2: Configure asp.net core process to act as a reverse proxy
We can run asp.net core acting as a reverse proxy, wherein it can route the requests to another backend web server. In the below diagram the client talks to asp.net core over port 443 and asp.net core routes the request to backend service over port 80
There are only couple of things you need to do:
Install Nuget Package “Microsoft.AspNetCore.Proxy”
Configure the proxy middleware in the startup.cs
ProxyOptions proxyOptions = new ProxyOptions(); proxyOptions.Host = "yourbackendserver"; proxyOptions.Scheme = "http"; proxyOptions.Port = "80";
app.RunProxy(proxyOptions);
you can download the complete sample here https://github.com/fasigpt/fiddlerwithaspnetcore