SMTP over HTTP Proxy

ASP: SMTP using HTTP Proxy
SQL Server: SMTP using HTTP Proxy
C#: SMTP using HTTP Proxy
C++: SMTP using HTTP Proxy
MFC: SMTP using HTTP Proxy
C: SMTP using HTTP Proxy
Delphi: SMTP using HTTP Proxy
Visual FoxPro: SMTP using HTTP Proxy
Java: SMTP using HTTP Proxy
Perl: SMTP using HTTP Proxy
PHP: SMTP using HTTP Proxy
Python: SMTP using HTTP Proxy
Ruby: SMTP using HTTP Proxy
VB.NET: SMTP using HTTP Proxy
Visual Basic: SMTP using HTTP Proxy
VBScript: SMTP using HTTP Proxy

POP3 over HTTP Proxy

ASP: POP3 using HTTP Proxy
SQL Server: POP3 using HTTP Proxy
C#: POP3 using HTTP Proxy
C++: POP3 using HTTP Proxy
MFC: POP3 using HTTP Proxy
C: POP3 using HTTP Proxy
Delphi: POP3 using HTTP Proxy
Visual FoxPro: POP3 using HTTP Proxy
Java: POP3 using HTTP Proxy
Perl: POP3 using HTTP Proxy
PHP: POP3 using HTTP Proxy
Python: POP3 using HTTP Proxy
Ruby: POP3 using HTTP Proxy
VB.NET: POP3 using HTTP Proxy
Visual Basic: POP3 using HTTP Proxy
VBScript: POP3 using HTTP Proxy

FTP Proxy Methods

Question:

I need to connect to an ftp server and have to use the following command: ftp://username:password@hosname

That means I’m not able to use the standard connection (first connect to host, then enter username and then password).  Is this possible using the Chilkat FTP2 component?

Answer:

Yes.  There are a number of different FTP proxy methods used by different types of proxy servers.  Chilkat supports 6 different methods via the ProxyMethod property:

ProxyMethod = 1 (SITE site)

USER ProxyUsername
PASS ProxyPassword
SITE Hostname
USER Username
PASS Password

ProxyMethod = 2 (USER user@site)

USER Username@Hostname:Port
PASS Password

ProxyMethod = 3 (USER with login)

USER ProxyUsername
PASS ProxyPassword
USER Username@Hostname:Port
PASS Password

ProxyMethod = 4 (USER/PASS/ACCT)

USER Username@Hostname:Port ProxyUsername
PASS Password
ACCT ProxyPassword

ProxyMethod = 5 (OPEN site)

USER ProxyUsername
PASS ProxyPassword
OPEN Hostname
USER Username
PASS Password

ProxyMethod = 6 (firewallId@site)

USER ProxyUsername@Hostname
USER Username
PASS Password

The FTP2 component has these relevant properties:

Username
Password
ProxyUsername
ProxyPassword
ProxyHostname
ProxyPort
Port
ProxyMethod

Connecting via a proxy is as simple as setting the properties to appropriate values.  I’m sure you may not know exactly which ProxyMethod you need.  To help, there is a DetermineProxy method that can be called to automate the testnig of each proxy method.  Set the properties (ProxyUsername, ProxyHostname, etc.) to appropriate values and then call DetermineProxyMethod and let the component try to discover the proxy method that works.  It will return 0 if none were found, a value from 1 to 6 to indicate which proxy method was successful, or -1 for error.

Internet Explorer Proxy Registry Locations

The IE Proxy settings may be found in the CURRENT_USER registry hive at this path:

/Software/Microsoft/Windows/CurrentVersion/Internet Settings/ProxyServer

and

/Software/Microsoft/Windows/CurrentVersion/Internet Settings/ProxyEnable

ProxyEnable will have a value of 1 if the proxy is enabled. Otherwise it will be 0.