mirror of
https://github.com/qdm12/gluetun.git
synced 2026-07-30 17:03:22 +02:00
fix(wireguard): skip tun device checks when using kernelspace
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
"github.com/qdm12/gluetun/internal/openvpn"
|
||||
"github.com/qdm12/gluetun/internal/provider"
|
||||
"github.com/qdm12/gluetun/internal/tun"
|
||||
)
|
||||
|
||||
// setupOpenVPN sets OpenVPN up using the configurators and settings given.
|
||||
@@ -17,6 +18,11 @@ func setupOpenVPN(ctx context.Context, fw Firewall,
|
||||
settings settings.VPN, ipv6Supported bool, starter CmdStarter,
|
||||
logger openvpn.Logger) (runner *openvpn.Runner, connection models.Connection, err error,
|
||||
) {
|
||||
err = tun.Setup()
|
||||
if err != nil {
|
||||
return nil, models.Connection{}, fmt.Errorf("setting up tun device: %w", err)
|
||||
}
|
||||
|
||||
connection, err = providerConf.GetConnection(settings.Provider.ServerSelection, ipv6Supported)
|
||||
if err != nil {
|
||||
return nil, models.Connection{}, fmt.Errorf("finding a valid server connection: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user