Class
FiddlerApplication

This class acts as the central point for script/extensions to interact with Fiddler components.

Definition

Namespace:Fiddler

Assembly:FiddlerCore.dll

Syntax:

cs-api-definition
public static class FiddlerApplication

Inheritance: objectFiddlerApplication

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()

Fields

ClientCertificateProvider

When set, the function will be called to select the local Secure Sockets Layer (SSL) certificate used for authentication

Declaration

cs-api-definition
public static LocalCertificateSelectionCallback ClientCertificateProvider

Field Value

LocalCertificateSelectionCallback

DefaultProxy

This value should be set to the proxy that will be used for some outgoing requests - for example GRPC reflection info

Declaration

cs-api-definition
public static IWebProxy DefaultProxy

Field Value

IWebProxy

GetNegotiatedCipherSuiteFunc

When set, the function will be called to get the string value of the negotiated cipher suite for the given SslStream

Declaration

cs-api-definition
public static Func<SslStream, string> GetNegotiatedCipherSuiteFunc

Field Value

Func<SslStream, string>

StringifyNegotiatedCipherSuiteFunc

When set, the function will be called to convert a cipher suite value (number) to a human readable string value.

Declaration

cs-api-definition
public static Func<int, string> StringifyNegotiatedCipherSuiteFunc

Field Value

Func<int, string>

isClosing

TRUE if Fiddler is currently shutting down. Suspend all work that won't have side-effects.

Declaration

cs-api-definition
public static bool isClosing

Field Value

bool

oDefaultClientCertificate

The default certificate used for client authentication

Declaration

cs-api-definition
public static X509Certificate oDefaultClientCertificate

Field Value

X509Certificate

oProxy

Fiddler's core proxy object.

Declaration

cs-api-definition
[CodeDescription("Fiddler's core proxy engine.")]
public static Proxy oProxy

Field Value

Proxy

oTranscoders

Fiddler Import/Export Transcoders

Declaration

cs-api-definition
public static FiddlerTranscoders oTranscoders

Field Value

FiddlerTranscoders

Properties

CustomMimeMappings

By setting this property you can provide Telerik Fiddler Core with custom MIME-type-to-file-extension mappings.

Declaration

cs-api-definition
public static IEnumerable<MimeMap> CustomMimeMappings { set; }

Property Value

IEnumerable<MimeMap>

Log

Fiddler's logging system

Declaration

cs-api-definition
[CodeDescription("Fiddler's logging subsystem; displayed on the LOG tab by default.")]
public static Logger Log { get; }

Property Value

Logger

Prefs

Fiddler's Preferences collection. Learn more at http://fiddler.wikidot.com/prefs

Declaration

cs-api-definition
[CodeDescription("Fiddler's Preferences collection. http://fiddler.wikidot.com/prefs")]
public static IFiddlerPreferences Prefs { get; }

Property Value

IFiddlerPreferences

oAutoResponder

Fiddler's AutoResponder object.

Declaration

cs-api-definition
[CodeDescription("Fiddler's AutoResponder object.")]
public static AutoResponder oAutoResponder { get; }

Property Value

AutoResponder

oSAZProvider

Gets or sets the provider that will be used to load and write SAZ files.

Declaration

cs-api-definition
public static ISAZProvider oSAZProvider { get; set; }

Property Value

ISAZProvider

Methods

CreateProxyEndpoint(int, bool, X509Certificate2)

Start a new proxy endpoint instance, listening on the specified port

Declaration

cs-api-definition
public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, X509Certificate2 certHTTPS)

Parameters

iPort

int

The port to listen on

bAllowRemote

bool

TRUE if remote clients should be permitted to connect to this endpoint

certHTTPS

X509Certificate2

A certificate to return when clients connect, or null

Returns

Proxy

A Proxy object, or null if unsuccessful

CreateProxyEndpoint(int, bool, string)

Start a new proxy endpoint instance, listening on the specified port

Declaration

cs-api-definition
public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, string sHTTPSHostname)

Parameters

iPort

int

