mirror of
https://github.com/go-acme/lego
synced 2026-03-14 14:35:48 +01:00
Merge 3710dd224f into fac5c39f5f
This commit is contained in:
commit
43c6811cb9
16 changed files with 1137 additions and 48 deletions
94
README.md
94
README.md
|
|
@ -62,239 +62,239 @@ If your DNS provider is not supported, please open an [issue](https://github.com
|
|||
|
||||
<table><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/com35/">35.com/三五互联</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/abion/">Abion</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/active24/">Active24</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/edgedns/">Akamai EdgeDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/alidns/">Alibaba Cloud DNS</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/alidns/">Alibaba Cloud DNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/aliesa/">AlibabaCloud ESA</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/allinkl/">all-inkl</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/alwaysdata/">Alwaysdata</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/lightsail/">Amazon Lightsail</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/lightsail/">Amazon Lightsail</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/route53/">Amazon Route 53</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/anexia/">Anexia CloudDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/arvancloud/">ArvanCloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/auroradns/">Aurora DNS</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/auroradns/">Aurora DNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/autodns/">Autodns</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/axelname/">Axelname</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/azion/">Azion</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/azure/">Azure (deprecated)</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/azure/">Azure (deprecated)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/azuredns/">Azure DNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/baiducloud/">Baidu Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/beget/">Beget.com</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/binarylane/">Binary Lane</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/binarylane/">Binary Lane</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/bindman/">Bindman</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/bluecat/">Bluecat</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/bluecatv2/">Bluecat v2</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/bookmyname/">BookMyName</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/bookmyname/">BookMyName</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/brandit/">Brandit (deprecated)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/bunny/">Bunny</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/checkdomain/">Checkdomain</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/civo/">Civo</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/civo/">Civo</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/cloudru/">Cloud.ru</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/clouddns/">CloudDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/cloudflare/">Cloudflare</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/cloudns/">ClouDNS</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/cloudns/">ClouDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/cloudxns/">CloudXNS (Deprecated)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/conoha/">ConoHa v2</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/conohav3/">ConoHa v3</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/constellix/">Constellix</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/constellix/">Constellix</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/corenetworks/">Core-Networks</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/cpanel/">CPanel/WHM</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ddnss/">DDnss (DynDNS Service)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/derak/">Derak Cloud</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/derak/">Derak Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/desec/">deSEC.io</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/designate/">Designate DNSaaS for Openstack</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/digitalocean/">Digital Ocean</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/directadmin/">DirectAdmin</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/directadmin/">DirectAdmin</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dnsmadeeasy/">DNS Made Easy</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dnsexit/">DNSExit</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dnshomede/">dnsHome.de</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dnsimple/">DNSimple</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dnsimple/">DNSimple</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dnspod/">DNSPod (deprecated)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dode/">Domain Offensive (do.de)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/domeneshop/">Domeneshop</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dreamhost/">DreamHost</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dreamhost/">DreamHost</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/duckdns/">Duck DNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dyn/">Dyn</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dyndnsfree/">DynDnsFree.de</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dynu/">Dynu</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/dynu/">Dynu</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/easydns/">EasyDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/edgecenter/">EdgeCenter</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/efficientip/">Efficient IP</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/epik/">Epik</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/epik/">Epik</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/exoscale/">Exoscale</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/exec/">External program</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/f5xc/">F5 XC</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/freemyip/">freemyip.com</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/freemyip/">freemyip.com</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/gcore/">G-Core</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/gandi/">Gandi</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/gandiv5/">Gandi Live DNS (v5)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/gigahostno/">Gigahost.no</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/gigahostno/">Gigahost.no</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/glesys/">Glesys</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/godaddy/">Go Daddy</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/gcloud/">Google Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/googledomains/">Google Domains</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/googledomains/">Google Domains</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/gravity/">Gravity</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/hetzner/">Hetzner</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/hostingde/">Hosting.de</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/hostingnl/">Hosting.nl</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/hostingnl/">Hosting.nl</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/hostinger/">Hostinger</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/hosttech/">Hosttech</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/httpreq/">HTTP request</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/httpnet/">http.net</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/httpnet/">http.net</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/huaweicloud/">Huawei Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/hurricane/">Hurricane Electric DNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/hyperone/">HyperOne</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ibmcloud/">IBM Cloud (SoftLayer)</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ibmcloud/">IBM Cloud (SoftLayer)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/iijdpf/">IIJ DNS Platform Service</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/infoblox/">Infoblox</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/infomaniak/">Infomaniak</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/iij/">Internet Initiative Japan</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/iij/">Internet Initiative Japan</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/internetbs/">Internet.bs</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/inwx/">INWX</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ionos/">Ionos</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ionoscloud/">Ionos Cloud</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ionoscloud/">Ionos Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ipv64/">IPv64</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ispconfig/">ISPConfig 3</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ispconfigddns/">ISPConfig 3 - Dynamic DNS (DDNS) Module</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/iwantmyname/">iwantmyname (Deprecated)</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/iwantmyname/">iwantmyname (Deprecated)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/jdcloud/">JD Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/joker/">Joker</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/acme-dns/">Joohoi's ACME-DNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/keyhelp/">KeyHelp</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/keyhelp/">KeyHelp</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/liara/">Liara</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/limacity/">Lima-City</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/linode/">Linode (v4)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/liquidweb/">Liquid Web</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/liquidweb/">Liquid Web</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/loopia/">Loopia</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/luadns/">LuaDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/mailinabox/">Mail-in-a-Box</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/manageengine/">ManageEngine CloudDNS</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/manageengine/">ManageEngine CloudDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/manual/">Manual</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/metaname/">Metaname</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/metaregistrar/">Metaregistrar</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/mijnhost/">mijn.host</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/mijnhost/">mijn.host</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/mittwald/">Mittwald</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/myaddr/">myaddr.{tools,dev,io}</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/mydnsjp/">MyDNS.jp</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/mythicbeasts/">MythicBeasts</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/mythicbeasts/">MythicBeasts</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/namedotcom/">Name.com</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/namecheap/">Namecheap</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/namesilo/">Namesilo</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/nearlyfreespeech/">NearlyFreeSpeech.NET</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/nearlyfreespeech/">NearlyFreeSpeech.NET</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/neodigit/">Neodigit</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/netcup/">Netcup</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/netlify/">Netlify</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/nicmanager/">Nicmanager</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/nicmanager/">Nicmanager</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/nifcloud/">NIFCloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/njalla/">Njalla</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/nodion/">Nodion</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ns1/">NS1</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ns1/">NS1</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/octenium/">Octenium</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/otc/">Open Telekom Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/oraclecloud/">Oracle Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ovh/">OVH</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ovh/">OVH</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/plesk/">plesk.com</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/porkbun/">Porkbun</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/pdns/">PowerDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/rackspace/">Rackspace</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/rackspace/">Rackspace</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/rainyun/">Rain Yun/雨云</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/rcodezero/">RcodeZero</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/regru/">reg.ru</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/regfish/">Regfish</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/regfish/">Regfish</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/rfc2136/">RFC2136</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/rimuhosting/">RimuHosting</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/nicru/">RU CENTER</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/sakuracloud/">Sakura Cloud</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/sakuracloud/">Sakura Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/scaleway/">Scaleway</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/selectel/">Selectel</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/selectelv2/">Selectel v2</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/selfhostde/">SelfHost.(de|eu)</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/selfhostde/">SelfHost.(de|eu)</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/servercow/">Servercow</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/shellrent/">Shellrent</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/simply/">Simply.com</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/sonic/">Sonic</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/sonic/">Sonic</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/spaceship/">Spaceship</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/stackpath/">Stackpath</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/syse/">Syse</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/technitium/">Technitium</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/technitium/">Technitium</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/tencentcloud/">Tencent Cloud DNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/edgeone/">Tencent EdgeOne</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/timewebcloud/">Timeweb Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/todaynic/">TodayNIC/时代互联</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/todaynic/">TodayNIC/时代互联</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/transip/">TransIP</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/safedns/">UKFast SafeDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/ultradns/">Ultradns</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/uniteddomains/">United-Domains</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/uniteddomains/">United-Domains</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/variomedia/">Variomedia</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/vegadns/">VegaDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/vercel/">Vercel</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/versio/">Versio.[nl|eu|uk]</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/versio/">Versio.[nl|eu|uk]</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/vinyldns/">VinylDNS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/virtualname/">Virtualname</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/vkcloud/">VK Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/volcengine/">Volcano Engine/火山引擎</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/volcengine/">Volcano Engine/火山引擎</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/vscale/">Vscale</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/vultr/">Vultr</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/webnamesca/">webnames.ca</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/webnames/">webnames.ru</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/webnames/">webnames.ru</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/websupport/">Websupport</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/wedos/">WEDOS</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/westcn/">West.cn/西部数码</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/yandex360/">Yandex 360</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/yandex360/">Yandex 360</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/yandexcloud/">Yandex Cloud</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/yandex/">Yandex PDD</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/zoneee/">Zone.ee</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/zoneedit/">ZoneEdit</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/zoneedit/">ZoneEdit</a></td>
|
||||
<td><a href="https://go-acme.github.io/lego/dns/zonomi/">Zonomi</a></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr></table>
|
||||
|
||||
<!-- END DNS PROVIDERS LIST -->
|
||||
|
|
|
|||
21
cmd/zz_gen_cmd_dnshelp.go
generated
21
cmd/zz_gen_cmd_dnshelp.go
generated
|
|
@ -12,6 +12,7 @@ import (
|
|||
|
||||
func allDNSCodes() string {
|
||||
providers := []string{
|
||||
"abion",
|
||||
"acme-dns",
|
||||
"active24",
|
||||
"alidns",
|
||||
|
|
@ -207,6 +208,26 @@ func displayDNSHelp(w io.Writer, name string) error {
|
|||
ew := &errWriter{w: w}
|
||||
|
||||
switch name {
|
||||
case "abion":
|
||||
// generated from: providers/dns/abion/abion.toml
|
||||
ew.writeln(`Configuration for Abion.`)
|
||||
ew.writeln(`Code: 'abion'`)
|
||||
ew.writeln(`Since: 'v4.32.0'`)
|
||||
ew.writeln()
|
||||
|
||||
ew.writeln(`Credentials:`)
|
||||
ew.writeln(` - "ABION_API_KEY": API key`)
|
||||
ew.writeln()
|
||||
|
||||
ew.writeln(`Additional Configuration:`)
|
||||
ew.writeln(` - "ABION_HTTP_TIMEOUT": API request timeout in seconds (Default: 10)`)
|
||||
ew.writeln(` - "ABION_POLLING_INTERVAL": Time between DNS propagation check in seconds (Default: 2)`)
|
||||
ew.writeln(` - "ABION_PROPAGATION_TIMEOUT": Maximum waiting time for DNS propagation in seconds (Default: 60)`)
|
||||
ew.writeln(` - "ABION_TTL": The TTL of the TXT record used for the DNS challenge in seconds (Default: 120)`)
|
||||
|
||||
ew.writeln()
|
||||
ew.writeln(`More information: https://go-acme.github.io/lego/dns/abion`)
|
||||
|
||||
case "acme-dns":
|
||||
// generated from: providers/dns/acmedns/acmedns.toml
|
||||
ew.writeln(`Configuration for Joohoi's ACME-DNS.`)
|
||||
|
|
|
|||
67
docs/content/dns/zz_gen_abion.md
generated
Normal file
67
docs/content/dns/zz_gen_abion.md
generated
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
title: "Abion"
|
||||
date: 2019-03-03T16:39:46+01:00
|
||||
draft: false
|
||||
slug: abion
|
||||
dnsprovider:
|
||||
since: "v4.32.0"
|
||||
code: "abion"
|
||||
url: "https://abion.com"
|
||||
---
|
||||
|
||||
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
|
||||
<!-- providers/dns/abion/abion.toml -->
|
||||
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
|
||||
|
||||
|
||||
Configuration for [Abion](https://abion.com).
|
||||
|
||||
|
||||
<!--more-->
|
||||
|
||||
- Code: `abion`
|
||||
- Since: v4.32.0
|
||||
|
||||
|
||||
Here is an example bash command using the Abion provider:
|
||||
|
||||
```bash
|
||||
ABION_API_KEY="xxxxxxxxxxxx" \
|
||||
lego --dns abion -d '*.example.com' -d example.com run
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Credentials
|
||||
|
||||
| Environment Variable Name | Description |
|
||||
|-----------------------|-------------|
|
||||
| `ABION_API_KEY` | API key |
|
||||
|
||||
The environment variable names can be suffixed by `_FILE` to reference a file instead of a value.
|
||||
More information [here]({{% ref "dns#configuration-and-credentials" %}}).
|
||||
|
||||
|
||||
## Additional Configuration
|
||||
|
||||
| Environment Variable Name | Description |
|
||||
|--------------------------------|-------------|
|
||||
| `ABION_HTTP_TIMEOUT` | API request timeout in seconds (Default: 10) |
|
||||
| `ABION_POLLING_INTERVAL` | Time between DNS propagation check in seconds (Default: 2) |
|
||||
| `ABION_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation in seconds (Default: 60) |
|
||||
| `ABION_TTL` | The TTL of the TXT record used for the DNS challenge in seconds (Default: 120) |
|
||||
|
||||
The environment variable names can be suffixed by `_FILE` to reference a file instead of a value.
|
||||
More information [here]({{% ref "dns#configuration-and-credentials" %}}).
|
||||
|
||||
|
||||
|
||||
|
||||
## More information
|
||||
|
||||
- [API documentation](https://demo.abion.com/pmapi-doc/openapi-ui/index.html)
|
||||
|
||||
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
|
||||
<!-- providers/dns/abion/abion.toml -->
|
||||
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
|
||||
2
docs/data/zz_cli_help.toml
generated
2
docs/data/zz_cli_help.toml
generated
|
|
@ -152,7 +152,7 @@ To display the documentation for a specific DNS provider, run:
|
|||
$ lego dnshelp -c code
|
||||
|
||||
Supported DNS providers:
|
||||
acme-dns, active24, alidns, aliesa, allinkl, alwaysdata, anexia, arvancloud, auroradns, autodns, axelname, azion, azure, azuredns, baiducloud, beget, binarylane, bindman, bluecat, bluecatv2, bookmyname, brandit, bunny, checkdomain, civo, clouddns, cloudflare, cloudns, cloudru, cloudxns, com35, conoha, conohav3, constellix, corenetworks, cpanel, ddnss, derak, desec, designate, digitalocean, directadmin, dnsexit, dnshomede, dnsimple, dnsmadeeasy, dnspod, dode, domeneshop, dreamhost, duckdns, dyn, dyndnsfree, dynu, easydns, edgecenter, edgedns, edgeone, efficientip, epik, exec, exoscale, f5xc, freemyip, gandi, gandiv5, gcloud, gcore, gigahostno, glesys, godaddy, googledomains, gravity, hetzner, hostingde, hostinger, hostingnl, hosttech, httpnet, httpreq, huaweicloud, hurricane, hyperone, ibmcloud, iij, iijdpf, infoblox, infomaniak, internetbs, inwx, ionos, ionoscloud, ipv64, ispconfig, ispconfigddns, iwantmyname, jdcloud, joker, keyhelp, liara, lightsail, limacity, linode, liquidweb, loopia, luadns, mailinabox, manageengine, manual, metaname, metaregistrar, mijnhost, mittwald, myaddr, mydnsjp, mythicbeasts, namecheap, namedotcom, namesilo, nearlyfreespeech, neodigit, netcup, netlify, nicmanager, nicru, nifcloud, njalla, nodion, ns1, octenium, oraclecloud, otc, ovh, pdns, plesk, porkbun, rackspace, rainyun, rcodezero, regfish, regru, rfc2136, rimuhosting, route53, safedns, sakuracloud, scaleway, selectel, selectelv2, selfhostde, servercow, shellrent, simply, sonic, spaceship, stackpath, syse, technitium, tencentcloud, timewebcloud, todaynic, transip, ultradns, uniteddomains, variomedia, vegadns, vercel, versio, vinyldns, virtualname, vkcloud, volcengine, vscale, vultr, webnames, webnamesca, websupport, wedos, westcn, yandex, yandex360, yandexcloud, zoneedit, zoneee, zonomi
|
||||
abion, acme-dns, active24, alidns, aliesa, allinkl, alwaysdata, anexia, arvancloud, auroradns, autodns, axelname, azion, azure, azuredns, baiducloud, beget, binarylane, bindman, bluecat, bluecatv2, bookmyname, brandit, bunny, checkdomain, civo, clouddns, cloudflare, cloudns, cloudru, cloudxns, com35, conoha, conohav3, constellix, corenetworks, cpanel, ddnss, derak, desec, designate, digitalocean, directadmin, dnsexit, dnshomede, dnsimple, dnsmadeeasy, dnspod, dode, domeneshop, dreamhost, duckdns, dyn, dyndnsfree, dynu, easydns, edgecenter, edgedns, edgeone, efficientip, epik, exec, exoscale, f5xc, freemyip, gandi, gandiv5, gcloud, gcore, gigahostno, glesys, godaddy, googledomains, gravity, hetzner, hostingde, hostinger, hostingnl, hosttech, httpnet, httpreq, huaweicloud, hurricane, hyperone, ibmcloud, iij, iijdpf, infoblox, infomaniak, internetbs, inwx, ionos, ionoscloud, ipv64, ispconfig, ispconfigddns, iwantmyname, jdcloud, joker, keyhelp, liara, lightsail, limacity, linode, liquidweb, loopia, luadns, mailinabox, manageengine, manual, metaname, metaregistrar, mijnhost, mittwald, myaddr, mydnsjp, mythicbeasts, namecheap, namedotcom, namesilo, nearlyfreespeech, neodigit, netcup, netlify, nicmanager, nicru, nifcloud, njalla, nodion, ns1, octenium, oraclecloud, otc, ovh, pdns, plesk, porkbun, rackspace, rainyun, rcodezero, regfish, regru, rfc2136, rimuhosting, route53, safedns, sakuracloud, scaleway, selectel, selectelv2, selfhostde, servercow, shellrent, simply, sonic, spaceship, stackpath, syse, technitium, tencentcloud, timewebcloud, todaynic, transip, ultradns, uniteddomains, variomedia, vegadns, vercel, versio, vinyldns, virtualname, vkcloud, volcengine, vscale, vultr, webnames, webnamesca, websupport, wedos, westcn, yandex, yandex360, yandexcloud, zoneedit, zoneee, zonomi
|
||||
|
||||
More information: https://go-acme.github.io/lego/dns
|
||||
"""
|
||||
|
|
|
|||
214
providers/dns/abion/abion.go
Normal file
214
providers/dns/abion/abion.go
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
// Package abion implements a DNS provider for solving the DNS-01 challenge using Abion.
|
||||
package abion
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v4/challenge"
|
||||
"github.com/go-acme/lego/v4/challenge/dns01"
|
||||
"github.com/go-acme/lego/v4/platform/config/env"
|
||||
"github.com/go-acme/lego/v4/providers/dns/abion/internal"
|
||||
"github.com/go-acme/lego/v4/providers/dns/internal/clientdebug"
|
||||
)
|
||||
|
||||
// Environment variables names.
|
||||
const (
|
||||
envNamespace = "ABION_"
|
||||
|
||||
EnvAPIKey = envNamespace + "API_KEY"
|
||||
|
||||
EnvTTL = envNamespace + "TTL"
|
||||
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
|
||||
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
|
||||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIKey string
|
||||
PropagationTimeout time.Duration
|
||||
PollingInterval time.Duration
|
||||
TTL int
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// NewDefaultConfig returns a default configuration for the DNSProvider.
|
||||
func NewDefaultConfig() *Config {
|
||||
return &Config{
|
||||
TTL: env.GetOrDefaultInt(EnvTTL, dns01.DefaultTTL),
|
||||
PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, dns01.DefaultPropagationTimeout),
|
||||
PollingInterval: env.GetOrDefaultSecond(EnvPollingInterval, dns01.DefaultPollingInterval),
|
||||
HTTPClient: &http.Client{
|
||||
Timeout: env.GetOrDefaultSecond(EnvHTTPTimeout, 10*time.Second),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// DNSProvider implements the challenge.Provider interface.
|
||||
type DNSProvider struct {
|
||||
config *Config
|
||||
client *internal.Client
|
||||
}
|
||||
|
||||
// NewDNSProvider returns a DNSProvider instance configured for Abion.
|
||||
// Credentials must be passed in the environment variable: ABION_API_KEY.
|
||||
func NewDNSProvider() (*DNSProvider, error) {
|
||||
values, err := env.Get(EnvAPIKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("abion: %w", err)
|
||||
}
|
||||
|
||||
config := NewDefaultConfig()
|
||||
config.APIKey = values[EnvAPIKey]
|
||||
|
||||
return NewDNSProviderConfig(config)
|
||||
}
|
||||
|
||||
// NewDNSProviderConfig return a DNSProvider instance configured for Abion.
|
||||
func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
|
||||
if config == nil {
|
||||
return nil, errors.New("abion: the configuration of the DNS provider is nil")
|
||||
}
|
||||
|
||||
if config.APIKey == "" {
|
||||
return nil, errors.New("abion: credentials missing")
|
||||
}
|
||||
|
||||
client := internal.NewClient(config.APIKey)
|
||||
|
||||
if config.HTTPClient != nil {
|
||||
client.HTTPClient = config.HTTPClient
|
||||
}
|
||||
|
||||
client.HTTPClient = clientdebug.Wrap(client.HTTPClient)
|
||||
|
||||
return &DNSProvider{
|
||||
config: config,
|
||||
client: client,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Timeout returns the timeout and interval to use when checking for DNS propagation.
|
||||
// Adjusting here to cope with spikes in propagation times.
|
||||
func (d *DNSProvider) Timeout() (timeout, interval time.Duration) {
|
||||
return d.config.PropagationTimeout, d.config.PollingInterval
|
||||
}
|
||||
|
||||
// Present creates a TXT record to fulfill the dns-01 challenge.
|
||||
func (d *DNSProvider) Present(domain, _, keyAuth string) error {
|
||||
ctx := context.Background()
|
||||
info := dns01.GetChallengeInfo(domain, keyAuth)
|
||||
|
||||
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
|
||||
if err != nil {
|
||||
return fmt.Errorf("abion: could not find zone for domain %q: %w", domain, err)
|
||||
}
|
||||
|
||||
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
|
||||
if err != nil {
|
||||
return fmt.Errorf("abion: %w", err)
|
||||
}
|
||||
|
||||
zones, err := d.client.GetZone(ctx, dns01.UnFqdn(authZone))
|
||||
if err != nil {
|
||||
return fmt.Errorf("abion: get zone %w", err)
|
||||
}
|
||||
|
||||
var data []internal.Record
|
||||
|
||||
if sub, ok := zones.Data.Attributes.Records[subDomain]; ok {
|
||||
if records, exist := sub["TXT"]; exist {
|
||||
data = append(data, records...)
|
||||
}
|
||||
}
|
||||
|
||||
data = append(data, internal.Record{
|
||||
TTL: d.config.TTL,
|
||||
Data: info.Value,
|
||||
Comments: "lego",
|
||||
})
|
||||
|
||||
patch := internal.ZoneRequest{
|
||||
Data: internal.Zone{
|
||||
Type: "zone",
|
||||
ID: dns01.UnFqdn(authZone),
|
||||
Attributes: internal.Attributes{
|
||||
Records: map[string]map[string][]internal.Record{
|
||||
subDomain: {"TXT": data},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
_, err = d.client.UpdateZone(ctx, dns01.UnFqdn(authZone), patch)
|
||||
if err != nil {
|
||||
return fmt.Errorf("abion: update zone %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CleanUp removes the TXT record matching the specified parameters.
|
||||
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
|
||||
ctx := context.Background()
|
||||
info := dns01.GetChallengeInfo(domain, keyAuth)
|
||||
|
||||
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
|
||||
if err != nil {
|
||||
return fmt.Errorf("abion: could not find zone for domain %q: %w", domain, err)
|
||||
}
|
||||
|
||||
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
|
||||
if err != nil {
|
||||
return fmt.Errorf("abion: %w", err)
|
||||
}
|
||||
|
||||
zones, err := d.client.GetZone(ctx, dns01.UnFqdn(authZone))
|
||||
if err != nil {
|
||||
return fmt.Errorf("abion: get zone %w", err)
|
||||
}
|
||||
|
||||
var data []internal.Record
|
||||
|
||||
if sub, ok := zones.Data.Attributes.Records[subDomain]; ok {
|
||||
if records, exist := sub["TXT"]; exist {
|
||||
for _, record := range records {
|
||||
if record.Data != info.Value {
|
||||
data = append(data, record)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
payload := map[string][]internal.Record{}
|
||||
if len(data) == 0 {
|
||||
payload["TXT"] = nil
|
||||
} else {
|
||||
payload["TXT"] = data
|
||||
}
|
||||
|
||||
patch := internal.ZoneRequest{
|
||||
Data: internal.Zone{
|
||||
Type: "zone",
|
||||
ID: dns01.UnFqdn(authZone),
|
||||
Attributes: internal.Attributes{
|
||||
Records: map[string]map[string][]internal.Record{
|
||||
subDomain: payload,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
_, err = d.client.UpdateZone(ctx, dns01.UnFqdn(authZone), patch)
|
||||
if err != nil {
|
||||
return fmt.Errorf("abion: update zone %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
22
providers/dns/abion/abion.toml
Normal file
22
providers/dns/abion/abion.toml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
Name = "Abion"
|
||||
Description = ''''''
|
||||
URL = "https://abion.com"
|
||||
Code = "abion"
|
||||
Since = "v4.32.0"
|
||||
|
||||
Example = '''
|
||||
ABION_API_KEY="xxxxxxxxxxxx" \
|
||||
lego --dns abion -d '*.example.com' -d example.com run
|
||||
'''
|
||||
|
||||
[Configuration]
|
||||
[Configuration.Credentials]
|
||||
ABION_API_KEY = "API key"
|
||||
[Configuration.Additional]
|
||||
ABION_POLLING_INTERVAL = "Time between DNS propagation check in seconds (Default: 2)"
|
||||
ABION_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation in seconds (Default: 60)"
|
||||
ABION_TTL = "The TTL of the TXT record used for the DNS challenge in seconds (Default: 120)"
|
||||
ABION_HTTP_TIMEOUT = "API request timeout in seconds (Default: 10)"
|
||||
|
||||
[Links]
|
||||
API = "https://demo.abion.com/pmapi-doc/openapi-ui/index.html"
|
||||
118
providers/dns/abion/abion_test.go
Normal file
118
providers/dns/abion/abion_test.go
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
package abion
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/go-acme/lego/v4/platform/tester"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const envDomain = envNamespace + "DOMAIN"
|
||||
|
||||
var envTest = tester.NewEnvTest(EnvAPIKey).WithDomain(envDomain)
|
||||
|
||||
func TestNewDNSProvider(t *testing.T) {
|
||||
testCases := []struct {
|
||||
desc string
|
||||
envVars map[string]string
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
desc: "success",
|
||||
envVars: map[string]string{
|
||||
EnvAPIKey: "123",
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "missing credentials",
|
||||
envVars: map[string]string{
|
||||
EnvAPIKey: "",
|
||||
},
|
||||
expected: "abion: some credentials information are missing: ABION_API_KEY",
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
t.Run(test.desc, func(t *testing.T) {
|
||||
defer envTest.RestoreEnv()
|
||||
|
||||
envTest.ClearEnv()
|
||||
|
||||
envTest.Apply(test.envVars)
|
||||
|
||||
p, err := NewDNSProvider()
|
||||
|
||||
if test.expected == "" {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, p)
|
||||
require.NotNil(t, p.config)
|
||||
} else {
|
||||
require.EqualError(t, err, test.expected)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewDNSProviderConfig(t *testing.T) {
|
||||
testCases := []struct {
|
||||
desc string
|
||||
apiKey string
|
||||
ttl int
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
desc: "success",
|
||||
apiKey: "123",
|
||||
},
|
||||
{
|
||||
desc: "missing credentials",
|
||||
expected: "abion: credentials missing",
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
t.Run(test.desc, func(t *testing.T) {
|
||||
config := NewDefaultConfig()
|
||||
config.APIKey = test.apiKey
|
||||
config.TTL = test.ttl
|
||||
|
||||
p, err := NewDNSProviderConfig(config)
|
||||
|
||||
if test.expected == "" {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, p)
|
||||
require.NotNil(t, p.config)
|
||||
} else {
|
||||
require.EqualError(t, err, test.expected)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestLivePresent(t *testing.T) {
|
||||
if !envTest.IsLiveTest() {
|
||||
t.Skip("skipping live test")
|
||||
}
|
||||
|
||||
envTest.RestoreEnv()
|
||||
|
||||
provider, err := NewDNSProvider()
|
||||
require.NoError(t, err)
|
||||
|
||||
err = provider.Present(envTest.GetDomain(), "", "123d==")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestLiveCleanUp(t *testing.T) {
|
||||
if !envTest.IsLiveTest() {
|
||||
t.Skip("skipping live test")
|
||||
}
|
||||
|
||||
envTest.RestoreEnv()
|
||||
|
||||
provider, err := NewDNSProvider()
|
||||
require.NoError(t, err)
|
||||
|
||||
err = provider.CleanUp(envTest.GetDomain(), "", "123d==")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
172
providers/dns/abion/internal/client.go
Normal file
172
providers/dns/abion/internal/client.go
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
package internal
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v4/providers/dns/internal/errutils"
|
||||
"github.com/go-acme/lego/v4/providers/dns/internal/useragent"
|
||||
querystring "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
// defaultBaseURL represents the API endpoint to call.
|
||||
const defaultBaseURL = "https://api.abion.com"
|
||||
|
||||
const apiKeyHeader = "X-API-KEY"
|
||||
|
||||
// Client the Abion API client.
|
||||
type Client struct {
|
||||
apiKey string
|
||||
baseURL *url.URL
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// NewClient Creates a new Client.
|
||||
func NewClient(apiKey string) *Client {
|
||||
baseURL, _ := url.Parse(defaultBaseURL)
|
||||
|
||||
return &Client{
|
||||
apiKey: apiKey,
|
||||
baseURL: baseURL,
|
||||
HTTPClient: &http.Client{Timeout: 5 * time.Second},
|
||||
}
|
||||
}
|
||||
|
||||
// GetZones Lists all the zones your session can access.
|
||||
func (c *Client) GetZones(ctx context.Context, page *Pagination) (*APIResponse[[]Zone], error) {
|
||||
endpoint := c.baseURL.JoinPath("v1", "zones")
|
||||
|
||||
req, err := newJSONRequest(ctx, http.MethodGet, endpoint, http.NoBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if page != nil {
|
||||
v, errQ := querystring.Values(page)
|
||||
if errQ != nil {
|
||||
return nil, errQ
|
||||
}
|
||||
|
||||
req.URL.RawQuery = v.Encode()
|
||||
}
|
||||
|
||||
results := &APIResponse[[]Zone]{}
|
||||
|
||||
if err := c.do(req, results); err != nil {
|
||||
return nil, fmt.Errorf("could not get zones: %w", err)
|
||||
}
|
||||
|
||||
return results, nil
|
||||
}
|
||||
|
||||
// GetZone Returns the full information on a single zone.
|
||||
func (c *Client) GetZone(ctx context.Context, name string) (*APIResponse[*Zone], error) {
|
||||
endpoint := c.baseURL.JoinPath("v1", "zones", name)
|
||||
|
||||
req, err := newJSONRequest(ctx, http.MethodGet, endpoint, http.NoBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
results := &APIResponse[*Zone]{}
|
||||
|
||||
if err := c.do(req, results); err != nil {
|
||||
return nil, fmt.Errorf("could not get zone %s: %w", name, err)
|
||||
}
|
||||
|
||||
return results, nil
|
||||
}
|
||||
|
||||
// UpdateZone Updates a zone by patching it according to JSON Merge Patch format (RFC 7396).
|
||||
func (c *Client) UpdateZone(ctx context.Context, name string, patch ZoneRequest) (*APIResponse[*Zone], error) {
|
||||
endpoint := c.baseURL.JoinPath("v1", "zones", name)
|
||||
|
||||
req, err := newJSONRequest(ctx, http.MethodPatch, endpoint, patch)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
results := &APIResponse[*Zone]{}
|
||||
|
||||
if err := c.do(req, results); err != nil {
|
||||
return nil, fmt.Errorf("could not update zone %s: %w", name, err)
|
||||
}
|
||||
|
||||
return results, nil
|
||||
}
|
||||
|
||||
func (c *Client) do(req *http.Request, result any) error {
|
||||
useragent.SetHeader(req.Header)
|
||||
|
||||
req.Header.Set(apiKeyHeader, c.apiKey)
|
||||
|
||||
resp, err := c.HTTPClient.Do(req)
|
||||
if err != nil {
|
||||
return errutils.NewHTTPDoError(req, err)
|
||||
}
|
||||
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return parseError(req, resp)
|
||||
}
|
||||
|
||||
if result == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
raw, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return errutils.NewReadResponseError(req, resp.StatusCode, err)
|
||||
}
|
||||
|
||||
err = json.Unmarshal(raw, result)
|
||||
if err != nil {
|
||||
return errutils.NewUnmarshalError(req, resp.StatusCode, raw, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func newJSONRequest(ctx context.Context, method string, endpoint *url.URL, payload any) (*http.Request, error) {
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
if payload != nil {
|
||||
err := json.NewEncoder(buf).Encode(payload)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create request JSON body: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, method, endpoint.String(), buf)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to create request: %w", err)
|
||||
}
|
||||
|
||||
req.Header.Set("Accept", "application/json")
|
||||
|
||||
if payload != nil {
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
}
|
||||
|
||||
return req, nil
|
||||
}
|
||||
|
||||
func parseError(req *http.Request, resp *http.Response) error {
|
||||
raw, _ := io.ReadAll(resp.Body)
|
||||
|
||||
zResp := &APIResponse[any]{}
|
||||
|
||||
err := json.Unmarshal(raw, zResp)
|
||||
if err != nil {
|
||||
return errutils.NewUnexpectedStatusCodeError(req, resp.StatusCode, raw)
|
||||
}
|
||||
|
||||
return zResp.Error
|
||||
}
|
||||
255
providers/dns/abion/internal/client_test.go
Normal file
255
providers/dns/abion/internal/client_test.go
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"github.com/go-acme/lego/v4/platform/tester/servermock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func mockBuilder() *servermock.Builder[*Client] {
|
||||
return servermock.NewBuilder(
|
||||
func(server *httptest.Server) (*Client, error) {
|
||||
client := NewClient("secret")
|
||||
client.HTTPClient = server.Client()
|
||||
client.baseURL, _ = url.Parse(server.URL)
|
||||
|
||||
return client, nil
|
||||
},
|
||||
servermock.CheckHeader().
|
||||
WithJSONHeaders().
|
||||
With(apiKeyHeader, "secret"),
|
||||
)
|
||||
}
|
||||
|
||||
func TestUpdateZone(t *testing.T) {
|
||||
domain := "example.com"
|
||||
|
||||
client := mockBuilder().
|
||||
Route("PATCH /v1/zones/"+domain,
|
||||
servermock.ResponseFromFixture("update.json"),
|
||||
servermock.CheckRequestJSONBodyFromFixture("update-request.json")).
|
||||
Build(t)
|
||||
|
||||
patch := ZoneRequest{
|
||||
Data: Zone{
|
||||
Type: "zone",
|
||||
ID: domain,
|
||||
Attributes: Attributes{
|
||||
Records: map[string]map[string][]Record{
|
||||
"_acme-challenge.test": {
|
||||
"TXT": []Record{
|
||||
{Data: "test"},
|
||||
{Data: "test1"},
|
||||
{Data: "test2"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
zone, err := client.UpdateZone(context.Background(), domain, patch)
|
||||
require.NoError(t, err)
|
||||
|
||||
expected := &APIResponse[*Zone]{
|
||||
Meta: &Metadata{
|
||||
InvocationID: "95cdcc21-b9c3-4b21-8bd1-b05c34c56147",
|
||||
},
|
||||
Data: &Zone{
|
||||
Type: "zone",
|
||||
ID: "dipcon.com",
|
||||
Attributes: Attributes{
|
||||
OrganisationID: "10154",
|
||||
OrganisationDescription: "My Company AB",
|
||||
DNSTypeDescription: "Anycast",
|
||||
Slave: false,
|
||||
Pending: false,
|
||||
Deleted: false,
|
||||
Settings: &Settings{
|
||||
MName: "dns01.dipcon.com.",
|
||||
Refresh: 3600,
|
||||
Expire: 604800,
|
||||
TTL: 600,
|
||||
},
|
||||
Records: map[string]map[string][]Record{
|
||||
"@": {
|
||||
"NS": {
|
||||
{
|
||||
TTL: 3600,
|
||||
Data: "193.14.90.194",
|
||||
Comments: "this is a comment",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Redirects: map[string][]Redirect{
|
||||
"<name>": {
|
||||
{
|
||||
Path: "/x/y",
|
||||
Destination: "https://abion.com/?ref=dipcon",
|
||||
Status: 301,
|
||||
Slugs: true,
|
||||
Certificate: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
assert.Equal(t, expected, zone)
|
||||
}
|
||||
|
||||
func TestUpdateZone_error(t *testing.T) {
|
||||
domain := "example.com"
|
||||
|
||||
client := mockBuilder().
|
||||
Route("PATCH /v1/zones/"+domain,
|
||||
servermock.ResponseFromFixture("error.json").
|
||||
WithStatusCode(http.StatusUnauthorized)).
|
||||
Build(t)
|
||||
|
||||
patch := ZoneRequest{
|
||||
Data: Zone{
|
||||
Type: "zone",
|
||||
ID: domain,
|
||||
Attributes: Attributes{
|
||||
Records: map[string]map[string][]Record{
|
||||
"_acme-challenge.test": {
|
||||
"TXT": []Record{
|
||||
{Data: "test"},
|
||||
{Data: "test1"},
|
||||
{Data: "test2"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
_, err := client.UpdateZone(context.Background(), domain, patch)
|
||||
require.EqualError(t, err, "could not update zone example.com: api error: status=401, message=Authentication Error")
|
||||
}
|
||||
|
||||
func TestGetZones(t *testing.T) {
|
||||
client := mockBuilder().
|
||||
Route("GET /v1/zones/",
|
||||
servermock.ResponseFromFixture("zones.json")).
|
||||
Build(t)
|
||||
|
||||
zones, err := client.GetZones(context.Background(), nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
expected := &APIResponse[[]Zone]{
|
||||
Meta: &Metadata{
|
||||
InvocationID: "95cdcc21-b9c3-4b21-8bd1-b05c34c56147",
|
||||
Pagination: &Pagination{
|
||||
Offset: 0,
|
||||
Limit: 1,
|
||||
Total: 1,
|
||||
},
|
||||
},
|
||||
Data: []Zone{
|
||||
{
|
||||
Type: "zone",
|
||||
ID: "dipcon.com",
|
||||
Attributes: Attributes{
|
||||
OrganisationID: "10154",
|
||||
OrganisationDescription: "My Company AB",
|
||||
DNSTypeDescription: "Anycast",
|
||||
Slave: true,
|
||||
Pending: true,
|
||||
Deleted: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
assert.Equal(t, expected, zones)
|
||||
}
|
||||
|
||||
func TestGetZones_error(t *testing.T) {
|
||||
client := mockBuilder().
|
||||
Route("GET /v1/zones/",
|
||||
servermock.ResponseFromFixture("error.json").
|
||||
WithStatusCode(http.StatusUnauthorized)).
|
||||
Build(t)
|
||||
|
||||
_, err := client.GetZones(context.Background(), nil)
|
||||
require.EqualError(t, err, "could not get zones: api error: status=401, message=Authentication Error")
|
||||
}
|
||||
|
||||
func TestGetZone(t *testing.T) {
|
||||
client := mockBuilder().
|
||||
Route("GET /v1/zones/example.com",
|
||||
servermock.ResponseFromFixture("zone.json")).
|
||||
Build(t)
|
||||
|
||||
zones, err := client.GetZone(context.Background(), "example.com")
|
||||
require.NoError(t, err)
|
||||
|
||||
expected := &APIResponse[*Zone]{
|
||||
Meta: &Metadata{
|
||||
InvocationID: "95cdcc21-b9c3-4b21-8bd1-b05c34c56147",
|
||||
},
|
||||
Data: &Zone{
|
||||
Type: "zone",
|
||||
ID: "dipcon.com",
|
||||
Attributes: Attributes{
|
||||
OrganisationID: "10154",
|
||||
OrganisationDescription: "My Company AB",
|
||||
DNSTypeDescription: "Anycast",
|
||||
Slave: false,
|
||||
Pending: false,
|
||||
Deleted: false,
|
||||
Settings: &Settings{
|
||||
MName: "dns01.dipcon.com.",
|
||||
Refresh: 3600,
|
||||
Expire: 604800,
|
||||
TTL: 600,
|
||||
},
|
||||
Records: map[string]map[string][]Record{
|
||||
"@": {
|
||||
"NS": {
|
||||
{
|
||||
TTL: 3600,
|
||||
Data: "193.14.90.194",
|
||||
Comments: "this is a comment",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Redirects: map[string][]Redirect{
|
||||
"<name>": {
|
||||
{
|
||||
Path: "/x/y",
|
||||
Destination: "https://abion.com/?ref=dipcon",
|
||||
Status: 301,
|
||||
Slugs: true,
|
||||
Certificate: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
assert.Equal(t, expected, zones)
|
||||
}
|
||||
|
||||
func TestGetZone_error(t *testing.T) {
|
||||
client := mockBuilder().
|
||||
Route("GET /v1/zones/example.com",
|
||||
servermock.ResponseFromFixture("error.json").
|
||||
WithStatusCode(http.StatusUnauthorized)).
|
||||
Build(t)
|
||||
|
||||
_, err := client.GetZone(context.Background(), "example.com")
|
||||
require.EqualError(t, err, "could not get zone example.com: api error: status=401, message=Authentication Error")
|
||||
}
|
||||
9
providers/dns/abion/internal/fixtures/error.json
Normal file
9
providers/dns/abion/internal/fixtures/error.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"meta": {
|
||||
"invocationId": "95cdcc21-b9c3-4b21-8bd1-b05c34c56147"
|
||||
},
|
||||
"error": {
|
||||
"status": 401,
|
||||
"message": "Authentication Error"
|
||||
}
|
||||
}
|
||||
23
providers/dns/abion/internal/fixtures/update-request.json
Normal file
23
providers/dns/abion/internal/fixtures/update-request.json
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"data": {
|
||||
"type": "zone",
|
||||
"id": "example.com",
|
||||
"attributes": {
|
||||
"records": {
|
||||
"_acme-challenge.test": {
|
||||
"TXT": [
|
||||
{
|
||||
"rdata": "test"
|
||||
},
|
||||
{
|
||||
"rdata": "test1"
|
||||
},
|
||||
{
|
||||
"rdata": "test2"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
45
providers/dns/abion/internal/fixtures/update.json
Normal file
45
providers/dns/abion/internal/fixtures/update.json
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"meta": {
|
||||
"invocationId": "95cdcc21-b9c3-4b21-8bd1-b05c34c56147"
|
||||
},
|
||||
"data": {
|
||||
"type": "zone",
|
||||
"id": "dipcon.com",
|
||||
"attributes": {
|
||||
"organisationId": "10154",
|
||||
"organisationDescription": "My Company AB",
|
||||
"dnsTypeDescription": "Anycast",
|
||||
"slave": false,
|
||||
"pending": false,
|
||||
"deleted": false,
|
||||
"settings": {
|
||||
"mname": "dns01.dipcon.com.",
|
||||
"refresh": 3600,
|
||||
"expire": 604800,
|
||||
"ttl": 600
|
||||
},
|
||||
"records": {
|
||||
"@": {
|
||||
"NS": [
|
||||
{
|
||||
"ttl": 3600,
|
||||
"rdata": "193.14.90.194",
|
||||
"comments": "this is a comment"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"redirects": {
|
||||
"<name>": [
|
||||
{
|
||||
"path": "/x/y",
|
||||
"destination": "https://abion.com/?ref=dipcon",
|
||||
"status": 301,
|
||||
"slugs": true,
|
||||
"certificate": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
45
providers/dns/abion/internal/fixtures/zone.json
Normal file
45
providers/dns/abion/internal/fixtures/zone.json
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"meta": {
|
||||
"invocationId": "95cdcc21-b9c3-4b21-8bd1-b05c34c56147"
|
||||
},
|
||||
"data": {
|
||||
"type": "zone",
|
||||
"id": "dipcon.com",
|
||||
"attributes": {
|
||||
"organisationId": "10154",
|
||||
"organisationDescription": "My Company AB",
|
||||
"dnsTypeDescription": "Anycast",
|
||||
"slave": false,
|
||||
"pending": false,
|
||||
"deleted": false,
|
||||
"settings": {
|
||||
"mname": "dns01.dipcon.com.",
|
||||
"refresh": 3600,
|
||||
"expire": 604800,
|
||||
"ttl": 600
|
||||
},
|
||||
"records": {
|
||||
"@": {
|
||||
"NS": [
|
||||
{
|
||||
"ttl": 3600,
|
||||
"rdata": "193.14.90.194",
|
||||
"comments": "this is a comment"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"redirects": {
|
||||
"<name>": [
|
||||
{
|
||||
"path": "/x/y",
|
||||
"destination": "https://abion.com/?ref=dipcon",
|
||||
"status": 301,
|
||||
"slugs": true,
|
||||
"certificate": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
22
providers/dns/abion/internal/fixtures/zones.json
Normal file
22
providers/dns/abion/internal/fixtures/zones.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"meta": {
|
||||
"invocationId": "95cdcc21-b9c3-4b21-8bd1-b05c34c56147",
|
||||
"offset": 0,
|
||||
"limit": 1,
|
||||
"total": 1
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"type": "zone",
|
||||
"id": "dipcon.com",
|
||||
"attributes": {
|
||||
"organisationId": "10154",
|
||||
"organisationDescription": "My Company AB",
|
||||
"dnsTypeDescription": "Anycast",
|
||||
"slave": true,
|
||||
"pending": true,
|
||||
"deleted": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
73
providers/dns/abion/internal/types.go
Normal file
73
providers/dns/abion/internal/types.go
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
package internal
|
||||
|
||||
import "fmt"
|
||||
|
||||
type ZoneRequest struct {
|
||||
Data Zone `json:"data"`
|
||||
}
|
||||
|
||||
type Pagination struct {
|
||||
Offset int `json:"offset,omitempty" url:"offset"`
|
||||
Limit int `json:"limit,omitempty" url:"limit"`
|
||||
Total int `json:"total,omitempty" url:"total"`
|
||||
}
|
||||
|
||||
type APIResponse[T any] struct {
|
||||
Meta *Metadata `json:"meta,omitempty"`
|
||||
Data T `json:"data,omitempty"`
|
||||
Error *Error `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
type Metadata struct {
|
||||
*Pagination
|
||||
|
||||
InvocationID string `json:"invocationId,omitempty"`
|
||||
}
|
||||
|
||||
type Zone struct {
|
||||
Type string `json:"type,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
Attributes Attributes `json:"attributes"`
|
||||
}
|
||||
|
||||
type Attributes struct {
|
||||
OrganisationID string `json:"organisationId,omitempty"`
|
||||
OrganisationDescription string `json:"organisationDescription,omitempty"`
|
||||
DNSTypeDescription string `json:"dnsTypeDescription,omitempty"`
|
||||
Slave bool `json:"slave,omitempty"`
|
||||
Pending bool `json:"pending,omitempty"`
|
||||
Deleted bool `json:"deleted,omitempty"`
|
||||
Settings *Settings `json:"settings,omitempty"`
|
||||
Records map[string]map[string][]Record `json:"records,omitempty"`
|
||||
Redirects map[string][]Redirect `json:"redirects,omitempty"`
|
||||
}
|
||||
|
||||
type Settings struct {
|
||||
MName string `json:"mname,omitempty"`
|
||||
Refresh int `json:"refresh,omitempty"`
|
||||
Expire int `json:"expire,omitempty"`
|
||||
TTL int `json:"ttl,omitempty"`
|
||||
}
|
||||
|
||||
type Record struct {
|
||||
TTL int `json:"ttl,omitempty"`
|
||||
Data string `json:"rdata,omitempty"`
|
||||
Comments string `json:"comments,omitempty"`
|
||||
}
|
||||
|
||||
type Redirect struct {
|
||||
Path string `json:"path"`
|
||||
Destination string `json:"destination"`
|
||||
Status int `json:"status"`
|
||||
Slugs bool `json:"slugs"`
|
||||
Certificate bool `json:"certificate"`
|
||||
}
|
||||
|
||||
type Error struct {
|
||||
Status int `json:"status"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
func (e *Error) Error() string {
|
||||
return fmt.Sprintf("api error: status=%d, message=%s", e.Status, e.Message)
|
||||
}
|
||||
3
providers/dns/zz_gen_dns_providers.go
generated
3
providers/dns/zz_gen_dns_providers.go
generated
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/go-acme/lego/v4/challenge"
|
||||
"github.com/go-acme/lego/v4/providers/dns/abion"
|
||||
"github.com/go-acme/lego/v4/providers/dns/acmedns"
|
||||
"github.com/go-acme/lego/v4/providers/dns/active24"
|
||||
"github.com/go-acme/lego/v4/providers/dns/alidns"
|
||||
|
|
@ -196,6 +197,8 @@ import (
|
|||
// NewDNSChallengeProviderByName Factory for DNS providers.
|
||||
func NewDNSChallengeProviderByName(name string) (challenge.Provider, error) {
|
||||
switch name {
|
||||
case "abion":
|
||||
return abion.NewDNSProvider()
|
||||
case "acme-dns", "acmedns":
|
||||
return acmedns.NewDNSProvider()
|
||||
case "active24":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue