Merge pull request from safing/fix/v2-spn-init

[cmds] fix: Enable SPN client mode (PMv2)
This commit is contained in:
Alexandr Stelnykovych 2025-03-13 12:58:52 +02:00 committed by GitHub
commit 453a8ff0ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,6 +14,7 @@ import (
"github.com/safing/portmaster/service"
"github.com/safing/portmaster/service/configure"
"github.com/safing/portmaster/service/updates"
"github.com/safing/portmaster/spn/conf"
)
var (
@ -76,6 +77,10 @@ func initializeGlobals(cmd *cobra.Command, args []string) {
// Configure user agent.
updates.UserAgent = fmt.Sprintf("Portmaster Core (%s %s)", runtime.GOOS, runtime.GOARCH)
// Enable SPN client mode
conf.EnableClient(true)
conf.EnableIntegration(true)
// Configure service.
cmdbase.SvcFactory = func(svcCfg *service.ServiceConfig) (cmdbase.ServiceInstance, error) {
svc, err := service.New(svcCfg)