The active branches are:
- 1.1.x
- 1.2.x
We do not use the branch master
.
Apache Mina FTP Server
License: Apache License 2.0
Glad to see the progress on this project, and I do like to use it as my FTP server, as it's fast and stable, and easy to use.
May I ask for the release package on Github, as the current distribution folder doesn't contain the jar files, and user needs to build the project by themselves.
For example, download 1.1.1 at https://mina.apache.org/ftpserver-project/downloads.html will include all the jar files and can be used for an FTP server setup in a minute.
Thanks!
Edit: fixed test, there's no bug.
public class PassivePortsTest {
@Test
public void testSimple() {
assertPassivePorts("8182-8190", IntStream.range(8182, 8190+1));
}
@Test
public void testComplex() {
assertPassivePorts("8182-8190;8192-8200",
IntStream.concat(IntStream.range(8182, 8191), IntStream.range(8192, 8201)));
}
private void assertPassivePorts(String rangeString, IntStream range) {
var passivePorts = new PassivePorts(rangeString, false);
var expected = new TreeSet<>(range.boxed().collect(Collectors.toSet()));
try {
var freeSet = new TreeSet<>((List<Integer>) FieldUtils.readField(passivePorts, "freeList", true));
var values = new TreeSet<>();
for (int i = 0; i < expected.size(); i++) {
values.add(passivePorts.reserveNextPort());
}
// API-level check
assertEquals(expected, values);
// Reflection check
assertEquals(expected, freeSet);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
}
ftp url UTF-8 not supported (Chinese)
Upload file name UTF-8 not supported (Chinese)
Create folder UTF-8 not supported (Chinese)
When configuring the "local-port" element within the /res/conf/ftpd-*.xml file to a static value, then the ability to run parallel active FTP transfers is lost, and results in an immediate "425" error for the other concurrent transfer attempts.
RE: https://mina.apache.org/ftpserver-project/configuration_listeners.html#active-element,
When "local-port" is not configured, then the active mode data-port connections default to sourcing from "any available port" on the ftp server. For example, by default, a Windows 2016 server may choose a dynamic source data-port of 61753 for one transfer when connecting back to the client at the location already specified by the client's PORT command, and a different data-port like 61234 for another parallel transfer.
Screenshot of test configuration:
When using another FTP server such as vsftpd, we can run parallel active transfers, all sourcing from a FTP server data-port of 20.
In that case, we would configure the option "connect_from_port_20=YES" in vsftpd's config file (RE: http://vsftpd.beasts.org/vsftpd_conf.html), so the FTP server isn't choosing dynamic source ports when connecting back to the client PORT location.
I've tested this behavior with apache ftpserver v1.1.1, 1.1.4, and 1.2, and the behavior seems consistent among all of them.
In this screenshot, my "ftp-dev-01" server has an IP of 172.16.248.202.
When running a "10x parallel download" jmeter test, and running wireshark to inspect the responses, I see that the server only sends one SYN attempt from port 20 back to my client. I expect to see 10x SYN attempts. The one transfer succeeds, however the other 9 immediately return a "425" error:
Attaching my jmeter 5.6.3 test, which uses 10 parallel threads to download a test.txt file from the server.
ftp server concurrent download JMETER test.jmx.txt
If I switch the JMETER thread/iteration configuration to use 1 thread and 10 iterations (i.e. performing it serially), then all the downloads complete successfully, and all source from server port 20.
It would be exceptionally useful to track the number of remaining passive ports available in the pool as they are assigned/released. Before I work on PR, I wanted to check if there was any was of observing this? I can't see a mechanism for this at present.
Many thanks
Hi, I see that Apache MINA 2.2.x rewrites the SSL/TLS layer to address some flaws that were hard to fix in 2.1.x.
Apache FTPServer depends on Apache MINA, but the latest released version of Apache FTPServer (1.2.0) still depends on Apache MINA 2.1.6.
So, I'd like to ask if there are plans to release a new version of Apache FTPServer to adapt to Apache MINA 2.2.x.
In the IODataConnectionFactory class, the method createDataSocket is using this code:
if (ssl.getEnabledProtocol() != null) { ssoc.setEnabledProtocols(new String[] { ssl.getEnabledProtocol() }); }
So clearly, when we have multiple protocols (TLSv1.2, TLSv1.3) this will not work.
We also have to change the sslProtocol to this:
sslConfigurationFactory.setSslProtocol("TLSv1.2");
Because it seems that the default is "TLS", which is not a valid option in the ProtocolVersion class from jdk 11
enum ProtocolVersion { TLS13(772, "TLSv1.3", false), TLS12(771, "TLSv1.2", false), TLS11(770, "TLSv1.1", false), TLS10(769, "TLSv1", false), SSL30(768, "SSLv3", false), SSL20Hello(2, "SSLv2Hello", false), DTLS12(65277, "DTLSv1.2", true), DTLS10(65279, "DTLSv1.0", true), NONE(-1, "NONE", false);
ftp url UTF-8 not supported (Chinese)
Upload file name UTF-8 not supported (Chinese)
Create folder UTF-8 not supported (Chinese)
log
[ 74s] [ERROR] /home/abuild/rpmbuild/BUILD/apache-ftpserver-1.1.4/core/src/main/java/org/apache/ftpserver/impl/FtpIoSession.java:[61,8] org.apache.ftpserver.impl.FtpIoSession is not abstract and does not override abstract method isServer() in org.apache.mina.core.session.IoSession
apacha-mina :2.0.24
mina-ftpserver:1.1.4
show to fix this error?
Howdy,
There has been a ticket/issue opened (and now closed/reject https://trac.filezilla-project.org/ticket/12099#comment:27) on the filezilla trac system regarding compatibility with TLSv1.3
The filezilla project maintainer suggested the that issue with TLSv1.3 compatibility comes from mina-ftpserver.
Is there any way this can be fixed and a new version released ?
Thank you!
The schema locations in ftpd-typical.xml are not valid anymore, shall we include them in the project:
http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd
curl -vL http://mina.apache.org/ftpserver/ftpserver-1.0.xsd
<title>404 Not Found</title>The requested URL was not found on this server.
* Curl_http_done: called premature == 0 * Connection #1 to host (nil) left intactCould not read from transfer socket: ECONNABORTED
226 Closing data connection.
maybe, just maybe, you should apply some checkstyle plugin?
in v1.2.0:
DataConnectionConfigurationFactory:
private void checkValidAddresses(){
try{
InetAddress.getByName(passiveAddress);
InetAddress.getByName(passiveExternalAddress);
}catch(UnknownHostException ex){
throw new FtpServerConfigurationException("Unknown host", ex);
}
}
if passiveAddress or passiveExternalAddress are null (unconfigured), the createDataConnectionConfiguration()
fails to create a DataConnectionConfiguration:
public DataConnectionConfiguration createDataConnectionConfiguration() {
checkValidAddresses();
as I really don't know why you have 2 same repos in a same organization
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.