chore(portforward): move vpn gateway obtention within port forwarding service

This commit is contained in:
Quentin McGaw
2023-09-23 11:46:14 +00:00
parent 71201411f4
commit 0406de399d
14 changed files with 135 additions and 92 deletions

View File

@@ -2,8 +2,6 @@ package provider
import (
"context"
"net/http"
"net/netip"
"github.com/qdm12/gluetun/internal/configuration/settings"
"github.com/qdm12/gluetun/internal/models"
@@ -22,9 +20,7 @@ type Provider interface {
type PortForwarder interface {
Name() string
PortForward(ctx context.Context, client *http.Client,
logger utils.Logger, gateway netip.Addr, serverName string) (
PortForward(ctx context.Context, objects utils.PortForwardObjects) (
port uint16, err error)
KeepPortForward(ctx context.Context, port uint16, gateway netip.Addr,
serverName string, _ utils.Logger) (err error)
KeepPortForward(ctx context.Context, objects utils.PortForwardObjects) (err error)
}