Fiddler and Proxy Apps

4 Answers 510 Views
Fiddler Classic Mobile
Doc
Top achievements
Rank 1
Iron
Doc asked on 12 May 2021, 01:56 PM | edited on 12 May 2021, 02:14 PM

Hi guys!

I love fiddler and it works great to debug my android apps! :-)

It works for me, if I enable the default android proxy settings. But I am searching for an option to use proxy authentication and an option to route only traffic of my specific app to the proxy.

My android settings don´t allow adding proxy authentication settings (missing username and password in the settings). So I tried about 10 different proxy apps, e.g. drony, postern, "proxy manager" and "PowerTunnel for Android"

But if I am using an app with the fiddler proxy the https connection fails. Can you describe why?

Or can anyone tell me an working android app to add proxy authentication? Additional an app which can only route the unique apps traffic (like drony).

 

4 Answers, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 14 May 2021, 10:17 AM | edited on 14 May 2021, 12:47 PM

Hi Doc BT,

 

Indeed, proxy authentication is an option that is absent from the modern Android versions. As far as I am aware, there is no reliable method to use proxy authentication for your Android connections. Some SO threads and blog posts are talking about 3rd-party applications + rooting a device but all of those solutions are a bit sketchy and sounds a lot like a security thread.

 

Regards,
Nick Iliev
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

0
Doc
Top achievements
Rank 1
Iron
answered on 14 May 2021, 12:23 PM | edited on 14 May 2021, 12:29 PM

Hi Nick,
Thanks for your answer.

Can you help with an regex replacement please?

I don´t know what the problem ist, but I get an exception "Too many characters in regex"...

I want to replace everthing between the square brackets [ ]

Original String= "info":[{"type":6,"level":5},{"type":17,"level":10},{"type":67,"level":1}]

If I test this online with a regex tester, it works...

Thanks in advance!

doc

        if(oSession.uriContains("MyURL")) {    
            oSession.utilDecodeResponse();
if
(oSession.utilReplaceRegexInResponse('"info":\[[^\]]*\]','"info":\[{"type":0,"level":0},{"type":0,"level":0},{"type":0,"level":0}\]')){ oSession["ui-backcolor"] = "lime"; }
}

0
Nick Iliev
Telerik team
answered on 17 May 2021, 09:58 AM

Hello Doc,

 

The method utilReplaceRegexInResponse is calling the C# Regex.Replace method with the following parameters & options.

Regex.Replace(sArray, sSearchForRegEx, sReplaceWithExpression, RegexOptions.ExplicitCapture | RegexOptions.Singleline)

You could use the above in your own test C# project to further debug what is causing the issue. The sSearchForRexEx is the first parameter you are passing, and the sReplaceWithExpression is the second one. The sArray is simply the response body as a string. The error is a bit vague, but it looks like that the issue might be caused by a non-escaped character or characters that you should not match.

 

Regards,
Nick Iliev
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Doc
Top achievements
Rank 1
Iron
commented on 17 May 2021, 11:56 AM

Thanks, I solved it :-)
0
Doc
Top achievements
Rank 1
Iron
answered on 17 May 2021, 12:01 PM | edited on 17 May 2021, 12:02 PM

I also having trouble decompressing gzipped requests.

If I drag and drop the request to the composer the request gets decompressed corretly, but in Fiddler script it throws an error "the magic number in the GZIP header is incorrect".

Any ideas how to decode the gzipped request?


        if (oSession.oRequest.headers.ExistsAndContains("Content-Encoding", "gzip"))
        {
            oSession.utilDecodeRequest(); // Decompress request and remove header
            oSession.oRequest["Content-Encoding"] = "gzip";  // Put header back
            oSession["ui-backcolor"] = "blue"; // Mark the session
        }

Doc
Top achievements
Rank 1
Iron
commented on 17 May 2021, 12:03 PM

I also tried the functions posted here, but they throw the same error:
http://yossi-yakubov.blogspot.com/2010/05/fiddler-gzip-issue.html
Tags
Fiddler Classic Mobile
Asked by
Doc
Top achievements
Rank 1
Iron
Answers by
Nick Iliev
Telerik team
Doc
Top achievements
Rank 1
Iron
Share this question
or