I look fiddlercore demo ,there some code I don't understand , why when FiddlerApplication.Startup after , and also CreateProxyEndpoint ?
I test it ,if don't CreateProxyEndpoint ,the fiddler can still work
1 Answer, 1 is accepted
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 28 Apr 2020, 03:07 PM
Hi da,
Just a heads up, this was originally posted in the Fiddler Forum and I have changed the location to the FiddlerCore Forum. Let me review the question below.
The CreateProxyEndPoint returns a new proxy with an endpoint listening on the specified endpoint and port. This is a more complex version of the base Proxy object for more complex scenarios. Although, this is entirely dependent on the goals of the implementation.
In order to just listen to traffic, the Proxy only needs to be attached to the System Proxy. Let me provide a simple demonstration below.
Simplest Configuration
The following code snippet is the simplest configuration for FiddlerCore to work. It logs session URLS to the console. Note the only configuration setting is the RegisterAsSystemProxy.
using System;
using Fiddler;
classProgram
{
staticvoidMain(string[] args)
{
// Attach to events of interest:
FiddlerApplication.AfterSessionComplete += session => Console.WriteLine(session.fullUrl);
// Build startup settings:var settings = new FiddlerCoreStartupSettingsBuilder()
.RegisterAsSystemProxy()
.Build();
// Start:
FiddlerApplication.Startup(settings);
Console.ReadLine();
// Shutdown:
FiddlerApplication.Shutdown();
}
}
Please let me know if you need any additional information. Thank you for using the FiddlerCore forums.
Regards,
Eric R | Senior Technical Support Engineer
Progress Telerik
Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic. Our thoughts here at Progress are with those affected by the outbreak.