wodSFTP API library - ProxyType Property
      
 

Description

Specifies the type of proxy to use.


Return type

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


Syntax

long Sftp_GetProxyType(void *Sftp, ProxyTypes *pVal);
long Sftp_SetProxyType(void *Sftp, ProxyTypes newVal);

The ProxyType function syntax has these parts:

Part Description
void *Sftp Handle of the created Sftp instance.
ProxyTypes value A ProxyTypes enumeration, as described in settings. Determines which proxy to use.

Settings

The settings for value are:

Constant Value Description
 ProxyNone 0 No proxy is used.
 ProxySocks4 1 Connection is made through SOCKS4 proxy firewall.
 ProxySocks5 2 Connection is made through SOCKS5 proxy firewall.
 ProxyWEBStandard 3 Typical WEB proxy (using web CONNECT command) is used.
 ProxyRelay 4 Simple relay.
 ProxySocks4a 5 Connection is made through SOCKS4a proxy firewall.
 ProxyWEBNtlmAuth 6 NTLM authenticated WEB proxy (using web CONNECT command) is used.

Remarks

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.