:ProxyConnect()


Class

     aprFTP()

 

Syntax

     :ProxyConnect(nProxyType, cProxyHost, nProxyPort, cProxyUID, cProxyPWD, Host, Timeout) -> hSession

 

Parameters

 

 

nProxyType

Numeric indicating Proxy Type. See table below

 

cProxyHost

Proxy server host name

 

nProxyPort

Numeric indicating the Port on the Proxy Server to connect through

 

cProxyUID

User ID for accessing Proxy

 

cProxyPWD

Password for accessing Proxy

 

cHost

String, May be a fully-qualified domain name or an IP address.

 

nTimeout

Optional: Numeric. Number of Seconds to wait before resulting in a Timeout Error.

A Value of zero indicates that the process should wait indefinitely for the Server to respond.

 

Return

If the function succeeds, the return value is a numeric client session value which is stored in :Session.

If the function fails the return value is FTP_ERROR. To get further error information see :nErr and :cErr

 

Description

The :ProxyConnect() method establishes a connection with an FTP proxy server. Four basic proxy server types are recognized, and the library will automatically negotiate with the server to establish a connection through the proxy server to the remote host.

 

The username and password that is used to authenticate the client with the proxy server are not the same as those used to login to the target server. Once a connection has been established with the proxy server, the client must call the :Login() method to actually login to the remote server and begin a file transfer.

 

nProxyType

 

Constant

Description

 

FTP_PROXY_NONE

The client is not connecting through a proxy server. When this value is specified the proxy parameters are ignored and the client is connected directly to the remote host.

 

FTP_PROXY_USER

This value specifies that the client is not logged into the proxy server. The USER command is sent in the format username@ftpsite followed by the password. This is the format used with the Gauntlet proxy server.

 

FTP_PROXY_LOGIN

This value specifies that the client is logged into the proxy server. The USER command is then sent in the format username@ftpsite followed by the password. This is the format used by the InterLock proxy server.

 

FTP_PROXY_OPEN

This value specifies that the client is not logged into the proxy server. The OPEN command is sent specifying the host name, followed by the username and password.

 

FTP_PROXY_SITE

This value specifies that the client is logged into the server. The SITE command is sent, specifying the host name, followed by the username and the password.

 

FTP_PROXY_OTHER

This special proxy type specifies that another, undefined proxy server is being used. The client connects to the proxy host, but does not attempt to authenticate the client. The application is responsible for negotiating with the proxy server, typically using the FtpCommand function to send specific command sequences.

 

See Also

:Connect(), :ConnectEx(), :Disconnect(), :Login(), :ProxyConnectEx()