Running Fiddler as HTTP to HTTPS reverse proxy

后端 未结 1 422
醉话见心
醉话见心 2021-01-15 00:23

I have a service running on my machine. This service is published on HTTPS and starting it on HTTP seems a bit complicated. A certain remote machine perform calls to my mach

相关标签:
1条回答
  • 2021-01-15 00:49

    Sure, Fiddler can convert inbound requests from HTTP to HTTPS.

    The simplest way would be to add something inside OnBeforeRequest like:

    if (oSession.HostnameIs("myhost") && 
        (oSession.oRequest.pipeClient.LocalPort == 80)) 
    {
      oSession.fullUrl = "https://" + oSession.url;
    }
    

    This presumes, of course, that Fiddler was configured to run on port 80, the default port for HTTP. You can run it on whatever port you like (e.g. if port 80 were already in use) but you'd need to change the port in the URL that the client requests, and if you could do that, you'd probably be able to change the client to use a HTTPS URL to begin with.

    0 讨论(0)
提交回复
热议问题