Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fiddler gateway proxy username/password

Tags:

proxy

fiddler

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?

like image 694
Hazard Avatar asked Sep 05 '14 12:09

Hazard


People also ask

What is the default proxy setting in Fiddler?

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.

Does Fiddler Change proxy settings?

Fiddler changes your proxy settings on startup and reverts them back to what they were before you started when Fiddler is closed.

Does Fiddler create a proxy?

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.


1 Answers

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.

like image 133
EricLaw Avatar answered Oct 18 '22 23:10

EricLaw