This is a migrated thread and some comments may be shown as answers.

Using Multiple Proxies

3 Answers 480 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Joey
Top achievements
Rank 1
Joey asked on 25 Feb 2019, 04:18 PM
hello, i am doing a program that sends requests through alternating proxies (two). However, in fiddler there is only the possibility to specify one proxy, is there a way to edit the script so as to work through both proxies?

3 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 01 Mar 2019, 01:08 PM
Hi,

I'm not sure that I understood you correctly. You want to send the traffic to 2 different upstream proxies simultaneously? If yes, this would duplicate the traffic.

Regards,
Alexander
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Joey
Top achievements
Rank 1
answered on 01 Mar 2019, 02:13 PM

Hello Alexander,

Thanks for your reply. I want to send traffic in an alternating fashion and not simultaneously through two different upstream proxies depending on a parameter i set i.e. use one proxy for the first 10 requests and then the second proxy for the second 10 requests then switch back to the first proxy for the next 10 and so on.. Is it doable using fiddler script?

thanks for your help

Regards,

Joey

0
Accepted
Alexander
Telerik team
answered on 07 Mar 2019, 10:36 AM
Hi,

Yes, this is doable with FiddlerScript. Go to Tools -> Options -> Gateway and set one of the gateways. We should call this one primary. Then in FiddlerScript in the OnBeforeRequest function you can add custom logic for matching which request should go to the secondary gateway. For example:
if (oSession.HostnameIs("example.com")) {
    oSession["x-OverrideGateway"] = "gateway:port";
}

The important part here is settings the "X-OverrideGateway" - this is what routes the session to the secondary gateway. You can change the condition to whatever suits your case.

Regards,
Alexander
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Fiddler Classic
Asked by
Joey
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Joey
Top achievements
Rank 1
Share this question
or