caddy-dns / namecheap

37 stars 4 forks source link

clientIP is not set #3

Closed rohvani closed 2 years ago

rohvani commented 2 years ago

After building the module using xcaddy and creating my Caddyfile as so:

{
  http_port  80
  https_port 443
}

*.mydomain.tld {
    file_server
    tls {
        dns namecheap {
            api_key my_real_namecheap_api_key_here
            user my_real_namecheap_username_here
            client_ip my_real_ipv4_address_here
            endpoint https://api.namecheap.com/xml.response
        }
    }
}

My caddy server would fail to get the certificates for my domain:

{"level":"error","ts":1636089539.6314476,"logger":"tls.obtain","msg":"will retry","error":"[*.mydomain.tld] Obtain: [*.mydomain.tld] solving challenges: presenting for challenge: adding temporary record for zone queria.dev.: clientIP is not set. Either provide one through the 'WithClientIP' option or have it set automatically with the 'AutoDiscoverPublicIP' option (order=https://acme.zerossl.com/v2/DV90/order/ordieridhere) (ca=https://acme.zerossl.com/v2/DV90)","attempt":1,"retrying_in":60,"elapsed":2.89779528,"max_duration":2592000}

Are there any steps that I am missing? Thanks in advance.

nrfox commented 2 years ago

Thanks for reporting the issue. I suspect it's from the libdns/namecheap lib incorrectly setting a json tag which should've been fixed there recently. I'll take a look shortly.

nrfox commented 2 years ago

@rohvani merged the fix so when you get a chance give the latest version a try

rohvani commented 2 years ago

@nrfox Wonderful! Looks like it's working now, thank you so much for the quick resolution! Cheers.

nrfox commented 2 years ago

@nrfox Wonderful! Looks like it's working now, thank you so much for the quick resolution! Cheers.

Great! Glad it fixed the issue for you.