fiddler抓包,设置代理后,会出现手机连不上网的情况,针对这个情况处理方式为:
首先如果已经连接上WiFi了,但是提示“不可上网”,那就把WiFi断开重新连接下。
不行的话就试试下面的办法
一、配置注册表
windows键加R键打开以下界面,输入regedit
![](http://upload-images.jianshu.io/upload_images/2014194-646a542af838d5f9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/424/format/webp)
image.png
打开注册表,在HKEY_CURRENT_USER\SOFTWARE\Microsoft\Fiddler2下创建一个DWORD,值设置为80(十进制)
![](http://upload-images.jianshu.io/upload_images/2014194-410e3b4305e76b89.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/875/format/webp)
image.png
二、编写FiddlerScript rule
![](http://upload-images.jianshu.io/upload_images/2014194-20b3a05783d30d28.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/657/format/webp)
image.png
Ctrl+F查找到OnBeforeRequest方法
![](http://upload-images.jianshu.io/upload_images/2014194-270210bcb45631c6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/786/format/webp)
image.png
在此方法下加入如下代码
if (oSession.host.toLowerCase() == "webserver:8888")
{
oSession.host = "webserver:80";
}
![](http://upload-images.jianshu.io/upload_images/2014194-e2d1e6ed3036a89f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/855/format/webp)
image.png
三、关闭防火墙
![](http://upload-images.jianshu.io/upload_images/2014194-8392c263f32fcec7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1000/format/webp)
image.png