FTP improvements

- add a setting to require TLS
- add symlink support

require TLS 1.2 for all TLS connections
This commit is contained in:
Nicola Murino
2020-08-15 13:02:25 +02:00
parent fe857dcb1b
commit 196a56726e
12 changed files with 103 additions and 32 deletions

View File

@@ -91,6 +91,7 @@ func (s *Server) GetSettings() (*ftpserver.Settings, error) {
IdleTimeout: -1,
ConnectionTimeout: 20,
Banner: s.statusBanner,
TSLMode: s.config.TLSMode,
}, nil
}
@@ -143,6 +144,7 @@ func (s *Server) GetTLSConfig() (*tls.Config, error) {
if s.certMgr != nil {
return &tls.Config{
GetCertificate: s.certMgr.GetCertificateFunc(),
MinVersion: tls.VersionTLS12,
}, nil
}
return nil, errors.New("no TLS certificate configured")