Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.7k views
in Java FTP by
Good morning, I searched the forums but didn't see this exact question being asked. I need to connect through a proxy server using SOCKS. I saw in the API documentation the two methods for SOCKS, but I didnt see how to actually invoke those for a connection. For instance..

FTPClient ftp = new FTPClient();
ftp.initSOCKS("80", "11.111.1.11");
ftp.initSOCKSAuthentication("user", "pswd");
ftp.connect();

The ftp.connect(); returns a null pointer. Can somone please tell me the correct syntax for making this type of connection?

- Thank you

1 Answer

0 votes
by (162k points)
At a minimum you need to specify the host you are logging into via setRemoteHost().

Categories

...