chore(portforward): move vpn gateway obtention within port forwarding service
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package portforward
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
"net/netip"
|
||||
)
|
||||
|
||||
type Service interface {
|
||||
Start(ctx context.Context) (runError <-chan error, err error)
|
||||
@@ -8,6 +11,10 @@ type Service interface {
|
||||
GetPortForwarded() (port uint16)
|
||||
}
|
||||
|
||||
type Routing interface {
|
||||
VPNLocalGatewayIP(vpnInterface string) (gateway netip.Addr, err error)
|
||||
}
|
||||
|
||||
type PortAllower interface {
|
||||
SetAllowedPort(ctx context.Context, port uint16, intf string) (err error)
|
||||
RemoveAllowedPort(ctx context.Context, port uint16) (err error)
|
||||
|
||||
Reference in New Issue
Block a user