mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-06 20:10:11 +02:00
hotfix(amneziawg): fix errors (#3240)
This commit is contained in:
@@ -19,7 +19,7 @@ func (p *Provider) GetConnection(selection settings.ServerSelection, _ bool) (
|
||||
switch selection.VPN {
|
||||
case vpn.OpenVPN:
|
||||
return getOpenVPNConnection(p.extractor, selection)
|
||||
case vpn.Wireguard:
|
||||
case vpn.Wireguard, vpn.AmneziaWg:
|
||||
return getWireguardConnection(selection), nil
|
||||
default:
|
||||
return connection, fmt.Errorf("%w: %s", ErrVPNTypeNotSupported, selection.VPN)
|
||||
|
||||
@@ -30,7 +30,7 @@ func pickConnection(connections []models.Connection,
|
||||
switch selection.VPN {
|
||||
case vpn.OpenVPN:
|
||||
targetIP = selection.OpenVPN.EndpointIP
|
||||
case vpn.Wireguard:
|
||||
case vpn.Wireguard, vpn.AmneziaWg:
|
||||
targetIP = selection.Wireguard.EndpointIP
|
||||
default:
|
||||
panic("unknown VPN type: " + selection.VPN)
|
||||
|
||||
Reference in New Issue
Block a user