From 01487b5caf2b94946a5e3721d3c2c69e76ea1d8c Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Mon, 23 Feb 2026 21:19:08 +0000 Subject: [PATCH] feat(protonvpn): add suggestions on some port forwarding errors --- internal/provider/protonvpn/portforward.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/provider/protonvpn/portforward.go b/internal/provider/protonvpn/portforward.go index 41f9b29e..68746c82 100644 --- a/internal/provider/protonvpn/portforward.go +++ b/internal/provider/protonvpn/portforward.go @@ -25,8 +25,13 @@ func (p *Provider) PortForward(ctx context.Context, objects utils.PortForwardObj _, externalIPv4Address, err := client.ExternalAddress(ctx, objects.Gateway) if err != nil { - if strings.HasSuffix(err.Error(), "connection refused") { - err = fmt.Errorf("%w - make sure you have +pmp at the end of your OpenVPN username", err) + switch { + 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) }