https://github.com/yangziwen/zy-ftp
A netty based ftp server
https://github.com/yangziwen/zy-ftp
ftp netty server
Last synced: 12 months ago
JSON representation
A netty based ftp server
- Host: GitHub
- URL: https://github.com/yangziwen/zy-ftp
- Owner: yangziwen
- License: apache-2.0
- Created: 2018-07-25T15:18:49.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-06-06T13:36:08.000Z (about 1 year ago)
- Last Synced: 2025-06-07T06:01:48.741Z (about 1 year ago)
- Topics: ftp, netty, server
- Language: Java
- Homepage:
- Size: 242 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## zy-ftp
[](https://github.com/yangziwen/zy-ftp/actions/workflows/maven.yml)
[Chinese Doc](https://github.com/yangziwen/zy-ftp/blob/master/README_CN.md)
### Introduction
A netty based ftp server
### Feature
* Implements most frequently used ftp commands ([see details](https://github.com/yangziwen/zy-ftp/tree/master/src/main/java/io/github/yangziwen/zyftp/command/impl))
* Support configurations of user access priviledge and file transfer rate limit ([see options](https://github.com/yangziwen/zy-ftp/blob/master/conf/server.config))
* Both active mode and passive mode are supported under cleartext transmission
* Only passive mode is supported when transfer data over TLS
* Only passive mode is supported when running inside a docker container
### Usage
* Running an embedded server
1. Import the dependency
```xml
io.github.yangziwen
zy-ftp
0.0.2
```
2. Start the server
```java
FtpRunner runner = FtpRunner.builder()
.localIp("127.0.0.1")
.localPort(8121)
.configFile(new File("conf/server.config"))
.logFile(new File("log/zy-ftp.log"))
.build();
runner.run();
```
* Running the JAR file standalone
1. Build the JAR file :`mvn package -Pstandalone` or `sh gradlew build`
2. Start the server:`java -jar zy-ftp.jar -c ${config_file_path}`
* Running inside a docker container
1. Build the docker image:`mvn package dockerfile:build -Pstandalone` or `sh gradlew dockerBuild`
2. Start the container:
```
docker run -d \
-v ${your_config_file}:/zy-ftp/server.config \
-v ${your_resource_folder}:/zy-ftp/res \
-e LOCAL_PORT=8121 \
-p 8121:8121 \
-e PASSIVE_PORTS=40000-40060 \
-p 40000-40060:40000-40060 \
zy-ftp:0.0.2
```
* See more options:`java -jar zy-ftp.jar -h`