标签:turn ddl port 代码 text amp div fiddler 解决方案
(非原创)
如果全部的https都显示Tunnel to 443,重新安装自签证书。
找到FiddlerScript标签,选择OnBeforeRequest,自动定位,在这个方法的最后一个大括号后面,插入以下代码。
var hosts = ‘zkd.me develop.dog‘;
FiddlerApplication.Log.LogFormat("Logger session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);
if(hosts.indexOf(oSession.host) > -1){
FiddlerApplication.Log.LogFormat("Capture session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);
if(oSession.HTTPMethodIs(‘CONNECT‘)){
FiddlerApplication.Log.LogString(‘create fake tunnel response‘);
oSession[‘x-replywithtunnel‘] = ‘FakeTunnel‘;
return;
}
if (oSession.isHTTPS){
FiddlerApplication.Log.LogString(‘switch https to http request‘);
oSession.fullUrl = oSession.fullUrl.Replace("https://","http://");
oSession.port = 80;
}
FiddlerApplication.Log.LogFormat("Processed session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);
}
FiddlerApplication.Log.LogFormat("Logger session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);
}
在?OnBeforeRequest方法里添加一些代码,区分HTTP请求和HTTPS请求(颜色)。
if(oSession.isHTTPS && oSession.url.indexOf(oSession.host)> -1){
oSession["ui-color"] = "blue";
}
if(!oSession.isHTTPS && oSession.url.indexOf(oSession.host)> -1){
oSession["ui-color"] = "green";
}
个别https请求显示Tunnel to 443的解决方案
标签:turn ddl port 代码 text amp div fiddler 解决方案
原文地址:https://www.cnblogs.com/313echo/p/10938209.html