mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
add a global whitelist
if defined only the listed IPs/networks can access the configured services, all other client connections will be dropped before they even try to authenticate Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -169,6 +169,7 @@ func Init() {
|
||||
DataRetentionHook: "",
|
||||
MaxTotalConnections: 0,
|
||||
MaxPerHostConnections: 20,
|
||||
WhiteListFile: "",
|
||||
DefenderConfig: common.DefenderConfig{
|
||||
Enabled: false,
|
||||
Driver: common.DefenderDriverMemory,
|
||||
@@ -1470,6 +1471,7 @@ func setViperDefaults() {
|
||||
viper.SetDefault("common.data_retention_hook", globalConf.Common.DataRetentionHook)
|
||||
viper.SetDefault("common.max_total_connections", globalConf.Common.MaxTotalConnections)
|
||||
viper.SetDefault("common.max_per_host_connections", globalConf.Common.MaxPerHostConnections)
|
||||
viper.SetDefault("common.whitelist_file", globalConf.Common.WhiteListFile)
|
||||
viper.SetDefault("common.defender.enabled", globalConf.Common.DefenderConfig.Enabled)
|
||||
viper.SetDefault("common.defender.driver", globalConf.Common.DefenderConfig.Driver)
|
||||
viper.SetDefault("common.defender.ban_time", globalConf.Common.DefenderConfig.BanTime)
|
||||
|
||||
Reference in New Issue
Block a user