提琴手:创建一个自动响应规则以将所有呼叫映射到一个主机到另一台主机 [英] Fiddler: Creating an AutoResponse rule to map all calls to one host to another host
问题描述
示例: 我想创建一个一个自动响应规则,该规则会将所有对一个主机的呼叫映射到另一个主机,但是保留网址.例子
Example: I want to create one AutoResponse rule that will map all calls to one host to another host, but preserve the urls. Examples
http://hostname1/foo.html -> 和
http://hostname1/js/script.js -> 在一条规则中. 目前,我已经通过为项目调用的每个URL创建一个自动响应规则来实现此目的,但是我敢肯定,必须有一种使用正确的通配符来修正一个规则的方法.我看着 http://www.fiddler2.com/Fiddler2/help/AutoResponder.asp ,但我看不到该怎么做.通配符似乎都围绕匹配而不是动作.
in one rule. For now, I've accomplished this by creating aN AutoResponse rule for every URL my project calls, but I'm sure there must be a way to right one rule using the right wildcards. I looked at http://www.fiddler2.com/Fiddler2/help/AutoResponder.asp, but I couldn't see how to do it. The wild cards all seem to be around the matching and not the action.
完整上下文:我正在开发一个beta平台,Visual Studio感到厌烦,它会将所有请求发送到 http://localhost:56832 上运行时
Full context: I'm developing on a beta platform and Visual Studio is borked in such away that it is sending all the requests to http://localhost:24575 when my project is actually running on http://localhost:56832
推荐答案
要从一台主机映射到另一台主机,请不要使用AutoResponder.而是单击工具">主机".
To map from one host to another, don't use AutoResponder. Instead, click Tools > Hosts.
或者,您可以单击规则">自定义规则",滚动到OnBeforeRequest并编写一些代码:
Alternatively, you can click Rules > Customize Rules, scroll to OnBeforeRequest and write a bit of code:
if (oSession.HostnameIs("localhost") && (oSession.port == 24575)) oSession.port = 56832;
这篇关于提琴手:创建一个自动响应规则以将所有呼叫映射到一个主机到另一台主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!