C# 클래스 Halibut.Transport.Proxy.HttpProxyClient

HTTP connection proxy class. This class implements the HTTP standard proxy protocol.

You can use this class to set up a connection to an HTTP proxy server. Calling the CreateConnection() method initiates the proxy connection and returns a standard System.Net.Socks.TcpClient object that can be used as normal. The proxy plumbing is all handled for you.

상속: IProxyClient
파일 보기 프로젝트 열기: OctopusDeploy/Halibut

공개 메소드들

메소드 설명
CreateConnection ( string destinationHost, int destinationPort, System.TimeSpan timeout ) : TcpClient

Creates a remote TCP connection through a proxy server to the destination host on the destination port.

This method creates a connection to the proxy server and instructs the proxy server to make a pass through connection to the specified destination host on the specified port.

HttpProxyClient ( ILog logger, string proxyHost, int proxyPort, string proxyUserName, string proxyPassword ) : System

Constructor.

WithTcpClientFactory ( Func tcpClientfactory ) : IProxyClient

비공개 메소드들

메소드 설명
EncodeTo64 ( string toEncode ) : string
GetConnectCmd ( string host, int port ) : string
HandleProxyCommandError ( string host, int port ) : void
ParseCodeAndText ( string line ) : void
ParseResponse ( string response ) : void
SendConnectionCommand ( string host, int port ) : void
WaitForData ( NetworkStream stream ) : void

메소드 상세

CreateConnection() 공개 메소드

Creates a remote TCP connection through a proxy server to the destination host on the destination port.
This method creates a connection to the proxy server and instructs the proxy server to make a pass through connection to the specified destination host on the specified port.
public CreateConnection ( string destinationHost, int destinationPort, System.TimeSpan timeout ) : TcpClient
destinationHost string Destination host name or IP address.
destinationPort int Port number to connect to on the destination host.
timeout System.TimeSpan Timeout duration for the Connect attempt.
리턴 System.Net.Sockets.TcpClient

HttpProxyClient() 공개 메소드

Constructor.
public HttpProxyClient ( ILog logger, string proxyHost, int proxyPort, string proxyUserName, string proxyPassword ) : System
logger ILog
proxyHost string Host name or IP address of the proxy server.
proxyPort int Port number for the proxy server.
proxyUserName string Proxy authentication user name.
proxyPassword string Proxy authentication password.
리턴 System

WithTcpClientFactory() 공개 메소드

public WithTcpClientFactory ( Func tcpClientfactory ) : IProxyClient
tcpClientfactory Func
리턴 IProxyClient