Class TSocksBlockSocket

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSocksBlockSocket = class(TBlockSocket)

Description

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.

Hierarchy

Overview

Methods

Public constructor Create;
Public function SocksOpen: Boolean;
Public function SocksRequest(Cmd: Byte; const IP, Port: string): Boolean;
Public function SocksResponse: Boolean;

Properties

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;

Description

Methods

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!)

Properties

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.


Generated by PasDoc 0.9.0 on 2012-04-23 21:38:50