Fixed SPN HUB using wrong instance

This commit is contained in:
Natanael Rodriguez Ramos
2025-04-10 17:12:06 +01:00
parent d828aacd0f
commit 38d49f43c9
4 changed files with 10 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ func TestGet(t *testing.T) { //nolint:paralleltest
// reset
options = make(map[string]*Option)
err := log.Start()
err := log.Start("info", true, "")
if err != nil {
t.Fatal(err)
}

View File

@@ -51,6 +51,12 @@ if [[ $1 == "dev" ]]; then
DEV="-race"
fi
# Set GOOS and GOARCH for Darwin to use Linux architecture
if [[ "$(uname)" == "Darwin" ]]; then
export GOOS=linux
export GOARCH=amd64
fi
echo "Please notice, that this build script includes metadata into the build."
echo "This information is useful for debugging and license compliance."
echo "Run the compiled binary with the -version flag to see the information included."

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"
"github.com/safing/portmaster/spn/conf"
)
@@ -75,7 +76,7 @@ func initializeGlobals(cmd *cobra.Command, args []string) {
// Configure service.
cmdbase.SvcFactory = func(svcCfg *service.ServiceConfig) (cmdbase.ServiceInstance, error) {
svc, err := service.New(svcCfg)
svc, err := spn.New(svcCfg)
return svc, err
}

View File

@@ -45,7 +45,7 @@ func main() {
}
// logging
err := log.Start()
err := log.Start("info", true, "")
if err != nil {
fmt.Printf("failed to start logging: %s\n", err)
os.Exit(1)