4D Internet Commands v16

IT_SetProxy

Home

 
4D Internet Commands v16
IT_SetProxy

IT_SetProxy 


 

IT_SetProxy ( protocol ; proxyKind ; proxyHostName ; proxyPort ; proxyUserID ) -> Funktionsergebnis 
Parameter Typ   Beschreibung
protocol  Ganzzahl in 1 = FTP; 2 = SMTP; 3 = POP3; 4 = IMAP
proxyKind  Ganzzahl in 0 = None; 1 = SOCKS
proxyHostName  String in Host name or IP address of the SOCKS Proxy
proxyPort  Ganzzahl in Proxy port to connect to
proxyUserID  Text in UserID for SOCKS
Funktionsergebnis  Ganzzahl in Error Code

The IT_SetProxy command allows you to negociate a connection using the specified protocol and then send all further requests through the SOCKs Host (SOCKS Proxy). If you are just connecting to an intranet, then you will probably not have to communicate through the SOCKS Host. However, it all depends on how your company has their firewall set up. The IT_SetProxy settings have an interprocess scope and effect all the connections using the specified protocol in any 4D process.

Note: Socks (or "SOCKS") is a protocol that a proxy server can use to accept requests from client users in a company’s network so that it can forward them across the Internet. If your workstation is located behind a firewall and you want to access an information located on the Internet, the SOCKS host receives your request, forwards the request through the firewall, and then returns the information to your client application.

protocol is an integer value that specifies the protocol to be routed through the specified SOCKS Proxy host. A value of 1 will effect FTP protocol. A value of 2 will effect SMTP protocol. A value of 3 will effect POP3 protocol. A value of 4 will indicate IMAP protocol.

proxyKind is an integer value indicating whether the specified protocol should be routed through a SOCKS Proxy host or not. A value of 1 will route all requests for the specified protocol through the specified SOCKS Host. A value of zero won't route requests for the specified protocol through any SOCKS Host.

proxyHostName is the Host name or the IP address of the SOCKS Proxy machine.

proxyPort is an integer value that specifies the port to use for the specified protocol to communicate with the SOCKS Proxy host.

proxyUserID is a text value that identifies the user. The user ID is given by your network administrator. proxyUserID can be an empty text ("").

Using the following method, all FTP connections will be routed through the specified SOCKS Proxy Host.

 $err:=IT_SetProxy(1;1;$proxyAdd;$proxyPort;"") `FTP SOCKS Proxy
 $err:=FTP_Login("ftp.4d.com";"anonymous";dbody@aol.com";$ftpID)
 $err:=FTP_GetFileInfo($ftpID;$vpath;$vsize;$vmodDate)
 $err:=FTP_Receive($ftpID;$vpath;"";0)
 $err:=FTP_Logout($ftpID)

Note: For clarification purposes, this example does not contain error checking.

The following statement stops routing FTP connections through any SOCKS Proxy Host.

 $err:=IT_SetProxy(1;0;$proxyAdd;$proxyPort;"")



Siehe auch 

IT_GetProxy

 
EIGENSCHAFTEN 

Produkt: 4D Internet Commands
Thema: IC Utilities
Nummer: 88898

 
GESCHICHTE 

Geändert: 4D Internet Commands 6.8.1

 
SCHLÜSSELWÖRTER 

SOCKS

 
ARTIKELVERWENDUNG

4D Internet Commands ( 4D Internet Commands v16)