Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ListenAddr string // Address to listen on
Port int // Port to listen on
RootDir string // Root directory that FTP users will be restricted to
HomePattern string // Pattern for user home directories (e.g., "/home/%s")
TLSCertFile string // Path to TLS certificate file
TLSKeyFile string // Path to TLS private key file
PasvPortRange [2]int // Range of ports for passive mode transfers
PasvAddress string // Public IP for passive mode connections
PasvIPVerify bool // Whether to verify data connection IPs
}
Config holds the server configuration
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps the FTP server with our custom auth
func New ¶
func New(config *Config, authorizer *authorization.Authorizer, authenticator *authentication.Authenticator, version string) (*Server, error)
New creates a new FTP server
func (*Server) GetActiveConnections ¶ added in v1.0.11
GetActiveConnections returns the current number of active connections
func (*Server) GetStartTime ¶ added in v1.0.11
GetStartTime returns the server start time
func (*Server) GetTotalConnections ¶ added in v1.0.12
GetTotalConnections returns the total number of connections since server start
func (*Server) ListenAndServe ¶
ListenAndServe starts the server
Click to show internal directories.
Click to hide internal directories.