I'm trying to intercept a web application which uses a HTTP proxy (basic HTTP auth password protected) to access its resources.
In Fiddler options, there is a setting for manual proxy configuration. But in that field, I can only define the proxy address and port. I need to define an username/password combination for upstream proxy.
Is there any way to do this?
By default, Fiddler Everywhere "chains" to the default proxy of the system. The Gateway settings allow you to override that behavior. (Recommended) Use system proxy—The default selection. Fiddler uses the OS system proxy.
Fiddler changes your proxy settings on startup and reverts them back to what they were before you started when Fiddler is closed.
Fiddler Classic and fiddler Everywhere are special-purpose proxy server tools for debugging web traffic from applications like browsers. They're used to capture and record this web traffic and then forward it onto a web server.
Your scenario is a bit unclear. Clients should automatically prompt for proxy credentials when a HTTP/407
is received, although many don't.
If your question is: "How can I add a Proxy-Authorization
header to all requests that pass through Fiddler?" then it's pretty simple.
Rules > Customize Rules > Scroll to OnBeforeRequest
and add:
if (!oSession.isHTTPS)
{
oSession.oRequest["Proxy-Authorization"] = "Basic dXNlcm5hbWU6cGFzc3dvcmQ=";
}
Where dXNlcm5hbWU6cGFzc3dvcmQ=
is the base64-encoded version of the "username:password" string. You can use Fiddler's Tools > TextWizard to base64-encode a string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With