feat(protonvpn): add suggestions on some port forwarding errors

This commit is contained in:
Quentin McGaw
2026-02-23 21:19:08 +00:00
parent 625a63e7c2
commit 01487b5caf
+7 -2
View File
@@ -25,8 +25,13 @@ func (p *Provider) PortForward(ctx context.Context, objects utils.PortForwardObj
_, externalIPv4Address, err := client.ExternalAddress(ctx, _, externalIPv4Address, err := client.ExternalAddress(ctx,
objects.Gateway) objects.Gateway)
if err != nil { if err != nil {
if strings.HasSuffix(err.Error(), "connection refused") { switch {
err = fmt.Errorf("%w - make sure you have +pmp at the end of your OpenVPN username", err) case strings.HasSuffix(err.Error(), "connection refused"):
err = fmt.Errorf("%w - make sure you have +pmp at the end of your OpenVPN username "+
"or that your Wireguard key is set to work with PMP", err)
case strings.Contains(err.Error(), "i/o timeout"):
err = fmt.Errorf("%w - make sure FIREWALL_OUTBOUND_SUBNETS does not conflict with "+
"the VPN gateway ip address %s", err, objects.Gateway)
} }
return nil, fmt.Errorf("getting external IPv4 address: %w", err) return nil, fmt.Errorf("getting external IPv4 address: %w", err)
} }