Class FiddlerApplication
This class acts as the central point for script/extensions to interact with Fiddler components.
Inheritance
Namespace: Fiddler
Assembly: FiddlerCore.dll
Syntax
public static class FiddlerApplication : Object
Fields
ClientCertificateProvider
When set, the function will be called to select the local Secure Sockets Layer (SSL) certificate used for authentication
Declaration
public static LocalCertificateSelectionCallback ClientCertificateProvider
Field Value
System.
|
DefaultProxy
This value should be set to the proxy that will be used for some outgoing requests - for example GRPC reflection info
Declaration
public static IWebProxy DefaultProxy
Field Value
System.
|
GetNegotiatedCipherSuiteFunc
When set, the function will be called to get the string value of the negotiated cipher suite for the given SslStream
Declaration
public static Func<SslStream, string> GetNegotiatedCipherSuiteFunc
Field Value
System.
|
isClosing
TRUE if Fiddler is currently shutting down. Suspend all work that won't have side-effects.
Declaration
public static bool isClosing
Field Value
System.
|
oDefaultClientCertificate
The default certificate used for client authentication
Declaration
public static X509Certificate oDefaultClientCertificate
Field Value
System.
|
oProxy
Fiddler's core proxy object.
Declaration
[CodeDescription("Fiddler's core proxy engine.")]
public static Proxy oProxy
Field Value
oTranscoders
Fiddler Import/Export Transcoders
Declaration
public static FiddlerTranscoders oTranscoders
Field Value
StringifyNegotiatedCipherSuiteFunc
When set, the function will be called to convert a cipher suite value (number) to a human readable string value.
Declaration
public static Func<int, string> StringifyNegotiatedCipherSuiteFunc
Field Value
System.
|
Properties
CustomMimeMappings
By setting this property you can provide Telerik Fiddler Core with custom MIME-type-to-file-extension mappings.
Declaration
public static IEnumerable<MimeMap> CustomMimeMappings { set; }
Property Value
System.
|
Log
Fiddler's logging system
Declaration
[CodeDescription("Fiddler's logging subsystem; displayed on the LOG tab by default.")]
public static Logger Log { get; }
Property Value
oAutoResponder
Fiddler's AutoResponder object.
Declaration
[CodeDescription("Fiddler's AutoResponder object.")]
public static AutoResponder oAutoResponder { get; }
Property Value
oSAZProvider
Gets or sets the provider that will be used to load and write SAZ files.
Declaration
public static ISAZProvider oSAZProvider { get; set; }
Property Value
Prefs
Fiddler's Preferences collection. Learn more at http://fiddler.wikidot.com/prefs
Declaration
[CodeDescription("Fiddler's Preferences collection. http://fiddler.wikidot.com/prefs")]
public static IFiddlerPreferences Prefs { get; }
Property Value
Methods
add_AfterSessionComplete(SessionStateHandler)
Declaration
public static void add_AfterSessionComplete(SessionStateHandler value)
Parameters
Session
|
add_BeforeRequest(SessionStateHandler)
Declaration
public static void add_BeforeRequest(SessionStateHandler value)
Parameters
Session
|
add_BeforeResponse(SessionStateHandler)
Declaration
public static void add_BeforeResponse(SessionStateHandler value)
Parameters
Session
|
add_BeforeReturningError(SessionStateHandler)
Declaration
public static void add_BeforeReturningError(SessionStateHandler value)
Parameters
Session
|
add_FiddlerAttach(SimpleEventHandler)
Declaration
public static void add_FiddlerAttach(SimpleEventHandler value)
Parameters
Simple
|
add_FiddlerDetach(SimpleEventHandler)
Declaration
public static void add_FiddlerDetach(SimpleEventHandler value)
Parameters
Simple
|
add_RequestHeadersAvailable(SessionStateHandler)
Declaration
public static void add_RequestHeadersAvailable(SessionStateHandler value)
Parameters
Session
|
add_ResponseHeadersAvailable(SessionStateHandler)
Declaration
public static void add_ResponseHeadersAvailable(SessionStateHandler value)
Parameters
Session
|
CreateProxyEndpoint(Int32, Boolean, X509Certificate2)
Start a new proxy endpoint instance, listening on the specified port
Declaration
public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, X509Certificate2 certHTTPS)
Parameters
System. The port to listen on |
System. TRUE if remote clients should be permitted to connect to this endpoint |
System. A certificate to return when clients connect, or null |
Returns
Proxy
A Proxy object, or null if unsuccessful |
CreateProxyEndpoint(Int32, Boolean, String)
Start a new proxy endpoint instance, listening on the specified port
Declaration
public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, string sHTTPSHostname)
Parameters
System. The port to listen on |
System. TRUE if remote clients should be permitted to connect to this endpoint |
System. A Hostname (e.g. EXAMPLE.com) if this endpoint should be treated as a HTTPS Server |
Returns
Proxy
A Proxy object, or null if unsuccessful |
DoExport(String, Session[], Dictionary<String, Object>, EventHandler<ProgressCallbackEventArgs>, Boolean)
Export Sessions in the specified format
Declaration
public static bool DoExport(string sExportFormat, Session[] oSessions, Dictionary<string, object> dictOptions, EventHandler<ProgressCallbackEventArgs> ehPCEA, bool logProgress = true)
Parameters
System. Shortname of desired format |
Session[]
oSessions
Sessions to export |
System. Options to pass to the ISessionExport interface |
System. Your callback event handler, or NULL to allow Fiddler to handle |
System. If true, output import progress information in the log |
Returns
System. TRUE if successful, FALSE if desired format doesn't exist or other error occurs |
DoImport(String, Boolean, Dictionary<String, Object>, EventHandler<ProgressCallbackEventArgs>, GetPasswordDelegate, Boolean, Boolean)
Calls a Fiddler Session Importer and returns the list of loaded Sessions.
Declaration
public static Session[] DoImport(string sImportFormat, bool bAddToSessionList, Dictionary<string, object> dictOptions, EventHandler<ProgressCallbackEventArgs> ehPCEA, GetPasswordDelegate passwordCallback = null, bool skipNewSessionEvent = false, bool logProgress = true)
Parameters
System. String naming the Import format, e.g. HTTPArchive |
System. Should sessions be added to WebSessions list? (Not meaningful for FiddlerCore) |
System. Dictionary of Options to pass to the Transcoder |
System. Your callback event handler, or NULL to allow Fiddler to handle |
Get Callback that is used to request passwords from the host if needed |
System. If true, new session event will not be raised on each imported session |
System. If true, output import progress information in the log |
Returns
Session[]
Loaded Session[], or null on Failure |
GetVersionString()
Gets Fiddler* version info
Declaration
public static string GetVersionString()
Returns
System. A string indicating the build/flavor of the Fiddler* assembly |
InitConnectoids()
Allow working with the connectoids info. E.g. when you need info for the system proxies before starting the Fiddler one.
Declaration
public static void InitConnectoids()
IsStarted()
Checks if FiddlerCore is running.
Declaration
public static bool IsStarted()
Returns
System. TRUE if FiddlerCore is started/listening; FALSE otherwise. |
IsSystemProxy()
Checks if FiddlerCore is running and registered as the System Proxy.
Declaration
public static bool IsSystemProxy()
Returns
System. TRUE if FiddlerCore IsStarted AND registered as the system proxy; FALSE otherwise. |
LogLeakedFile(String)
Record that a temporary file was created and handed to an external tool. We'll do our best to delete this file on exit.
Declaration
public static void LogLeakedFile(string sTempFile)
Parameters
System. The filename of the file to be deleted |
remove_AfterSessionComplete(SessionStateHandler)
Declaration
public static void remove_AfterSessionComplete(SessionStateHandler value)
Parameters
Session
|
remove_BeforeRequest(SessionStateHandler)
Declaration
public static void remove_BeforeRequest(SessionStateHandler value)
Parameters
Session
|
remove_BeforeResponse(SessionStateHandler)
Declaration
public static void remove_BeforeResponse(SessionStateHandler value)
Parameters
Session
|
remove_BeforeReturningError(SessionStateHandler)
Declaration
public static void remove_BeforeReturningError(SessionStateHandler value)
Parameters
Session
|
remove_FiddlerAttach(SimpleEventHandler)
Declaration
public static void remove_FiddlerAttach(SimpleEventHandler value)
Parameters
Simple
|
remove_FiddlerDetach(SimpleEventHandler)
Declaration
public static void remove_FiddlerDetach(SimpleEventHandler value)
Parameters
Simple
|
remove_RequestHeadersAvailable(SessionStateHandler)
Declaration
public static void remove_RequestHeadersAvailable(SessionStateHandler value)
Parameters
Session
|
remove_ResponseHeadersAvailable(SessionStateHandler)
Declaration
public static void remove_ResponseHeadersAvailable(SessionStateHandler value)
Parameters
Session
|
ResetSessionCounter()
Reset the SessionID counter to 0. This method can lead to confusing UI, so call sparingly.
Declaration
[CodeDescription("Reset the SessionID counter to 0. This method can lead to confusing UI, so call sparingly.")]
public static void ResetSessionCounter()
SetAppDisplayName(String)
Set the DisplayName for the application
Declaration
public static void SetAppDisplayName(string sAppName)
Parameters
System. 1 to 64 character name to be displayed in error messages, etc |
Shutdown()
Shuts down the FiddlerCore proxy and disposes it. Note: If there's any traffic in progress while you're calling this method, your background threads are likely to blow up with ObjectDisposedExceptions or NullReferenceExceptions. In many cases, you're better off simply calling oProxy.Detach() and letting the garbage collector clean up when your program exits.
Declaration
public static void Shutdown()
Startup(FiddlerCoreStartupSettings)
Recommended way to Start FiddlerCore.
Declaration
public static void Startup(FiddlerCoreStartupSettings startupSettings)
Parameters
Fiddler |
Supports(String)
Does this Fiddler instance support the specified feature?
Declaration
public static bool Supports(string sFeatureName)
Parameters
System. Feature name (e.g. "bzip2") |
Returns
System. TRUE if the specified feature is supported; false otherwise |
Events
AfterSessionComplete
This event fires when a session has been completed
Declaration
public static event SessionStateHandler AfterSessionComplete
Event Type
AfterSocketAccept
Fired each time Fiddler successfully accepts a TCP/IP connection
Declaration
public static event EventHandler<ConnectionEventArgs> AfterSocketAccept
Event Type
System.
|
AfterSocketConnect
Fired each time Fiddler successfully establishes a TCP/IP connection
Declaration
public static event EventHandler<ConnectionEventArgs> AfterSocketConnect
Event Type
System.
|
BeforeRequest
This event fires when a client request is received by Fiddler
Declaration
public static event SessionStateHandler BeforeRequest
Event Type
BeforeResponse
This event fires when a server response is received by Fiddler
Declaration
public static event SessionStateHandler BeforeResponse
Event Type
BeforeReturningError
This event fires when an error response is generated by Fiddler
Declaration
public static event SessionStateHandler BeforeReturningError
Event Type
FiddlerAttach
Sync this event to be notified when FiddlerCore has attached as the system proxy.")]
Declaration
[CodeDescription("Sync this event to be notified when FiddlerCore has attached as the system proxy.")]
public static event SimpleEventHandler FiddlerAttach
Event Type
FiddlerDetach
Sync this event to be notified when FiddlerCore has detached as the system proxy.
Declaration
[CodeDescription("Sync this event to be notified when FiddlerCore has detached as the system proxy.")]
public static event SimpleEventHandler FiddlerDetach
Event Type
OnAttachProxyError
This event fires when Fiddler fails to register as the system proxy
Declaration
public static event EventHandler<AttachProxyErrorEventArgs> OnAttachProxyError
Event Type
System.
|
OnClearCache
This event fires when the user instructs Fiddler to clear the cache or cookies
Declaration
[CodeDescription("This event fires when the user instructs Fiddler to clear the cache or cookies.")]
public static event EventHandler<CacheClearEventArgs> OnClearCache
Event Type
System.
|
OnGRPCMessage
This event fires when Fiddler captures a GRPC message
Declaration
public static event EventHandler<GRPCMessageEventArgs> OnGRPCMessage
Event Type
System.
|
OnReadRequestBuffer
This event fires each time FiddlerCore reads data from network for the client's request. Note that this data is not formatted in any way, and must be parsed by the recipient.
Declaration
public static event EventHandler<RawReadEventArgs> OnReadRequestBuffer
Event Type
System.
|
OnReadResponseBuffer
This event fires each time FiddlerCore reads data from network for the server's response. Note that this data is not formatted in any way, and must be parsed by the recipient.
Declaration
public static event EventHandler<RawReadEventArgs> OnReadResponseBuffer
Event Type
System.
|
OnSSEMessage
This event fires when Fiddler captures an SSE message sent from the remote server
Declaration
public static event EventHandler<SSEMessageEventArgs> OnSSEMessage
Event Type
System.
|
OnTrailersAvailable
This event fires when Fiddler captures response trailers from a gRPC tunnel
Declaration
public static event EventHandler<TrailersAvailableEventArgs> OnTrailersAvailable
Event Type
System.
|
OnValidateServerCertificate
This event fires when Fiddler evaluates the validity of a server-provided certificate. Adjust the value of the ValidityState property if desired.
Declaration
[CodeDescription("This event fires a HTTPS certificate is validated.")]
public static event EventHandler<ValidateServerCertificateEventArgs> OnValidateServerCertificate
Event Type
System.
|
OnWebSocketMessage
This event fires when Fiddler captures a WebSocket message
Declaration
public static event EventHandler<WebSocketMessageEventArgs> OnWebSocketMessage
Event Type
System.
|
RequestHeadersAvailable
This event fires when Request Headers are available
Declaration
public static event SessionStateHandler RequestHeadersAvailable
Event Type
ResponseHeadersAvailable
This event fires when Response Headers are available
Declaration
public static event SessionStateHandler ResponseHeadersAvailable