I got the port wrong, its 21. The Proxy seems to make me log on twice, once onto the proxy, once onto the remote server.
Code something like this
ftpc = new FTPClient();
ftpc.setRemoteHost("proxyIP");
ftpc.setRemotePort(21);
ftpc.setMessageListener(listener);
listener.clearLog();
ftpc.connect();
ftpc.login(proxyUID, proxyUPW);
ftpc.user(ftpRemoteUID+"@"+ftpRemoteHost);
ftpc.password(ftpRemoteUPW);
ftpc.dir()
Seems to allow me to log on to the remote server, but then I get
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 15 Nov 2006 14:50:12.671 : ---> PASV
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 15 Nov 2006 14:50:12.671 : 227 Entering Passive Mode (172,16,1,17,132,149)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 15 Nov 2006 14:50:12.687 : ---> NLST
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 15 Nov 2006 14:50:12.718 : 200 Command okay.
com.enterprisedt.net.ftp.FTPException: Command okay.
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:872)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:2095)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 15 Nov 2006 14:50:12.718 : ---> QUIT
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:2055)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 15 Nov 2006 14:50:12.796 : 150
Opening ASCII mode data connection for file list.
at com.anl.ftp.Ftp.ftpDir(Ftp.java:316)
ERROR
at com.anl.ftp.Ftp.getDir(Ftp.java:182)
at com.anl.ftp.Test.execute(Test.java:22)
at com.anl.ftp.Test.main(Test.java:28)
com.enterprisedt.net.ftp.FTPException: Opening ASCII mode data connection for file list.
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:872)
at com.enterprisedt.net.ftp.FTPClient.quit(FTPClient.java:2487)
at com.anl.ftp.Ftp.ftpQuit(Ftp.java:377)
at com.anl.ftp.Ftp.disconnect(Ftp.java:132)
at com.anl.ftp.Ftp.getDir(Ftp.java:183)
at com.anl.ftp.Test.execute(Test.java:22)
at com.anl.ftp.Test.main(Test.java:28)