Status: Using proxy proxyIP
Status: Connecting to proxyIP:21...
Status: Connection established, waiting for welcome message...
Response: 220--------------= TPN/BTINS FTP proxy service =------------
Response: 220---- --
Response: 220---- --
Response: 220---- --
Response: 220---- --
Response: 220---- AUTHORIZED USERS ONLY! --
Response: 220---- ALL TRANSFERS PERFORMED WITH THIS SERVICE ARE LOGGED --
Response: 220---- --
Response: 220---- --
Response: 220---- At the User prompt, enter your FTP site username and the site --
Response: 220---- you are connecting to, followed by your domain login ID. --
Response: 220---- --
Response: 220---- EXAMPLE:
anonymous@microsoft.com AMSmithJ --
Response: 220---- --
Response: 220---- At the Password prompt, enter your FTP site password. --
Response: 220---- --
Response: 220---- At the Enter Password prompt, enter your domain password. --
Response: 220---- --
Response: 220 -----------------------------------------------------------------------
Command: USER remoteusername@remoteHost proxyUserName
Response: 331 Enter password.
Command: PASS ********
Response: 332 Enter proxy password.
Command: ACCT *********
Response: 230-Your bandwidth usage is restricted
Response: 230-User username has group access to: apache
Response: 230-This server supports FXP transfers
Response: 230 OK. Current restricted directory is /
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is your current location
Command: TYPE I
Response: 200 Command okay.
Command: PASV
Response: 227 Entering Passive Mode (00,11,255,11,251,170)
Command: LIST -a
Response: 150 File status okay; about to open data connection.
Response: 226 Transfer complete, closing data connection.
Status: Directory listing successful
I have set the settings in Filezilla for FTP proxy with custom settings as
USER %u@%h %s
PASS %p
ACCT %w
where %h is remotehost, %u is remoteUserName, %s is proxyusername, %p is remoteHostPassword, %w is proxyPassword.
And here is the code I'm using to ftp to the remoteHost:
FTPClient ftpClient = new FTPClient("remoteHostIP", 21);
ftpClient.setConnectMode(FTPConnectMode.PASV);
FTPClient.initSOCKS("1080", "proxyserverIP");
FTPClient.initSOCKSAuthentication("proxyUserName" , "proxyPassword");
ftpClient.login("remoteUserName", "remotePassword");
this code is giving me : java.net.SocketException: Reply from SOCKS server has bad version
at java.net.SocksSocketImpl.connectV4(SocksSocketImpl.java:300)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:371)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.connect(Socket.java:428)
at java.net.Socket.<init>(Socket.java:335)
at java.net.Socket.<init>(Socket.java:150)
at com.enterprisedt.net.ftp.FTPControlSocket.<init>(FTPControlSocket.java:139)
at com.enterprisedt.net.ftp.FTPClient.<init>(FTPClient.java:150)
Can you help me resolve this? Thanks In Advance.