C# Class TrotiNet.ProxyLogic

Wrapper around BaseProxyLogic that adds various utility functions
Inheritance: BaseProxyLogic
Mostrar archivo Open project: Gizeta/Nekoxy-fiddler

Public Methods

Method Description
ChangeRequestURI ( string newURI ) : void

Change the request URI; also change the 'Host' request header, when necessary

If required, this function should be called from OnReceiveRequest.

CompressResponse ( byte output ) : byte[]

Compress a byte array based on the content encoding header

CreateProxy ( HttpSocket socketBP ) : AbstractProxyLogic

Static constructor

EncodeStringResponse ( string s, Encoding encoding ) : byte[]

Get an encoded byte array for a given string

GetResponseMessageStream ( Stream inS ) : Stream

Interpret a message with respect to its content encoding

GetResponseMessageStream ( byte msg ) : Stream

Interpret a message with respect to its content encoding

ProxyLogic ( HttpSocket socketBP ) : System

Instantiate a transparent proxy

Protected Methods

Method Description
GetContent ( ) : byte[]

If this method is called on a response, either the custom response pipeline or the 302 redirect MUST be used.

Private Methods

Method Description
GetChunkedContent ( ) : byte[]

Download the chunked file and return the byte array

GetNonChunkedContent ( ) : byte[]

Get a file with a known file size (i.e., not chunked).

Method Details

ChangeRequestURI() public method

Change the request URI; also change the 'Host' request header, when necessary
If required, this function should be called from OnReceiveRequest.
public ChangeRequestURI ( string newURI ) : void
newURI string
return void

CompressResponse() public method

Compress a byte array based on the content encoding header
public CompressResponse ( byte output ) : byte[]
output byte The content to be compressed
return byte[]

CreateProxy() public static method

Static constructor
public static CreateProxy ( HttpSocket socketBP ) : AbstractProxyLogic
socketBP HttpSocket
return AbstractProxyLogic

EncodeStringResponse() public method

Get an encoded byte array for a given string
public EncodeStringResponse ( string s, Encoding encoding ) : byte[]
s string
encoding System.Text.Encoding
return byte[]

GetContent() protected method

If this method is called on a response, either the custom response pipeline or the 302 redirect MUST be used.
protected GetContent ( ) : byte[]
return byte[]

GetResponseMessageStream() public method

Interpret a message with respect to its content encoding
public GetResponseMessageStream ( Stream inS ) : Stream
inS Stream
return Stream

GetResponseMessageStream() public method

Interpret a message with respect to its content encoding
public GetResponseMessageStream ( byte msg ) : Stream
msg byte
return Stream

ProxyLogic() public method

Instantiate a transparent proxy
public ProxyLogic ( HttpSocket socketBP ) : System
socketBP HttpSocket Client browser-proxy socket
return System