Versions in this module Expand all Collapse all v3 v3.8.0 May 1, 2026 Changes in this version + var ErrInvalidPort = errors.New("port must not be 0 or bigger then 65535") + var ErrMissingConnectionHandlerFunction = errors.New("new connection handler is not defined") + var ErrMissingLoggerInterface = errors.New("logger interface is not defined") + var ErrMissingSSHConfig = errors.New("ssh Config is not defined") + type LogType string + const AcceptChannelError + const AcceptNetworkError + const ChannelNotSession + const SSHKeyExchangeError + const ServerStarted + type Logger interface + Error func(tag LogType, err error) + Info func(tag LogType, msg string) + type Options struct + BeforeHandle func(conn net.Conn, err error) (acceptConn bool) + ConnectionKeepAlive time.Duration + HandleSFTPSession func(channel ssh.Channel, sconn *ssh.ServerConn) + Logger Logger + Port int + PublicIP string + SSHConfig *ssh.ServerConfig + SSHHandshakeDeadline time.Duration + type Server struct + func NewServer(options *Options) (sftpServer *Server, err error) + func (s *Server) Listen() (err error) + func (s *Server) ShutDown() (err error)