AutoRespond while being offline

10 posts, 0 answers
  1. Patrick
    Patrick avatar
    6 posts
    Member since:
    Oct 2019

    Posted 10 Oct 2019 Link to this post

    Hello,

    I'm developing a frontend against our clients api. Since it is not very reliable, I'd like to record the apis responses and work with them.
    So I saved the responses to a file and configured AutoResponser to serve those instead of passing through.

    However, as soon as I lose internet connection, Fiddler get's stuck when trying to establish a SSH tunnel to the api - even though this should not be required since AutoResponder is activated for that specific request.

    Is there anything I can do?

    Kind regards
    Patrick

  2. Patrick
    Patrick avatar
    6 posts
    Member since:
    Oct 2019

    Posted 10 Oct 2019 Link to this post

    Attached a screenshot
  3. Eric R | Senior Technical Support Engineer
    Admin
    Eric R | Senior Technical Support Engineer avatar
    396 posts

    Posted 10 Oct 2019 Link to this post

    Hi Patrick,

    At this time, Fiddler can only work with HTTP-based Protocols. The only exception to this rule is FTP where Fiddler converts the FTP download to a HTTP GET Request. Removing the SSH tunneling should work when offline.

    I hope this helps. Please let me know if you need any additional information. Thank you for using the Fiddler Forums.

    Regards,


    Eric R | Technical Support Engineer
    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
  4. Patrick
    Patrick avatar
    6 posts
    Member since:
    Oct 2019

    Posted 10 Oct 2019 in reply to Eric R | Senior Technical Support Engineer Link to this post

    Hi Eric,

    thanks for you quick replay!

    My fault - it's not a SSH tunnel. I was talking about HTTPS / SSL :)
    So the problem is: Fiddler tries to connect to the target via HTTPS even though there is a configured AutoResponder. I'd like to be able to request the target and getting predefined responses from Fiddler while being offline. This works great with HTTP but not with HTTPS.

    Sorry for confusion!

    Patrick

  5. Eric R | Senior Technical Support Engineer
    Admin
    Eric R | Senior Technical Support Engineer avatar
    396 posts

    Posted 10 Oct 2019 Link to this post

    Hi Patrick,

    No problem. Since the rule is for HTTPS, this may require Configuring Fiddler to Decrypt HTTPS Traffic.

    Please give this a try and let me know the results. Thank you and I look forward to your reply.

    Regards,


    Eric R | Technical Support Engineer
    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
  6. Patrick
    Patrick avatar
    6 posts
    Member since:
    Oct 2019

    Posted 11 Oct 2019 in reply to Eric R | Senior Technical Support Engineer Link to this post

    Good morning Eric,

    HTTPS Decryption is already on an working. Also, Fiddlers CA Cert is trusted system wide. See my screenshot above: all requests are successful (and answered by Autoresponder) until I plug off my network cable.

    Regards
    Patrick

  7. Eric R | Senior Technical Support Engineer
    Admin
    Eric R | Senior Technical Support Engineer avatar
    396 posts

    Posted 11 Oct 2019 Link to this post

    Hi Patrick,

    I did some testing locally and found a few things to try and have listed them below.

    1. The EXACT keyword wouldn't allow HTTPS. This only worked for HTTP.

    2. Use Microsoft Edge in the newest version of Fiddler, 5.0.20194.

    3. Close and reopen the browser upon changing rules.

    Note that this can be tested against any website. I recommend trying the rule against another website like, www.google.com to verify that it works there. If so, this may be an issue with the Application.

    Lastly, if the session publicly routed, i.e. if the request is passing through because it is bypassing the rule, then unplugging the network cable will stop Fiddler from processing the session.

    Please give these items a try and let me know the results. Thank you for using Fiddler.

    Regards,


    Eric R | Technical Support Engineer
    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
  8. Patrick
    Patrick avatar
    6 posts
    Member since:
    Oct 2019

    Posted 14 Oct 2019 in reply to Eric R | Senior Technical Support Engineer Link to this post

    Hi Eric,

    thanks for your investigations!

    Yes, it's indeed working when I switch from HTTPS to HTTP. Is there a technical reason for it?

    From my point of view, Fiddler shouldn't feel the need to connect to the remote host on HTTPS when the following applies:

    - SSL Decryption on
    - Autoresponder match for the request in question

    In this case I'd expect Fiddler to process the request as follow:

    1. Receive request from client
    2. Testing Autoresponder rules
    3. Find a Autoresponder match with mapping to local file
    4. No passthrough connection to the remote host because Fiddler already has everything it needs
    5. Responding the file's content back to the client, using the Fiddler certificate

    So I'm wondering if this limitation to HTTP when being offline is a missing feature, a bug or a technical requirement?

    Thanks again
    Patrick

  9. Eric R | Senior Technical Support Engineer
    Admin
    Eric R | Senior Technical Support Engineer avatar
    396 posts

    Posted 15 Oct 2019 Link to this post

    Hi Patrick,

    After discussing with my colleagues the observed behavior is what we expect. To elaborate, in this case Fiddler is not handling the CONNECT requests properly. This is because the browser makes two HTTP requests, a CONNECT to Fiddler and a HTTP Method to the server. See the below screenshot for a visual reference.

    To resolve the issue, there are two options listed below.

    1. Uncheck the Unmatched requests passthrough checkbox.

    2. Add the following script to the CustomRules.js file in the OnBeforeRequest method.

       // Add to OnBeforeRequest
       if (bWorkingOffline && oSession.HTTPMethodIs("CONNECT"))
       {
          oSession["X-ReplyWithTunnel"] = "Work offline; generate a fake tunnel...";
       } 

    For more details about the Fiddler AutoResponder, see the Using AutoResponder without Internet Forum Post.

    Please let me know if you need any additional information. Thank you for using the Fiddler Forums.

    Regards,


    Eric R | Technical Support Engineer
    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
  10. Patrick
    Patrick avatar
    6 posts
    Member since:
    Oct 2019

    Posted 16 Oct 2019 in reply to Eric R | Senior Technical Support Engineer Link to this post

    Hi Eric,

    Unchecking the passthrough checkbox fixed the problem and gives Fiddler a huge advantage compared to some of its competitors! :)

    Thanks a lot for your time and patience!

    Kind regards
    Patrick

Back to Top