官方版
Use Fiddler as a Reverse Proxy
Configure Fiddler as Reverse Proxy
To use this method, the hostname for the request to reroute must be 127.0.0.1:8888, localhost:8888, [::1]:8888, or the machine’s NETBIOS hostname on port 8888.
Click Tools > Fiddler Options. Ensure Allow remote clients to connect is checked.
Close Fiddler.
- Start REGEDIT.
- Create a new DWORD named ReverseProxyForPort inside HKEY_CURRENT_USER\SOFTWARE\Microsoft\Fiddler2.
- Set the DWORD to the local port where Fiddler will re-route inbound traffic (usually port 80 for a standard HTTP server).
- Restart Fiddler.
In a browser, go to http://127.0.0.1:8888.
Write a FiddlerScript Rule
Click Tools > Fiddler Options. Ensure Allow remote clients to connect is checked.
Click Tools > Fiddler Options, and ensure the “Allow remote clients to connect” checkbox is checked.
- Restart Fiddler if prompted.
- Click Rules > Customize Rules.
Inside the OnBeforeRequest handler*, add a new line of code:
if (oSession.host.toLowerCase() == "webserver:8888") oSession.host = "webserver:80";
Using a browser on the client machine, go to http://webserver:8888.
Configure Fiddler to Listen to Client Application Target Port
Reconfigure your target server to listen on a different port. For example, if a web server runs on port 80, reconfigure it to run on port 81.
- Click Tools > Fiddler Options….
- Click Connections.
Type the client’s target port number next to Fiddler listens to port:
Configure Fiddler as a reverse proxy or write a FiddlerScript Rule to re-route traffic to the target server’s new port (described above).
谷歌翻译版
使用Fiddler反向代理
将Fiddler配置为反向代理
要使用此方法,重新路由请求的主机名必须为127.0.0.1:8888、localhost:8888、[::1]:8888或端口8888上计算机的NETBIOS主机名。
单击 Tools > Fiddler Options. 确保勾选上 Allow remote clients to connect .
关闭Fiddler.
- 启动 REGEDIT.
- 在HKEY_CURRENT_USER\SOFTWARE\Microsoft\Fiddler2中创建一个名为ReverseProxyForPort的新DWORD**
- 将DWORD设置为Fiddler将重新路由入站流量的本地端口(对于标准HTTP服务器,通常为端口80)。
- 重新启动Fiddler.
在浏览器中,输入 http://127.0.0.1:8888.
在FiddlerScript写入规则
单击 Tools > Fiddler Options. 确保 Allow remote clients to connect 勾选上.
单击 Tools > Fiddler Options, 然后确保 “Allow remote clients to connect” 被勾选上.
- 如果出现提示,请重新启动Fiddler.
- 单击 Rules > Customize Rules.
在OnBeforeRequest处理程序*中,添加新的代码行:
if (oSession.host.toLowerCase() == "webserver:8888") oSession.host = "webserver:80";
使用客户端计算机上的浏览器,转到 http://webserver:8888。
配置Fiddler以监听客户端应用程序目标端口
重新配置目标服务器以侦听其他端口. 例如, 如果web服务器在端口80上运行, 将其重新配置为在端口81上运行。
- 单击 Tools > Fiddler Options….
- 单击 Connections.
在Fiddler监听端口旁边键入客户端的目标端口号:
将Fiddler配置为反向代理或编写FiddlerScript规则以将流量重新路由到目标服务器的新端口(如上所述)。