Re: Problem In Proxy Auto Authentication

1,154 views
Skip to first unread message

EricLaw

unread,
Jul 9, 2012, 12:27:19 PM7/9/12
to httpf...@googlegroups.com
Unless your credentials are really in some bizarre format that I've never ever seen, your code should look like this:
 
   Fiddler.FiddlerApplication.BeforeRequest +=
     delegate(Fiddler.Session oS) {
        oS["x-AutoAuth"] = "username:password";
        oS["x-overrideGateway"] = "ipaddress:port";
       //... etc
     };

 

On Monday, July 9, 2012 7:28:24 AM UTC-7, S. Karim A. R. wrote:
Hi,

I looked at some post regarding proxy auto authentication and set following params in my code.
......
 Fiddler.FiddlerApplication.BeforeRequest += delegate(Fiddler.Session oS) {
                oS.oFlags["x-AutoAuth"] = "ipaddress:port\\username:password";
                oS["x-overrideGateway"] = "ipaddress:port";

.....more...
}

I am also setting Fiddler.CONFIG.bAutoProxyLogon = true;

But browser is still prompting login/pass dialog. 

Please could anyone help me in this regard.

Thanks.



S. Karim A. R.

unread,
Jul 9, 2012, 2:10:13 PM7/9/12
to EricLaw, httpf...@googlegroups.com
Thanks Eric, but It could not work. I have check it with three proxy servers and every time it prompts IE user/pass dialog.

Actually I am making changes in demo code (fiddler demo app). I have also attache the code file.

Please could give me a pointer how this could be resolved ?

Thanks.


--
You received this message because you are subscribed to the Google Groups "Fiddler" group.
To view this discussion on the web visit https://groups.google.com/d/msg/httpfiddler/-/pP5DMVYlMnYJ.
To post to this group, send email to httpf...@googlegroups.com.
To unsubscribe from this group, send email to httpfiddler...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/httpfiddler?hl=en.



--
Regards,
S. Karim A. R
Sr. Software Engineer - Freelancer
Profile | Services | Products

EricLaw

unread,
Jul 9, 2012, 3:56:50 PM7/9/12
to httpf...@googlegroups.com, EricLaw
I don't see any files attached to this message.
 
What type of credentials is the server demanding? Please post the set of headers on the very first HTTP/407 response from the proxy.
 
-Eric

S. Karim A. R.

unread,
Jul 10, 2012, 4:06:53 AM7/10/12
to httpf...@googlegroups.com, EricLaw
Thanks Eric,

I have tested it on 2 browsers (IE and FF), request/response header are given below. Authentication is missing in both request headers. 
(I have also attached the code file)

IE [Request Header]
GET / HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET4.0C; .NET4.0E; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive

IE [Response Header]
HTTP/1.0 407 Proxy Authentication Required
Date: Tue, 10 Jul 2012 07:50:07 GMT
Content-Type: text/html
Content-Length: 1336
Expires: Tue, 10 Jul 2012 07:50:07 GMT
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Proxy-Authenticate: Basic realm="RotateiP Proxy Server"
X-Cache: MISS from srv647.ubiquityservers.com
X-Cache-Lookup: NONE from srv647.ubiquityservers.com:8082

FF [Request Header]
GET /c.aspx?xy=217,96|238,2&q2=L&vid=5e82f4cf-f485-4f72-ae4e-b5d963116813-606&ac=u&svluFraud=&top=30&Page=http%3A//www.whatismyip.com/&Title=What%20Is%20My%20IP%20-%20Shows%20Your%20IP%20Address&Area=Site&ts=1341906564030 HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Proxy-Connection: keep-alive

FF [Response Header]
HTTP/1.0 407 Proxy Authentication Required
Date: Tue, 10 Jul 2012 07:51:04 GMT
Content-Type: text/html
Content-Length: 1336
Expires: Tue, 10 Jul 2012 07:51:04 GMT
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Proxy-Authenticate: Basic realm="RotateiP Proxy Server"
X-Cache: MISS from srv647.ubiquityservers.com
X-Cache-Lookup: NONE from srv647.ubiquityservers.com:8082
Program.cs

EricLaw

unread,
Jul 10, 2012, 4:28:02 PM7/10/12
to httpf...@googlegroups.com, EricLaw
Ah. The issue here is that Fiddler's x-autoauth feature doesn't support HTTP BASIC authentication, because you can trivially add such authentication yourself.
 
Use Fiddler's TextWizard (CTRL+E) to base64 encode the username:password pair into a new string. Then copy that string into script that goes inside OnBeforeRequest
 
  oSession["Proxy-Authorization"] = "Basic yourstringhere"
 
-Eric
Reply all
Reply to author
Forward
0 new messages