chore(provider): use type assertion for port forwarders
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
"github.com/qdm12/gluetun/internal/provider/utils"
|
||||
)
|
||||
|
||||
// Provider contains methods to read and modify the openvpn configuration to connect as a client.
|
||||
@@ -13,14 +12,6 @@ type Provider interface {
|
||||
GetConnection(selection settings.ServerSelection, ipv6Supported bool) (connection models.Connection, err error)
|
||||
OpenVPNConfig(connection models.Connection, settings settings.OpenVPN, ipv6Supported bool) (lines []string)
|
||||
Name() string
|
||||
PortForwarder
|
||||
FetchServers(ctx context.Context, minServers int) (
|
||||
servers []models.Server, err error)
|
||||
}
|
||||
|
||||
type PortForwarder interface {
|
||||
Name() string
|
||||
PortForward(ctx context.Context, objects utils.PortForwardObjects) (
|
||||
port uint16, err error)
|
||||
KeepPortForward(ctx context.Context, objects utils.PortForwardObjects) (err error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user