update port_forwarding controller

This commit is contained in:
Pascal Fischer
2025-08-11 17:59:24 +02:00
parent 5f225a973d
commit f953fb493f
3 changed files with 15 additions and 5 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ toolchain go1.23.1
require (
github.com/gorilla/mux v1.8.0
github.com/netbirdio/netbird v0.45.2-0.20250529122133-7a9c80ae84a5
github.com/netbirdio/netbird v0.54.1-0.20250811154403-1e72c5b45949
github.com/sirupsen/logrus v1.9.3
go.opentelemetry.io/otel/metric v1.26.0
)
@@ -123,7 +123,7 @@ require (
google.golang.org/api v0.177.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/protobuf v1.36.5 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
+5
View File
@@ -205,6 +205,10 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/netbirdio/netbird v0.45.2-0.20250529122133-7a9c80ae84a5 h1:aaibHJKCOdafz4S2RsTQescq1Evl9ej4hz0rVEwtqI8=
github.com/netbirdio/netbird v0.45.2-0.20250529122133-7a9c80ae84a5/go.mod h1:YDHTPrpUjb7OyVDiuP0kr9bByhf7kHC25zZiX+KgAtA=
github.com/netbirdio/netbird v0.54.0 h1:sUI8senQnNN9EU/sOeLYhX4qgKq5Hm6zx/ZU3Gy2Okk=
github.com/netbirdio/netbird v0.54.0/go.mod h1:lIdEM9BZtMioqCXKAfYYd/kwQ5EZe09Yj7xP2+cJGws=
github.com/netbirdio/netbird v0.54.1-0.20250811154403-1e72c5b45949 h1:ydI5UfIcqNQaMCVASO5NwuZRDDrmdopoOuDCqDMecNY=
github.com/netbirdio/netbird v0.54.1-0.20250811154403-1e72c5b45949/go.mod h1:lIdEM9BZtMioqCXKAfYYd/kwQ5EZe09Yj7xP2+cJGws=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/okta/okta-sdk-golang/v2 v2.18.0 h1:cfDasMb7CShbZvOrF6n+DnLevWwiHgedWMGJ8M8xKDc=
@@ -455,6 +459,7 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+8 -3
View File
@@ -4,6 +4,7 @@ import (
"context"
"github.com/netbirdio/netbird/management/server/integrations/port_forwarding"
"github.com/netbirdio/netbird/management/server/peer"
"github.com/netbirdio/netbird/management/server/store"
"github.com/netbirdio/netbird/management/server/types"
)
@@ -18,11 +19,15 @@ func NewController(store store.Store) port_forwarding.Controller {
}
}
func (c *controllerImpl) SendUpdate(ctx context.Context, accountID string, affectedProxyID string, affectedPeerIDs []string) {
// noop
func (c *controllerImpl) SendUpdate(ctx context.Context, accountID string, affectedProxyID string, affectedPeerIDs []string, accountPeers map[string]*peer.Peer) {
// no-op
}
func (c *controllerImpl) GetProxyNetworkMaps(ctx context.Context, accountID string) (map[string]*types.NetworkMap, error) {
func (c *controllerImpl) GetProxyNetworkMaps(ctx context.Context, accountID, peerID string, accountPeers map[string]*peer.Peer) (map[string]*types.NetworkMap, error) {
return make(map[string]*types.NetworkMap), nil
}
func (c *controllerImpl) GetProxyNetworkMapsAll(ctx context.Context, accountID string, accountPeers map[string]*peer.Peer) (map[string]*types.NetworkMap, error) {
return make(map[string]*types.NetworkMap), nil
}