serve sftp: implement auth proxy

This commit is contained in:
Nick Craig-Wood
2019-07-31 22:20:46 +01:00
parent e6ab237fcd
commit d75fbe4852
4 changed files with 71 additions and 22 deletions

View File

@ -19,14 +19,14 @@ type vfsHandler struct {
}
// vfsHandler returns a Handlers object with the test handlers.
func newVFSHandler(vfs *vfs.VFS) (sftp.Handlers, error) {
func newVFSHandler(vfs *vfs.VFS) sftp.Handlers {
v := vfsHandler{VFS: vfs}
return sftp.Handlers{
FileGet: v,
FilePut: v,
FileCmd: v,
FileList: v,
}, nil
}
}
func (v vfsHandler) Fileread(r *sftp.Request) (io.ReaderAt, error) {