Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

io.github.yangziwen:zy-ftp

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io.github.yangziwen:zy-ftp

A ftp server based on netty

  • 0.0.2
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

zy-ftp

基于netty实现的ftp服务器。

特性
  • 实现了ftp服务端常用的大部分命令,详情请见代码
  • 支持配置用户访问文件权限、文件传输限速等,详情请见配置
  • 不加密的传输方式下支持主动、被动模式
  • 加密的传输方式下(FTP over TLS),仅支持被动模式
  • 运行于docker环境时,仅支持被动模式
打包 & 运行
  • 内嵌在程序中运行
    1. 引入依赖
    <dependency>
        <groupId>io.github.yangziwen</groupId>
        <artifactId>zy-ftp</artifactId>
        <version>0.0.2</version>
    </dependency>
    
    1. 启动服务
    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();
    
  • 基于jar包运行
    1. 打包代码:mvn package -Pstandalone or sh gradlew build
    2. 启动服务:java -jar zy-ftp.jar -c ${config_file_path}
  • 基于docker运行
    1. 制作镜像:mvn package dockerfile:build -Pstandalone or sh gradlew dockerBuild
    2. 启动容器:
    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
    
  • 查看启动参数:java -jar zy-ftp.jar -h
  • 可通过设置系统变量进行连接泄露检测,如-Dio.netty.leakDetectionLevel=ADVANCED

FAQs

Package last updated on 17 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc