libdns / namecheap

MIT License
5 stars 2 forks source link

Namecheap doesn't support IPv6 #5

Open excid3 opened 1 year ago

excid3 commented 1 year ago

icanhazip.com returns an IPv6 address, but Namecheap's API only supports IPv4 addresses currently. You'll get an error if you let libdns detect the IP for the Namecheap API requests:

namecheap api returned error in response. Err: Error0: Parameter ClientIP is invalid

This is a limitation of Namecheap, but switching to a different API which has an IPv4 only endpoint would make this more reliable.

Both https://ip4.seeip.org and https://api.ipify.org have IPv4 only endpoints and are open source.

Thoughts on this? I'd be happy to make a PR.

nitz commented 11 months ago

Just ran into this when adding ipv6 to a setup. Ideally @namecheap would get around to actually supporting IPv6, but having this provider use an IPv4 endpoint seems far more likely to actually happen. 🙃

nrfox commented 8 months ago

What about ipv4.icanhazip.com? Those other endpoints are probably fine too I'm just not as familiar with them and how stable they are nor who is running them.

You can also always provide the client ip manually instead of relying on what gets returned from icanhazip.com like here.

@excid3 if ipv4.icanhazip.com works for you then I'd be happy to review a PR if you'll open one.

excid3 commented 8 months ago

Our workaround for the last year has been to specify the IP manually.

ipv4.icanhazip.com should be good. I didn't realize Cloudflare operates it now. 👍