Maint: better openvpn loop interface composition
This commit is contained in:
@@ -7,13 +7,20 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/openvpn/state"
|
||||
"github.com/qdm12/gluetun/internal/provider"
|
||||
)
|
||||
|
||||
type PortForwadedGetter = state.PortForwardedGetter
|
||||
|
||||
func (l *looper) GetPortForwarded() (port uint16) {
|
||||
return l.state.GetPortForwarded()
|
||||
}
|
||||
|
||||
type PortForwader interface {
|
||||
PortForward(vpnGatewayIP net.IP)
|
||||
}
|
||||
|
||||
func (l *looper) PortForward(vpnGateway net.IP) { l.portForwardSignals <- vpnGateway }
|
||||
|
||||
// portForward is a blocking operation which may or may not be infinite.
|
||||
|
||||
Reference in New Issue
Block a user