-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## zy-ftp | ||
基于netty实现的ftp服务器。 | ||
|
||
#### 特性 | ||
* 实现了ftp服务端常用的大部分命令,详情[请见代码](https://github.com/yangziwen/zy-ftp/tree/master/src/main/java/io/github/yangziwen/zyftp/command/impl) | ||
* 支持配置用户访问文件权限、文件传输限速等,详情[请见配置](https://github.com/yangziwen/zy-ftp/blob/master/conf/server.config) | ||
* 不加密的传输方式下支持主动、被动模式 | ||
* 加密的传输方式下(FTP over TLS),仅支持被动模式 | ||
* docker运行的情况下,仅支持被动模式 | ||
|
||
#### 打包 & 运行 | ||
* 基于jar包运行 | ||
1. 打包代码:`mvn package` or `gradle build` | ||
2. 启动服务:`java -jar zy-ftp.jar -c ${config_file_path}` | ||
* 基于docker运行 | ||
1. 打包代码:`mvn package` or `gradle build` | ||
2. 制作镜像:`docker build -t zy-ftp:0.0.1 .` | ||
3. 启动容器: | ||
``` | ||
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.1 | ||
``` | ||
* 查看启动参数:`java -jar zy-ftp.jar -h` |