Thanks To Eric Lawrence (the author of Fiddler) for this answer (via e-mail).
Step 1: Click Rules>Customize. The FiddlerScript Editor will open.
Step 2: Just after the very beginning of the class Handlers { add the following code:
// Use a fixed proxy IP with Basic authentication
public static RulesOption("Use Auth-Proxy")
var bUseAuthProxy: boolean = false;
Step 3: Inside the OnBeforeRequest function (further down in the Handlers class code) add the following code:
if (bUseAuthProxy) {
oSession["X-OverrideGateway"] = "myAuthenticatingProxy:8080";
oSession.RequestHeaders["Proxy-Authorization"] = "Basic yourbase64stringhere";
}
Don't forget the closing right-brace (like I did!) in the above code snippet (it's so easy to overlook!). If you forget the right-brace, the "Use Auth-Proxy" option won't appear in the "Rules" menu.
The string "myAuthenticatingProxy:8080" is the IP and port number for your proxy server in the form of IP:Port Number. Make sure that the IP and port number are separated by a colon (":"), that it is double-quoted, and that the code line ends with a semicolon.
The string for your authentication credentials MUST start with the word "Basic" (which indicates Basic authentication as opposed to NTLM, etc., authentication). The "yourbase64stringhere" is your proxy IP authentication credentials in the form of username:password (with a colon ":" included in the string) that has been converted to a Base-64 string. Fiddler comes with a built-in Base-64 converter. Click Tools>Text Wizard. Type your username:password string into the upper panel. By default, the Text Wizard is set to convert text entered in the upper panel to a Base-64 string output in the lower panel (notice the "Transform" drop-down located between the upper and lower panels). Copy the Base-64 string that has been output in the lower panel and append it to the word "Basic" SEPARATED BY A SPACE. Put double-quotes around the entire string and end the line of code with a semicolon.
Step 4: Save the file. Click the Rules entry on the main Fiddler menu. You should now see a rule item named "Use Auth-Proxy". Clicking this entry will configure Fiddler to use the IP and authentication credentials you coded in Step 3. Unchecking the "Use Auth-Proxy" reverts Fiddler to using whatever configuration has been established under Tools>Fiddler Options>Gateway. This is a very efficient way to "select" and "unselect" a specific proxy during application development. Thanks again Eric for the great solution!
-- Bill Vallance