Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

tomvicker

Posts

3

Joined

Wed Apr 21, 2010 1:48 am

Need clarification on publicProxyAddress for SOCKS proxies

by tomvicker » Thu Apr 29, 2010 12:31 am

Hi,

In the edtFTPj/PRO developer guide the following is under the topic "How to FTP through a SOCKS proxy":

To direct socket communications via a SOCKS proxy, the ProxySettings of the client must be set appropriately. An example is shown below:

ProFTPClient ftp = new ProFTPClient();
ftp.getProxySettings().setProxyAddress("myinternalproxyaddress");
ftp.getProxySettings().setProxyPort(1080);
ftp.getProxySettings().setProxyPassword("myuser");
ftp.getProxySettings().setProxyUserName("mypassword");
ftp.getProxySettings().setPublicProxyAddress("mypublicproxy");
ftp.getProxySettings().setProxyType(ProxyType.SOCKS5);

Note that the public proxy address is generally only required when using FTP in active mode. In this situation, the PORT command must advertise the public proxy address to the FTP server that will be connecting back to the client.

* * *

Can you please clarify the note about the public proxy address. Is it sufficient to simply set the publicProxyAddress when using Active mode or is their additional coding required in order for the PORT command to advertise the public proxy address to the FTP server ?

Also, I don't understand the difference between "myinternalproxyaddress" and "mypublicproxy". Is one an IP and the other a host name ? Are they the same box ? Can you explain the scenario in more detail ?

Thanks,
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Need clarification on publicProxyAddress for SOCKS proxi

by support2 » Thu Apr 29, 2010 3:20 am

Yes in active mode the PORT command should supply the public proxy address to the server to connect to. Best to supply an IP address, as the client may not be able to resolve the public proxy address to an IP address.

The internal proxy address is the address that the client can use to contact the proxy. It is probably an internal network address. The public address is what the proxy displays to external clients (it's probably a different network interface on the proxy machine).
no avatar
User

tomvicker

Posts

3

Joined

Wed Apr 21, 2010 1:48 am

by tomvicker » Thu Apr 29, 2010 5:02 am

Just to be sure, I do not need to do any additional coding other than coding this one additional line (in active mode), correct ? In other words, by supplying this line, the ProFTPClient code will take care of executing the PORT command correct ? If additional coding is needed, please provide example.

ftp.getProxySettings().setPublicProxyAddress("mypublicproxy");

Thanks,
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Thu Apr 29, 2010 7:55 am

It should work, yes. But we haven't tested all proxy servers, so we can't guarantee it. For example, your proxy must support active mode.

Who is online

Users browsing this forum: No registered users and 113 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron