mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
FTP improvements
- add a setting to require TLS - add symlink support require TLS 1.2 for all TLS connections
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user