Add support for network service

This commit is contained in:
Daniel
2021-01-19 15:43:22 +01:00
parent 3f8c99517f
commit 12f3c0ea8d
14 changed files with 320 additions and 65 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/safing/portbase/config"
"github.com/safing/portbase/log"
"github.com/safing/portmaster/core"
)
// Config Keys
@@ -18,6 +19,8 @@ var (
nameserverAddressConfig config.StringOption
defaultNameserverAddress = "localhost:53"
networkServiceMode config.BoolOption
)
func init() {
@@ -65,5 +68,7 @@ func registerConfig() error {
}
nameserverAddressConfig = config.GetAsString(CfgDefaultNameserverAddressKey, getDefaultNameserverAddress())
networkServiceMode = config.Concurrent.GetAsBool(core.CfgNetworkServiceKey, false)
return nil
}