Classe TSocksBlockSocket

Unit

Declaração

type TSocksBlockSocket = class(TBlockSocket)

Descrição

Support for SOCKS4 and SOCKS5 proxy

Layer with definition all necessary properties and functions for implementation SOCKS proxy client. Do not use this class directly.

Hierarquia

Visão Geral

Campos

Protected FSocksIP: string;
Protected FSocksPort: string;
Protected FSocksTimeout: integer;
Protected FSocksUsername: string;
Protected FSocksPassword: string;
Protected FUsingSocks: Boolean;
Protected FSocksResolver: Boolean;
Protected FSocksLastError: integer;
Protected FSocksResponseIP: string;
Protected FSocksResponsePort: string;
Protected FSocksLocalIP: string;
Protected FSocksLocalPort: string;
Protected FSocksRemoteIP: string;
Protected FSocksRemotePort: string;
Protected FBypassFlag: Boolean;
Protected FSocksType: TSocksType;

Métodos

Protected function SocksCode(IP, Port: string): Ansistring;
Protected function SocksDecode(Value: Ansistring): integer;
Public constructor Create;
Public function SocksOpen: Boolean;
Public function SocksRequest(Cmd: Byte; const IP, Port: string): Boolean;
Public function SocksResponse: Boolean;

Propriedades

Public property UsingSocks: Boolean read FUsingSocks;
Public property SocksLastError: integer read FSocksLastError;
Published property SocksIP: string read FSocksIP write FSocksIP;
Published property SocksPort: string read FSocksPort write FSocksPort;
Published property SocksUsername: string read FSocksUsername write FSocksUsername;
Published property SocksPassword: string read FSocksPassword write FSocksPassword;
Published property SocksTimeout: integer read FSocksTimeout write FSocksTimeout;
Published property SocksResolver: Boolean read FSocksResolver write FSocksResolver;
Published property SocksType: TSocksType read FSocksType write FSocksType;

Descrição

Campos

Protected FSocksIP: string;
 
Protected FSocksPort: string;
 
Protected FSocksTimeout: integer;
 
Protected FSocksUsername: string;
 
Protected FSocksPassword: string;
 
Protected FUsingSocks: Boolean;
 
Protected FSocksResolver: Boolean;
 
Protected FSocksLastError: integer;
 
Protected FSocksResponseIP: string;
 
Protected FSocksResponsePort: string;
 
Protected FSocksLocalIP: string;
 
Protected FSocksLocalPort: string;
 
Protected FSocksRemoteIP: string;
 
Protected FSocksRemotePort: string;
 
Protected FBypassFlag: Boolean;
 
Protected FSocksType: TSocksType;
 

Métodos

Protected function SocksCode(IP, Port: string): Ansistring;
 
Protected function SocksDecode(Value: Ansistring): integer;
 
Public constructor Create;
 
Public function SocksOpen: Boolean;

Open connection to SOCKS proxy and if SocksUsername is set, do authorisation to proxy. This is needed only in special cases! (it is called internally!)

Public function SocksRequest(Cmd: Byte; const IP, Port: string): Boolean;

Send specified request to SOCKS proxy. This is needed only in special cases! (it is called internally!)

Public function SocksResponse: Boolean;

Receive response to previosly sended request. This is needed only in special cases! (it is called internally!)

Propriedades

Public property UsingSocks: Boolean read FUsingSocks;

Is True when class is using SOCKS proxy.

Public property SocksLastError: integer read FSocksLastError;

If SOCKS proxy failed, here is error code returned from SOCKS proxy.

Published property SocksIP: string read FSocksIP write FSocksIP;

Address of SOCKS server. If value is empty string, SOCKS support is disabled. Assingning any value to this property enable SOCKS mode. Warning: You cannot combine this mode with HTTP-tunneling mode!

Published property SocksPort: string read FSocksPort write FSocksPort;

Port of SOCKS server. Default value is '1080'.

Published property SocksUsername: string read FSocksUsername write FSocksUsername;

If you need authorisation on SOCKS server, set username here.

Published property SocksPassword: string read FSocksPassword write FSocksPassword;

If you need authorisation on SOCKS server, set password here.

Published property SocksTimeout: integer read FSocksTimeout write FSocksTimeout;

Specify timeout for communicatin with SOCKS server. Default is one minute.

Published property SocksResolver: Boolean read FSocksResolver write FSocksResolver;

If True, all symbolic names of target hosts is not translated to IP's locally, but resolving is by SOCKS proxy. Default is True.

Published property SocksType: TSocksType read FSocksType write FSocksType;

Specify SOCKS type. By default is used SOCKS5, but you can use SOCKS4 too. When you select SOCKS4, then if SOCKSResolver is enabled, then is used SOCKS4a. Othervise is used pure SOCKS4.


Gerado por PasDoc 0.16.0.