浣跨敤 FiddlerCore 鑷畾涔?HTTP/HTTPS 缃戠粶浠g悊
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了浣跨敤 FiddlerCore 鑷畾涔?HTTP/HTTPS 缃戠粶浠g悊相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/%e4%ba%8b%e4%bb%b6' title='浜嬩欢'>浜嬩欢
鏉冨▉鎸囧崡 vat 灏佽 etc tps request oid statFiddler 鏄釜寰堝ソ鐢ㄧ殑缃戠粶璇锋眰鏌ョ湅涓庤皟璇曞伐鍏凤紝杩樺彲浠ュ啓鎻掍欢鏉ユ墿灞曞叾鍔熻兘銆?/p>
浣嗛儴鍒嗗満鏅笅锛岄渶瑕佽嚜瀹氫箟寰堝缃戠粶鐩戞帶鎿嶄綔锛岄泦鎴愬埌鑷繁鐨勭▼搴忎腑銆傝繖鏃跺氨闇€瑕?FiddlerCore 浜嗐€?/p>
鍏充簬 Fiddler鐨勪娇鐢紝Fiddler鎻掍欢寮€鍙戯紝FiddlerCore 璇︾粏鐨勮鏄庯紝閮藉彲浠ョ湅 銆奆iddler鏉冨▉璋冭瘯鎸囧崡銆嬩竴涔︼紝缃戜笂鍙互鎵惧埌鐢靛瓙鐗堛€?/p>
FiddlerCore 瀹夎
FiddlerCore 鐨勬渶鏂扮増鏈槸鏀惰垂鐗堬紝浣?nuget.org 涓婂彲浠ヤ笅杞藉埌涔嬪墠鐗堟湰锛堟渶鍚庢洿鏂版椂闂达細2016-01-01锛夛紝鍩虹鐨勫姛鑳芥槸澶熺敤鐨勶紝涓嶈兘鐩存帴鎷夊彇鐨勮瘽锛屽垯闇€瑕侀厤缃湰鍦?Nuget 婧愶紝鐒跺悗鎶婅繖涓?Nuget 鍖呮斁杩涘幓銆?br /> 骞跺湪椤圭洰 csproj 鏂囦欢涓紝娣诲姞锛?/p>
<ItemGroup>
<PackageReference Include="FiddlerCore" Version="4.6.2.0"/>
</ItemGroup>
FiddlerCore 瀹樼綉锛?a href="https://www.telerik.com/fiddlercore">FiddlerCore - Fiddler Proxy Engine for .NET and .NET Standard - Telerik
FiddlerCore Nuget: NuGet Gallery | FiddlerCore 4.6.2
FiddlerCore Nuget 鍖?4.6.2) 涓嬭浇鍦板潃锛?a href="https://pan.baidu.com/s/1ueTCsJ5Jv7wovCeWVN4gDw" class="uri">https://pan.baidu.com/s/1ueTCsJ5Jv7wovCeWVN4gDw
FiddlerCore 浣跨敤
FiddlerCore 鐨勪娇鐢ㄩ潪甯哥畝鍗曪紝涓昏鐨勫氨鏄?1 鍚姩浠g悊锛? 鐩戝惉浜嬩欢锛? 瀹夎璇佷功锛? 鍏抽棴浠g悊
- 1 鍚姩浠g悊
FiddlerApplication.Startup(9898, FiddlerCoreStartupFlags.Default | FiddlerCoreStartupFlags.RegisterAsSystemProxy);
杩欓噷 FiddlerCoreStartupFlags.RegisterAsSystemProxy
鏄皢浣犵殑杩欎釜绋嬪簭锛堟垨鑰呰 127.0.0.1:9898锛夋敞鍐屼负绯荤粺浠g悊锛屾墍鏈夎蛋绯荤粺浠g悊鐨勶紝閮戒細閫氳繃姝ょ▼搴忋€?br />
濡傛灉涓嶈缃?FiddlerCoreStartupFlags.RegisterAsSystemProxy
锛屽垯琚洃鎺х殑绋嬪簭锛岄渶瑕佹墜鍔ㄦ寚瀹氫唬鐞嗗埌 9898 杩欎釜绔彛銆?/p>
- 2 鐩戝惉浜嬩欢
FiddlerApplication.BeforeRequest += FiddlerApplication_BeforeRequest;
FiddlerApplication.BeforeResponse += FiddlerApplication_BeforeResponse;
private static void FiddlerApplication_BeforeResponse(Session oSession)
{
}
private static void FiddlerApplication_BeforeRequest(Session oSession)
{
}
閫氳繃杩欎袱涓簨浠讹紝灏卞彲浠ユ嬁鍒?FiddlerCore 鎵€鎴幏鐨勮姹傘€傜劧鍚庤繘琛屾搷浣滄垨鑰呰褰曘€?/p>
- 3 瀹夎璇佷功
濡傛灉闇€瑕佺洃鍚?HTTPS 璇锋眰锛岄渶瑕佸畨瑁呰瘉涔︼紝瀹夎璇佷功鏃讹紝浼氭湁涓€涓脊绐楋紝璁╃敤鎴峰悓鎰忋€?/p>
// 瀹夎璇佷功
public static bool InstallCertificate()
{
if (!CertMaker.rootCertExists())
{
if (!CertMaker.createRootCert())
return false;
if (!CertMaker.trustRootCert())
return false;
}
return true;
}
// 鍗歌浇璇佷功
public static bool UninstallCertificate()
{
if (CertMaker.rootCertExists())
{
if (!CertMaker.removeFiddlerGeneratedCerts(true))
return false;
}
return true;
}
- 4 鍏抽棴浠g悊
杩欑偣寰堥噸瑕侊紝鍥犱负濡傛灉绋嬪簭缁撴潫涔嬪悗浠g悊涓嶅叧闂紝鍒欐棤娉曟甯镐笂缃戙€傦紙鍥犱负璁剧疆浜嗕唬鐞嗭紝浣嗕唬鐞嗙▼搴忓叧闂簡銆傦級
if (FiddlerApplication.IsStarted())
{
FiddlerApplication.Shutdown();
}
鍦ㄧ湡姝d娇鐢ㄧ殑鏃跺€欙紝浠ヤ笂杩欎簺鎿嶄綔锛屽缓璁仛涓€灞傛娊璞″拰灏佽锛屼笉鐒朵笟鍔″拰缃戠粶鐩戞帶鐨勪唬鐮佷細鑰﹀悎鐨勫お绱с€?/p>
鏇村鍏充簬缃戠粶娴嬭瘯涓庣洃鎺х殑瀹炵幇锛屽彲浠ュ弬鑰冭繖涓」鐩細
RickStrahl/WestWindWebSurge: Quick and easy URL and Load Testing for your Web applications on Windows
浣跨敤FiddlerCore鏉ユ祴璇昗ebAPI - 鐙笂楂樻ゼ - 鍗氬鍥?/a>
鍘熸枃閾炬帴锛?a href="https://www.cnblogs.com/jasongrass/p/12044321.html" class="uri">https://www.cnblogs.com/jasongrass/p/12044321.html
以上是关于浣跨敤 FiddlerCore 鑷畾涔?HTTP/HTTPS 缃戠粶浠g悊的主要内容,如果未能解决你的问题,请参考以下文章
Springboot鑷姩鍔犺浇宸ュ叿-devtools鐨勭悊瑙d笌浣跨敤
iOS swift ipad浣跨敤绯荤粺鑷甫鍒嗕韩 寮规澶辫触娌℃湁寮规