improve FTP support

- allow to disable active mode
- allow to disable SITE commands
- add optional support for calculating hash value of files
- add optional support for the non standard COMB command
This commit is contained in:
Nicola Murino
2020-12-24 18:48:06 +01:00
parent 5b1d8666b3
commit 1dce1eff48
15 changed files with 375 additions and 31 deletions

View File

@@ -149,7 +149,8 @@ func TestMain(m *testing.M) {
Port: 9022,
},
}
sftpdConf.HostKeys = []string{filepath.Join(os.TempDir(), "id_ecdsa")}
hostKeyPath := filepath.Join(os.TempDir(), "id_ecdsa")
sftpdConf.HostKeys = []string{hostKeyPath}
webDavConf := config.GetWebDAVDConfig()
webDavConf.Bindings = []webdavd.Binding{
@@ -217,6 +218,8 @@ func TestMain(m *testing.M) {
os.Remove(postConnectPath)
os.Remove(certPath)
os.Remove(keyPath)
os.Remove(hostKeyPath)
os.Remove(hostKeyPath + ".pub")
os.Exit(exitCode)
}