Merge pull request #228 from safing/feature/improve-config-1
Improve config
This commit is contained in:
@@ -70,7 +70,7 @@ func registerConfig() error {
|
|||||||
Description: "How long the Portmaster will wait for a reply to a prompt notification. Please note that Desktop Notifications might not respect this or have their own limits.",
|
Description: "How long the Portmaster will wait for a reply to a prompt notification. Please note that Desktop Notifications might not respect this or have their own limits.",
|
||||||
OptType: config.OptTypeInt,
|
OptType: config.OptTypeInt,
|
||||||
ExpertiseLevel: config.ExpertiseLevelUser,
|
ExpertiseLevel: config.ExpertiseLevelUser,
|
||||||
DefaultValue: 20,
|
DefaultValue: 60,
|
||||||
Annotations: config.Annotations{
|
Annotations: config.Annotations{
|
||||||
config.DisplayOrderAnnotation: cfgOptionAskTimeoutOrder,
|
config.DisplayOrderAnnotation: cfgOptionAskTimeoutOrder,
|
||||||
config.UnitAnnotation: "seconds",
|
config.UnitAnnotation: "seconds",
|
||||||
@@ -80,7 +80,7 @@ func registerConfig() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
askTimeout = config.Concurrent.GetAsInt(CfgOptionAskTimeoutKey, 15)
|
askTimeout = config.Concurrent.GetAsInt(CfgOptionAskTimeoutKey, 60)
|
||||||
|
|
||||||
devMode = config.Concurrent.GetAsBool(core.CfgDevModeKey, false)
|
devMode = config.Concurrent.GetAsBool(core.CfgDevModeKey, false)
|
||||||
apiListenAddress = config.GetAsString(api.CfgDefaultListenAddressKey, "")
|
apiListenAddress = config.GetAsString(api.CfgDefaultListenAddressKey, "")
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ func (q *Queue) handleError(e error) int {
|
|||||||
// Check if the queue was already closed. Unfortunately, the exposed error
|
// Check if the queue was already closed. Unfortunately, the exposed error
|
||||||
// variable is in an internal stdlib package. Therefore, check for the error
|
// variable is in an internal stdlib package. Therefore, check for the error
|
||||||
// string instead. :(
|
// string instead. :(
|
||||||
// Offical error variable is defined here:
|
// Official error variable is defined here:
|
||||||
// https://github.com/golang/go/blob/0e85fd7561de869add933801c531bf25dee9561c/src/internal/poll/fd.go#L24
|
// https://github.com/golang/go/blob/0e85fd7561de869add933801c531bf25dee9561c/src/internal/poll/fd.go#L24
|
||||||
if !strings.HasSuffix(e.Error(), "use of closed file") {
|
if !strings.HasSuffix(e.Error(), "use of closed file") {
|
||||||
log.Errorf("nfqueue: encountered error while receiving packets: %s\n", e.Error())
|
log.Errorf("nfqueue: encountered error while receiving packets: %s\n", e.Error())
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ The lists are automatically updated every hour using incremental updates.
|
|||||||
Annotations: config.Annotations{
|
Annotations: config.Annotations{
|
||||||
config.DisplayHintAnnotation: "filter list",
|
config.DisplayHintAnnotation: "filter list",
|
||||||
config.DisplayOrderAnnotation: cfgOptionFilterListsOrder,
|
config.DisplayOrderAnnotation: cfgOptionFilterListsOrder,
|
||||||
config.CategoryAnnotation: "Rules",
|
config.CategoryAnnotation: "Filter Lists",
|
||||||
},
|
},
|
||||||
ValidationRegex: `^[a-zA-Z0-9\-]+$`,
|
ValidationRegex: `^[a-zA-Z0-9\-]+$`,
|
||||||
})
|
})
|
||||||
@@ -320,7 +320,7 @@ The lists are automatically updated every hour using incremental updates.
|
|||||||
Annotations: config.Annotations{
|
Annotations: config.Annotations{
|
||||||
config.DisplayHintAnnotation: status.DisplayHintSecurityLevel,
|
config.DisplayHintAnnotation: status.DisplayHintSecurityLevel,
|
||||||
config.DisplayOrderAnnotation: cfgOptionFilterSubDomainsOrder,
|
config.DisplayOrderAnnotation: cfgOptionFilterSubDomainsOrder,
|
||||||
config.CategoryAnnotation: "Rules",
|
config.CategoryAnnotation: "Filter Lists",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user