Revamp/cleanup firewall prompting

This commit is contained in:
Daniel
2019-08-09 16:47:33 +02:00
parent 4b2ff39246
commit fc8fab1a03
3 changed files with 214 additions and 219 deletions

View File

@@ -9,8 +9,10 @@ var (
permanentVerdicts config.BoolOption
filterDNSByScope status.SecurityLevelOption
filterDNSByProfile status.SecurityLevelOption
devMode config.BoolOption
apiListenAddress config.StringOption
promptTimeout config.IntOption
devMode config.BoolOption
apiListenAddress config.StringOption
)
func registerConfig() error {
@@ -57,6 +59,19 @@ func registerConfig() error {
}
filterDNSByProfile = status.ConfigIsActiveConcurrent("firewall/filterDNSByProfile")
err = config.Register(&config.Option{
Name: "Timeout for prompt notifications",
Key: "firewall/promptTimeout",
Description: "Amount of time how long Portmaster will wait for a response when prompting about a connection via a notification. In seconds.",
ExpertiseLevel: config.ExpertiseLevelUser,
OptType: config.OptTypeInt,
DefaultValue: 60,
})
if err != nil {
return err
}
promptTimeout = config.Concurrent.GetAsInt("firewall/promptTimeout", 30)
devMode = config.Concurrent.GetAsBool("firewall/permanentVerdicts", false)
apiListenAddress = config.GetAsString("api/listenAddress", "")