ftpd

package
v0.0.0-...-0b345dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FtpServerOption

type FtpServerOption struct {
	Filer            string
	IP               string
	IpBind           string
	Port             int
	FilerGrpcAddress string
	FtpRoot          string
	GrpcDialOption   grpc.DialOption
	PassivePortStart int
	PassivePortStop  int
}

type SftpServer

type SftpServer struct {
	// contains filtered or unexported fields
}

func NewFtpServer

func NewFtpServer(ftpListener net.Listener, option *FtpServerOption) (*SftpServer, error)

NewServer returns a new FTP server driver

func (*SftpServer) AuthUser

func (s *SftpServer) AuthUser(cc ftpserver.ClientContext, username, password string) (ftpserver.ClientDriver, error)

AuthUser authenticates the user and selects an handling driver

func (*SftpServer) ClientConnected

func (s *SftpServer) ClientConnected(cc ftpserver.ClientContext) (string, error)

ClientConnected is called to send the very first welcome message

func (*SftpServer) ClientDisconnected

func (s *SftpServer) ClientDisconnected(cc ftpserver.ClientContext)

ClientDisconnected is called when the user disconnects, even if he never authenticated

func (*SftpServer) GetSettings

func (s *SftpServer) GetSettings() (*ftpserver.Settings, error)

GetSettings returns some general settings around the server setup

func (*SftpServer) GetTLSConfig

func (s *SftpServer) GetTLSConfig() (*tls.Config, error)

GetTLSConfig returns a TLS Certificate to use The certificate could frequently change if we use something like "let's encrypt"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL