fiddler web debug.has "tools->HOSTS" function ,where it in fiddlercore?

3 posts, 0 answers
  1. poko
    poko avatar
    4 posts
    Member since:
    Aug 2014

    Posted 01 Aug 2014 Link to this post

    sorry ,i am chinese.English is very poor .

    i see fiddler web debug have a function named "HOSTS",it in catalog "tools->HOSTS",

    now i use fiddlercore,but i donot find the HOSTS function .

    i found  a class named HostList,but I don't know how to use it.

    i want   modify request host's ip address.

    for example :
      private void onBeforeRequest(Fiddler.Session oSession)
            {
                //now oSession.host = "5158.s20.javaidc.com";ip is 118.26.135.190,i want modiyf to 127.0.0.1 ,but the request head remain the same

               // under code is not working, I don't know whether or not write code in beforeRequest or other place
               oSession.m_hostIP = "127.0.0.1";

              //under code is modefiy request head
              //oSession.host = "127.0.0.1";

                
            }



    thank you make the fiddler software.  Help me to solve a lot of trouble.

  2. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 01 Aug 2014 Link to this post

    Hello,

    This topic is covered in the Fiddler Book (http://fiddlerbook.com) which was given to a Chinese company to translate; I don't know if the Chinese version is out yet.

    To retarget a request, set the X-OverrideHostName flag on the Session. You may also wish to add an X-IgnoreCertCNMismatch flag if the request is HTTPS.

    For instance: 

    if (oSession.HTTPMethodIs("CONNECT") && oSession.HostnameIs("example.com"))
    {
    oSession["X-OverrideHostName"] = "123.123.123.123";
    // Set flag to suppress Fiddler's HTTPS Name Mismatch errors
    oSession["X-IgnoreCertCNMismatch"] = "no worries mate";
    }


    Regards,

    Eric Lawrence
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. poko
    poko avatar
    4 posts
    Member since:
    Aug 2014

    Posted 01 Aug 2014 in reply to Eric Lawrence Link to this post

    thanks again,it is working now.  that  puzzled me for a long time.

    i could not return,only say thank you .you are a good man. 
Back to Top