feat(protonvpn): port forwarding connection refused error points to add +pmp to OpenVPN user

This commit is contained in:
Quentin McGaw
2023-09-24 15:15:05 +00:00
parent dc8fc5f81f
commit 4d627bb7b1

View File

@@ -18,6 +18,9 @@ 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)
}
return 0, fmt.Errorf("getting external IPv4 address: %w", err)
}