FtpClient SSL

  • Post author:
  • Post category:其他


使用FtpClient开发vsftp客户端程序。


服务端被动模式


FtpClient代码

ftp.enterLocalPassiveMode();


数据连接加密


vsftp.conf

force_local_data_ssl=YES


FtpClient代码

((FTPSClient) ftp).execPROT("P");


数据连接不加密


vsftp.conf

force_local_data_ssl=NO


FtpClient代码

((FTPSClient) ftp).execPROT("C");

转载于:https://my.oschina.net/u/3776771/blog/1838145