Back to product page

ProxyType function


Specifies the type of proxy to use.

Type

A Long value. If successful, 0 is returned, otherwise error as specified here

Syntax

  • C
long Sftp_GetProxyType(void *Sftp, ProxyTypes *pVal);
long Sftp_SetProxyType(void *Sftp, ProxyTypes newVal);
The ProxyType(void *Sftp,ProxyTypes value) syntax has these parts:
void *SftpHandle of the created Sftp instance.
ProxyTypes valueA ProxyTypes enumeration, as described in settings. Determines which proxy to use.

Remarks

The settings for value are:

Constant Value Description
ProxyNone0 Unknown reason.
ProxySocks4 1 Host not allowed to connect.
ProxySocks52 Protocol error.
ProxyWEBStandard 3 Key exchange failed.
ProxyRelay4 Reserved.
ProxySocks4a 5 Mac error.
ProxyWEBNtlmAuth6 Compression error.
ProxyWEBIntegratedAuth8 Protocol version not supported.


If a user needs to connect to a remote server through a proxy, this function should be set to a value other than ProxyNone. Depending on the type of remote proxy, the user should specify the correct protocol with this function.

The most common proxy type is ProxyWEBStandard. Socks 4/4a and Socks 5 are general proxy protocols, universal to any type of protocol. Relay is not a real proxy, but a 'pipe' or 'redirector' that listens on a predefined port, and when a client connects to it, opens a predefined destination hostname and redirects all traffic between the client and the remote server. A relay proxy is very useful when testing other protocols. ProxyWEBNtlmAuth is most recent proxy added and is basically the same as ProxyWebStandard, except NTLM challenge-response authentication is used with the proxy server.

ProxyWEBIntegratedAuth is type of proxy where no username or passwords are sent. Instead, component will try to authenticate using credentials of currently logged in user.

Platforms

Windows