Update netquery to support history module

This commit is contained in:
Patrick Pacher
2023-07-19 11:03:11 +02:00
committed by Daniel
parent cf2b8f26b9
commit dbffa8827b
13 changed files with 391 additions and 56 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/safing/portbase/config"
"github.com/safing/portmaster/profile/endpoints"
"github.com/safing/portmaster/status"
"github.com/safing/spn/access/account"
"github.com/safing/spn/navigator"
)
@@ -105,7 +106,7 @@ var (
// Setting "Permanent Verdicts" at order 96.
CfgOptionEnableHistoryKey = "filter/enableHistory"
CfgOptionEnableHistoryKey = "history/enabled"
cfgOptionEnableHistory config.BoolOption
cfgOptionEnableHistoryOrder = 66
@@ -249,12 +250,13 @@ func registerConfiguration() error { //nolint:maintidx
Key: CfgOptionEnableHistoryKey,
Description: "Whether or not to save connections to the history database",
OptType: config.OptTypeBool,
ReleaseLevel: config.ReleaseLevelExperimental,
ReleaseLevel: config.ReleaseLevelStable,
ExpertiseLevel: config.ExpertiseLevelExpert,
DefaultValue: false,
Annotations: config.Annotations{
config.DisplayOrderAnnotation: cfgOptionEnableHistoryOrder,
config.CategoryAnnotation: "Advanced",
config.DisplayOrderAnnotation: cfgOptionEnableHistoryOrder,
config.CategoryAnnotation: "History",
config.SettingRequiresFeaturePlan: account.FeatureHistory,
},
})
if err != nil {