The port to listen on

bAllowRemote

bool

TRUE if remote clients should be permitted to connect to this endpoint

sHTTPSHostname

string

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>, bool)

Export Sessions in the specified format

Declaration

cs-api-definition
public static bool DoExport(string sExportFormat, Session[] oSessions, Dictionary<string, object> dictOptions, EventHandler<ProgressCallbackEventArgs> ehPCEA, bool logProgress = true)

Parameters

sExportFormat

string

Shortname of desired format

oSessions

Session[]

Sessions to export

dictOptions

Dictionary<string, object>

Options to pass to the ISessionExport interface

ehPCEA

EventHandler<ProgressCallbackEventArgs>

Your callback event handler, or NULL to allow Fiddler to handle

logProgress

bool

If true, output import progress information in the log

Returns

bool

TRUE if successful, FALSE if desired format doesn't exist or other error occurs

DoImport(string, bool, Dictionary<string, object>, EventHandler<ProgressCallbackEventArgs>, GetPasswordDelegate, bool, bool)

Calls a Fiddler Session Importer and returns the list of loaded Sessions.

Declaration

cs-api-definition
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

sImportFormat

string

String naming the Import format, e.g. HTTPArchive

bAddToSessionList

bool

Should sessions be added to WebSessions list? (Not meaningful for FiddlerCore)

dictOptions

Dictionary<string, object>

Dictionary of Options to pass to the Transcoder

ehPCEA

EventHandler<ProgressCallbackEventArgs>

Your callback event handler, or NULL to allow Fiddler to handle

passwordCallback

GetPasswordDelegate

Callback that is used to request passwords from the host if needed

skipNewSessionEvent

bool

If true, new session event will not be raised on each imported session

logProgress

bool

If true, output import progress information in the log

Returns

Session[]

Loaded Session[], or null on Failure

GetVersionString()

Gets Fiddler* version info

Declaration

cs-api-definition
public static string GetVersionString()

Returns

string

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

cs-api-definition
public static void InitConnectoids()

IsStarted()

Checks if FiddlerCore is running.

Declaration

cs-api-definition
public static bool IsStarted()

Returns

bool

TRUE if FiddlerCore is started/listening; FALSE otherwise.

IsSystemProxy()

Checks if FiddlerCore is running and registered as the System Proxy.

Declaration

cs-api-definition
public static bool IsSystemProxy()

Returns

bool

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

cs-api-definition
public static void LogLeakedFile(string sTempFile)

Parameters

sTempFile

string

The filename of the file to be deleted

ResetSessionCounter()

Reset the SessionID counter to 0. This method can lead to confusing UI, so call sparingly.

Declaration

