0

My PC is behind a corporate firewall/proxy. I would like to use Fiddler, or some other simple Forwarding Proxy, to make internet requests without the client application having to respond to proxy authentication requests. I.e. I want Fiddler to authenticate using the logged-in user's credentials on behalf of the client application.

In my specific case I have a locally running ASP.NET website that needs to call out to an internet service through the proxy but I don't want to have to set up the user that it is running as to be me or some other domain account. I want it to use Fiddler as a proxy and for Fiddler to authenticate with the upstream proxy.

This could be useful for many other applications such as command line tools for git, npm etc that need similar access.

Do you know if and how Fiddler can be configured to achieve this?

Perhaps there is some well known method of achieving this?

WooWaaBob
  • 3,397
  • 3
  • 23
  • 23

1 Answers1

1

Just found a related question and answer: Configuring Fiddler to use company network's proxy?

But the answer I used was in a comment on the accepted answer. In summary you need to add two code sections to the CustomerRules.js file (Rules > Customize Rules...):

...
class Handlers
{
    ...
    //[[insert:
    public static RulesOption("&Automatically Authenticate")
    var m_AutoAuth: boolean = false; // true if you want that as a default on startup
    //]]
    ...

    static function OnBeforeRequest(oSession: Session)
    {
        ...
        //[[insert:
        if (m_AutoAuth) {
            // Automatically respond to any authentication challenges using the
            // current Fiddler user's credentials. You can change (default)
            // to a domain\\username:password string if preferred.
            //
            // WARNING: This setting poses a security risk if remote
            // connections are permitted!
            oSession["X-AutoAuth"] = "(default)";
        }
        //]]
    }

    ...
}

You can then turn on and off this automatic proxy authentication from the Rules > Automatically Authenticate menu option.

Community
  • 1
  • 1
WooWaaBob
  • 3,397
  • 3
  • 23
  • 23