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

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

2 Answers 181 Views
FiddlerCore
This is a migrated thread and some comments may be shown as answers.
poko
Top achievements
Rank 1
poko asked on 01 Aug 2014, 05:28 AM

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 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 01 Aug 2014, 04:38 PM
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.

 
0
poko
Top achievements
Rank 1
answered on 01 Aug 2014, 06:05 PM
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. 
Tags
FiddlerCore
Asked by
poko
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
poko
Top achievements
Rank 1
Share this question
or