Documentation
¶
Overview ¶
Package sftp provides an SFTP server that serves a facetfs.FileSystem on already-authenticated streams. The caller owns the SSH transport and authentication: run an SSH server, accept the "sftp" subsystem request on a session channel, and pass the channel to Serve.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// FileSystem is the served filesystem. Required.
//
// Optional interfaces unlock protocol features: facetfs.SymlinkFS serves
// symlink, readlink, and lstat; facetfs.SetStatFS serves setstat;
// facetfs.StatVFSFS serves statvfs. Requests needing an interface the
// FileSystem lacks fail with SSH_FX_OP_UNSUPPORTED.
FileSystem facetfs.FileSystem
// MaxPacketBytes caps the transmitted SFTP packet size. Zero means the
// github.com/pkg/sftp default.
MaxPacketBytes uint32
// MaxDirectoryEntries caps a single directory listing. Zero means 100 000.
MaxDirectoryEntries int
}
Server serves SFTP sessions from a FileSystem. The zero value of every optional field is usable.
Click to show internal directories.
Click to hide internal directories.