我试图找出org.apache中[enterLocalActiveMode()
类的enterLocalPassiveMode()
/ enterRemoteActiveMode(InetAddress host, int port)
与enterRemotePassiveMode()
/ FTPClient
方法之间的区别。 commons.net.ftp](https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html
)。
我仅找到有关FTP主动模式和被动模式之间差异的一些信息。但是我不理解前面提到的本地和远程的概念。
答案 0 :(得分:1)
Apache Commons Net文档(您可以在问题中自行链接)对此进行了介绍。
在99%的情况下,您想使用FTPClient.enterLocal*Mode
。这是用于客户端到服务器/服务器的转移。
FTPClient.enterRemote*Mode
仅用于服务器与服务器之间的传输(又称FXP)。大多数FTP服务器都不允许这么做。