一、自定义Fiddler规则
1.点击rules
点击Customize Rules
查找“OnBeforeRequest”
2.添加代码
//根据host判断
if(oSession.host=="www.baidu.com"){
oSession.RequestHeaders.Remove("User-Agent");
oSession.RequestHeaders.Add("User-Agent","Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Mobile/14D27 baiduboxapp/0_01.5.2.8_enohpi_4331_057/1.2.01_1C2%258enohPi/1099a/5D94DA336A31AD4E65AE0D76084B50F2879EBBEA6FCRLRLQAED/1");
}
3.其他途径:直接点击Fiddler界面右侧的“FiddlerScript”