Using Multiple Proxies

4 posts, 1 answers
  1. Joey
    Joey avatar
    2 posts
    Member since:
    Feb 2019

    Posted 25 Feb Link to this post

    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?
  2. Alexander
    Admin
    Alexander avatar
    383 posts

    Posted 01 Mar Link to this post

    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
  3. Joey
    Joey avatar
    2 posts
    Member since:
    Feb 2019

    Posted 01 Mar in reply to Alexander Link to this post

    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

  4. Answer
    Alexander
    Admin
    Alexander avatar
    383 posts

    Posted 07 Mar Link to this post

    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
Back to Top