diff --git a/profile/config-update.go b/profile/config-update.go index 95ddebec..cac888b9 100644 --- a/profile/config-update.go +++ b/profile/config-update.go @@ -71,16 +71,16 @@ func updateGlobalConfigProfile(ctx context.Context, data interface{}) error { // fill profile config options for key, value := range cfgStringOptions { - profile.Config[key] = value + profile.Config[key] = value() } for key, value := range cfgStringArrayOptions { - profile.Config[key] = value + profile.Config[key] = value() } for key, value := range cfgIntOptions { - profile.Config[key] = value + profile.Config[key] = value() } for key, value := range cfgBoolOptions { - profile.Config[key] = value + profile.Config[key] = value() } // save profile diff --git a/profile/config.go b/profile/config.go index 49f64160..b83f726c 100644 --- a/profile/config.go +++ b/profile/config.go @@ -211,7 +211,7 @@ Examples: if err != nil { return err } - cfgOptionBlockInbound = config.Concurrent.GetAsInt(CfgOptionBlockInboundKey, 6) + cfgOptionBlockInbound = config.Concurrent.GetAsInt(CfgOptionBlockInboundKey, 4) cfgIntOptions[CfgOptionBlockInboundKey] = cfgOptionBlockInbound // Enforce SPN @@ -247,7 +247,7 @@ Examples: return err } cfgOptionRemoveOutOfScopeDNS = config.Concurrent.GetAsInt(CfgOptionRemoveOutOfScopeDNSKey, 7) - cfgIntOptions[CfgOptionRemoveOutOfScopeDNSKey] = cfgOptionEnforceSPN + cfgIntOptions[CfgOptionRemoveOutOfScopeDNSKey] = cfgOptionRemoveOutOfScopeDNS // Filter DNS Records that would be blocked err = config.Register(&config.Option{ @@ -265,7 +265,7 @@ Examples: return err } cfgOptionRemoveBlockedDNS = config.Concurrent.GetAsInt(CfgOptionRemoveBlockedDNSKey, 7) - cfgIntOptions[CfgOptionRemoveBlockedDNSKey] = cfgOptionEnforceSPN + cfgIntOptions[CfgOptionRemoveBlockedDNSKey] = cfgOptionRemoveBlockedDNS return nil } diff --git a/profile/profile.go b/profile/profile.go index bd416804..8aa8c3b8 100644 --- a/profile/profile.go +++ b/profile/profile.go @@ -110,7 +110,7 @@ func (profile *Profile) parseConfig() error { var err error var lastErr error - action, ok := profile.configPerspective.GetAsString(CfgOptionBlockInboundKey) + action, ok := profile.configPerspective.GetAsString(CfgOptionDefaultActionKey) if ok { switch action { case "permit":