Fast FTP Server

I am looking for a fast FTP server without configuration. Something like Serve or Rack_dav , but for FTP, which can publish a folder by simply running the command. Is there a stone or something like that?

Decision

Based on the Wayne ftpd game, I created a quick and easy to use gem called Purvey .

+5
source share
2 answers

ftpd gem supports TLS and comes with a file system driver. Like em-ftpd, you supply a driver, but this driver does not need to do much. Here's a minimal FTP server that accepts any username / password and serves files from a temporary directory:

require 'ftpd'
require 'tmpdir'

class Driver

  def initialize(temp_dir)
    @temp_dir = temp_dir
  end

  def authenticate(user, password)
    true
  end

  def file_system(user)
    Ftpd::DiskFileSystem.new(@temp_dir)
  end

end

Dir.mktmpdir do |temp_dir|
  driver = Driver.new(temp_dir)
  server = Ftpd::FtpServer.new(driver)
  server.start
  puts "Server listening on port #{server.bound_port}"
  gets
end

. FTP- , , ..

TLS:

include Ftpd::InsecureCertificate
...
server.certfile_path = insecure_certfile_path
server.tls = :explicit
server.start

: ftpd

+7

, FTP-, EventMachine https://github.com/yob/em-ftpd

+2

All Articles