cs-api-definition
[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

cs-api-definition
public static void SetAppDisplayName(string sAppName)

Parameters

sAppName

string

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

cs-api-definition
public static void Shutdown()

Startup(FiddlerCoreStartupSettings)

Recommended way to Start FiddlerCore.

Declaration

cs-api-definition
public static void Startup(FiddlerCoreStartupSettings startupSettings)

Parameters

startupSettings

FiddlerCoreStartupSettings

FiddlerCoreStartupSettings

Supports(string)

Does this Fiddler instance support the specified feature?

Declaration

cs-api-definition
public static bool Supports(string sFeatureName)

Parameters

sFeatureName

string

Feature name (e.g. "bzip2")

Returns

bool

TRUE if the specified feature is supported; false otherwise

Events

AfterSessionComplete

This event fires when a session has been completed

Declaration

cs-api-definition
public static event SessionStateHandler AfterSessionComplete

Event Value

SessionStateHandler

AfterSocketAccept

Fired each time Fiddler successfully accepts a TCP/IP connection

Declaration

cs-api-definition
public static event EventHandler<ConnectionEventArgs> AfterSocketAccept

Event Value

EventHandler<ConnectionEventArgs>

AfterSocketConnect

Fired each time Fiddler successfully establishes a TCP/IP connection

Declaration

cs-api-definition
public static event EventHandler<ConnectionEventArgs> AfterSocketConnect

Event Value

EventHandler<ConnectionEventArgs>

BeforeRequest

This event fires when a client request is received by Fiddler

Declaration

cs-api-definition
public static event SessionStateHandler BeforeRequest

Event Value

SessionStateHandler

BeforeResponse

This event fires when a server response is received by Fiddler

Declaration

cs-api-definition
public static event SessionStateHandler BeforeResponse

Event Value

SessionStateHandler

BeforeReturningError

This event fires when an error response is generated by Fiddler

Declaration

cs-api-definition
public static event SessionStateHandler BeforeReturningError

Event Value

SessionStateHandler

FiddlerAttach

Sync this event to be notified when FiddlerCore has attached as the system proxy.")]

Declaration

cs-api-definition
[CodeDescription("Sync this event to be notified when FiddlerCore has attached as the system proxy.")]
public static event SimpleEventHandler FiddlerAttach

Event Value

SimpleEventHandler

FiddlerDetach

Sync this event to be notified when FiddlerCore has detached as the system proxy.

Declaration

cs-api-definition
[CodeDescription("Sync this event to be notified when FiddlerCore has detached as the system proxy.")]
public static event SimpleEventHandler FiddlerDetach

Event Value

SimpleEventHandler

OnAttachProxyError

This event fires when Fiddler fails to register as the system proxy

Declaration

cs-api-definition
public static event EventHandler<AttachProxyErrorEventArgs> OnAttachProxyError

Event Value

EventHandler<AttachProxyErrorEventArgs>

OnClearCache

This event fires when the user instructs Fiddler to clear the cache or cookies

Declaration

cs-api-definition
[CodeDescription("This event fires when the user instructs Fiddler to clear the cache or cookies.")]
public static event EventHandler<CacheClearEventArgs> OnClearCache

Event Value

EventHandler<CacheClearEventArgs>

OnGRPCMessage

This event fires when Fiddler captures a GRPC message

Declaration

cs-api-definition
public static event EventHandler<GRPCMessageEventArgs> OnGRPCMessage

Event Value

EventHandler<GRPCMessageEventArgs>

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

cs-api-definition
public static event EventHandler<RawReadEventArgs> OnReadRequestBuffer

Event Value

EventHandler<RawReadEventArgs>

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

cs-api-definition
public static event EventHandler<RawReadEventArgs> OnReadResponseBuffer

Event Value

EventHandler<RawReadEventArgs>

OnSSEMessage

This event fires when Fiddler captures an SSE message sent from the remote server

Declaration

cs-api-definition
public static event EventHandler<SSEMessageEventArgs> OnSSEMessage

Event Value

EventHandler<SSEMessageEventArgs>

OnTrailersAvailable

This event fires when Fiddler captures response trailers from a gRPC tunnel

Declaration

cs-api-definition
public static event EventHandler<TrailersAvailableEventArgs> OnTrailersAvailable

Event Value

EventHandler<TrailersAvailableEventArgs>

OnValidateServerCertificate

This event fires when Fiddler evaluates the validity of a server-provided certificate. Adjust the value of the ValidityState property if desired.

Declaration

cs-api-definition
[CodeDescription("This event fires a HTTPS certificate is validated.")]
public static event EventHandler<ValidateServerCertificateEventArgs> OnValidateServerCertificate

Event Value

EventHandler<ValidateServerCertificateEventArgs>

OnWebSocketMessage

This event fires when Fiddler captures a WebSocket message

Declaration

cs-api-definition
public static event EventHandler<WebSocketMessageEventArgs> OnWebSocketMessage

Event Value

EventHandler<WebSocketMessageEventArgs>

RequestHeadersAvailable

This event fires when Request Headers are available

Declaration

cs-api-definition
public static event SessionStateHandler RequestHeadersAvailable

Event Value

SessionStateHandler

ResponseHeadersAvailable

This event fires when Response Headers are available

Declaration

cs-api-definition
public static event SessionStateHandler ResponseHeadersAvailable

Event Value

SessionStateHandler