Fiddler not respecting outgoing proxy when Hosts Remapping is enabled

1,091 views
Skip to first unread message

Matt Eckhaus

unread,
Jun 26, 2013, 12:02:43 AM6/26/13
to httpf...@googlegroups.com
I'm using Fiddler on a network with an outgoing HTTP proxy gateway. Fiddler is set to "Use System Proxy" and it is working. However, when I define a mapping the in Host Remapping window, Fiddler is trying to attach to the remapped host directly, and not respecting the gateway setting.

It's only affecting the specific hosts that are remapped, all others work. When I test the same computer on another network with no outgoing gateway, Hosts Remapping is working.

About Fiddler:
  Fiddler Web Debugger (v4.4.4.8)
  Built: Friday, 14 June 2013

  64-bit AMD64, VM: 39.00mb, WS: 59.00mb
  .NET 4.0.30319.17929 WinNT 6.1.7601 SP1

Thanks for your help

EricLaw

unread,
Jun 27, 2013, 11:24:16 AM6/27/13
to httpf...@googlegroups.com
This is by-design. The upstream-most proxy determines final TCP/IP address routing for a request, so if you're trying to change the request's routing with Fiddler, then by-definition, the upstream proxy must be bypassed.

thanks,
Eric

Matt Eckhaus

unread,
Jun 27, 2013, 11:18:26 PM6/27/13
to httpf...@googlegroups.com
Thanks for the reply Eric

Is there anyway to override this, and make Fiddler request the page from a different address, through the proxy?

To explain:

The problem is that I'm trying to override the public DNS so I can access a server using its real name but hosted on a test server at a different IP address. Normally I could use my local hosts file, but I'm trying to use Fiddler specifically to make it work through our gateway proxy. 

What I really want to do is to have Fiddler change the hostname in the initial request, while leaving the Hosts header unchanged.

Say the server is named myhost.widgets.com, and I want to hit a test server at 64.102.103.11

I can achieve what I want with a curl request like:

That will work through our gateway proxy

Is there any way to achieve that in Fiddler?

Thanks

EricLaw

unread,
Jul 9, 2013, 2:01:04 PM7/9/13
to
I've added a new preference for this in Fiddler v2.4.4.9
 
In the QuickExec box below the Web Sessions list, type:
 
    prefs set fiddler.network.SetHostHeaderFromURL False
  
and hit Enter. This enables Fiddler to send malformed requests like:
 
  GET http://OverriddenTarget.com/ HTTP/1.1
  Host: OriginalSite.com
 
 
Please verify that this meets your needs.
 
thanks!

Matt Eckhaus

unread,
Jul 8, 2013, 10:38:30 PM7/8/13
to httpf...@googlegroups.com
Hi Eric

Thanks, that is perfect!

Regards,
Matt

EricLaw

unread,
Jul 9, 2013, 2:01:47 PM7/9/13
to
Just a heads-up... in the final release, the preference will be renamed and its behavior reversed. I've updated the instructions above to show the final behavior.
Reply all
Reply to author
Forward
0 new messages