From 7c4edee5ff56ea3d1829d200a35188e03c8a74cf Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Sun, 29 Dec 2024 12:49:43 +0200 Subject: [PATCH 1/3] luci-app-acme: Migrate to ES6 syntax. Use for of. Use let instead of var. Fix missing ; Make load to return an array of promises. Signed-off-by: Sergey Ponomarev --- .../htdocs/luci-static/resources/view/acme.js | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js index 2b0e7a78f4e..d71a35ea504 100644 --- a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js +++ b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js @@ -5,21 +5,24 @@ 'require view'; return view.extend({ - load: function() { - return L.resolveDefault(fs.list('/etc/ssl/acme/'), []).then(function(entries) { - var certs = []; - for (var i = 0; i < entries.length; i++) { - if (entries[i].type == 'file' && entries[i].name.match(/\.key$/)) { - certs.push(entries[i]); + load() { + return Promise.all([ + L.resolveDefault(fs.list('/etc/ssl/acme/'), []).then(files => { + let certs = []; + for (let f of files) { + if (f.type == 'file' && f.name.match(/\.key$/)) { + certs.push(f); + } } - } - return certs; - }); + return certs; + }), + ]); }, - render: function (certs) { + render(data) { + let certs = data[0]; let wikiUrl = 'https://github.com/acmesh-official/acme.sh/wiki/'; - var wikiInstructionUrl = wikiUrl + 'dnsapi'; + let wikiInstructionUrl = wikiUrl + 'dnsapi'; let m, s, o; m = new form.Map("acme", _("ACME certificates"), @@ -39,14 +42,14 @@ return view.extend({ o = s.option(form.Value, "account_email", _("Account email"), _('Email address to associate with account key.') + '
' + _('If a certificate wasn\'t renewed in time then you\'ll receive a notice at 20 days before expiry.') - ) + ); o.rmempty = false; o.datatype = "minlength(1)"; o = s.option(form.Flag, "debug", _("Enable debug logging")); o.rmempty = false; - s = m.section(form.GridSection, "cert", _("Certificate config")) + s = m.section(form.GridSection, "cert", _("Certificate config")); s.anonymous = false; s.addremove = true; s.nodescriptions = true; @@ -93,7 +96,7 @@ return view.extend({ o.depends("validation_method", "dns"); // List of supported DNS API. Names are same as file names in acme.sh for easier search. // May be outdated but not changed too often. - o.value('', '') + o.value('', ''); o.value('dns_acmedns', 'ACME DNS API github.com/joohoi/acme-dns'); o.value('dns_acmeproxy', 'ACME Proxy github.com/mdbraber/acmeproxy'); o.value('dns_1984hosting', '1984.is'); @@ -444,7 +447,7 @@ return view.extend({ o = s.taboption('challenge_dns', form.DynamicList, 'credentials', _('DNS API credentials'), _("The credentials for the DNS API mode selected above. " + "See https://github.com/acmesh-official/acme.sh/wiki/dnsapi for the format of credentials required by each API. " + - "Add multiple entries here in KEY=VAL shell variable format to supply multiple credential variables.")) + "Add multiple entries here in KEY=VAL shell variable format to supply multiple credential variables.")); o.datatype = "list(string)"; o.depends("validation_method", "dns"); o.modalonly = true; @@ -485,7 +488,7 @@ return view.extend({ o.optional = true; o.modalonly = true; o.cfgvalue = function(section_id) { - var keylength = uci.get('acme', section_id, 'keylength'); + let keylength = uci.get('acme', section_id, 'keylength'); if (keylength) { // migrate the old keylength to a new keytype switch (keylength) { @@ -525,7 +528,7 @@ return view.extend({ return m.render(); } -}) +}); function _addDnsProviderField(s, provider, env, title, desc) { @@ -534,7 +537,7 @@ function _addDnsProviderField(s, provider, env, title, desc) { o.depends('dns', provider); o.modalonly = true; o.cfgvalue = function (section_id, stored_val) { - var creds = this.map.data.get(this.map.config, section_id, 'credentials'); + let creds = this.map.data.get(this.map.config, section_id, 'credentials'); return _extractParamValue(creds, env); }; o.write = function (section_id, value) { }; @@ -596,7 +599,7 @@ function _handleCheckService(c, event, curVal, newVal) { } function _renderCerts(certs) { - var table = E('table', {'class': 'table cbi-section-table', 'id': 'certificates_table'}, [ + let table = E('table', {'class': 'table cbi-section-table', 'id': 'certificates_table'}, [ E('tr', {'class': 'tr table-titles'}, [ E('th', {'class': 'th'}, _('Main Domain')), E('th', {'class': 'th'}, _('Private Key')), @@ -605,7 +608,7 @@ function _renderCerts(certs) { ]) ]); - var rows = certs.map(function (cert) { + let rows = certs.map(function (cert) { let domain = cert.name.substring(0, cert.name.length - 4); let issueDate = new Date(cert.mtime * 1000).toLocaleDateString(); return [ From 23ee0bf5b948d3d366fe734f8c29149919330d2e Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Sun, 29 Dec 2024 12:58:23 +0200 Subject: [PATCH 2/3] luci-app-acme: fix _handleCheckService() signature Signed-off-by: Sergey Ponomarev --- .../luci-app-acme/htdocs/luci-static/resources/view/acme.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js index d71a35ea504..f287e25da65 100644 --- a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js +++ b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js @@ -234,7 +234,7 @@ return view.extend({ o.value('dns_zone', 'Zone.ee'); o.value('dns_zonomi', 'Zonomi.com'); o.modalonly = true; - o.onchange = L.bind(_handleCheckService, o, s); + o.onchange = _handleCheckService; o = s.taboption('challenge_dns', form.DummyValue, '_wiki_url', _('See instructions'), ''); o.rawhtml = true; @@ -536,7 +536,7 @@ function _addDnsProviderField(s, provider, env, title, desc) { _(desc)); o.depends('dns', provider); o.modalonly = true; - o.cfgvalue = function (section_id, stored_val) { + o.cfgvalue = function (section_id) { let creds = this.map.data.get(this.map.config, section_id, 'credentials'); return _extractParamValue(creds, env); }; @@ -594,7 +594,7 @@ function _parseKeyValueListToMap(paramsKeyVals) { return map; } -function _handleCheckService(c, event, curVal, newVal) { +function _handleCheckService(event, section_id, newVal) { document.getElementById('wikiInstructionUrl').href = 'https://github.com/acmesh-official/acme.sh/wiki/dnsapi#' + newVal; } From 8e2730615eb218be3f9b418210b4e5c7ddcd1847 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Sun, 29 Dec 2024 18:34:25 +0200 Subject: [PATCH 3/3] luci-app-acme: render DNS API fields from the Structured Info The ACME.sh scripts have a description of all options. In preparation to use it include it generated into the app itself and render. Signed-off-by: Sergey Ponomarev --- .../htdocs/luci-static/resources/view/acme.js | 370 +------ .../luci-static/resources/view/dnsapi.js | 110 +++ .../root/usr/share/acmesh/dnsapi.info.txt | 906 ++++++++++++++++++ .../usr/share/rpcd/acl.d/luci-app-acme.json | 3 +- 4 files changed, 1047 insertions(+), 342 deletions(-) create mode 100644 applications/luci-app-acme/htdocs/luci-static/resources/view/dnsapi.js create mode 100644 applications/luci-app-acme/root/usr/share/acmesh/dnsapi.info.txt diff --git a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js index f287e25da65..5d4478498ed 100644 --- a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js +++ b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js @@ -3,6 +3,7 @@ 'require fs'; 'require uci'; 'require view'; +"require view.dnsapi as dnsapi"; return view.extend({ load() { @@ -16,11 +17,15 @@ return view.extend({ } return certs; }), + L.resolveDefault(fs.read_direct('/usr/share/acmesh/dnsapi.info.txt'), ''), ]); }, render(data) { let certs = data[0]; + let dnsApiInfoText = data[1]; + let apiInfos = dnsapi.parseFile(dnsApiInfoText); + let wikiUrl = 'https://github.com/acmesh-official/acme.sh/wiki/'; let wikiInstructionUrl = wikiUrl + 'dnsapi'; let m, s, o; @@ -97,142 +102,13 @@ return view.extend({ // List of supported DNS API. Names are same as file names in acme.sh for easier search. // May be outdated but not changed too often. o.value('', ''); - o.value('dns_acmedns', 'ACME DNS API github.com/joohoi/acme-dns'); - o.value('dns_acmeproxy', 'ACME Proxy github.com/mdbraber/acmeproxy'); - o.value('dns_1984hosting', '1984.is'); - o.value('dns_active24', 'Active24.com'); - o.value('dns_ad', 'Alwaysdata.com'); - o.value('dns_ali', 'Alibaba Cloud Aliyun.com'); - o.value('dns_anx', 'Anexia.com'); - o.value('dns_arvan', 'ArvanCloud.ir'); - o.value('dns_aurora', 'AuroraDNS.eu'); - o.value('dns_autodns', 'autoDNS (InternetX)'); - o.value('dns_aws', 'Amazon AWS Route53'); - o.value('dns_azion', 'Azion.com'); - o.value('dns_azure', 'Azure'); - o.value('dns_bunny', 'Bunny.net'); - o.value('dns_cf', 'CloudFlare.com'); - o.value('dns_clouddns', 'CloudDNS vshosting.cz'); - o.value('dns_cloudns', 'ClouDNS.net'); - o.value('dns_cn', 'Core-Networks.de'); - o.value('dns_conoha', 'ConoHa.io'); - o.value('dns_constellix', 'constellix.com'); - o.value('dns_cpanel', 'CPanel'); - o.value('dns_curanet', 'curanet.dk scannet.dk wannafind.dk dandomain.dk'); - o.value('dns_cyon', 'cayon.ch'); - o.value('dns_da', 'DirectAdmin Panel'); - o.value('dns_ddnss', 'DDNSS.de'); - o.value('dns_desec', 'deSEC.io'); - o.value('dns_df', 'DynDnsFree.de'); - o.value('dns_dgon', 'DigitalOcean.com'); - o.value('dns_dnshome', 'dnsHome.de'); - o.value('dns_dnsimple', 'DNSimple.com'); - o.value('dns_dnsservices', 'dns.services'); - o.value('dns_doapi', 'Domain-Offensive do.de'); - o.value('dns_domeneshop', 'DomeneShop.no'); - o.value('dns_dp', 'DNSPod.cn'); - o.value('dns_dpi', 'DNSPod.com'); - o.value('dns_dreamhost', 'DreamHost.com'); - o.value('dns_duckdns', 'DuckDNS.org'); - o.value('dns_durabledns', 'DurableDNS.com'); - o.value('dns_dyn', 'Dyn.com'); - o.value('dns_dynu', 'Dynu.com'); - o.value('dns_dynv6', 'DynV6.com'); - o.value('dns_easydns', 'EasyDNS.net'); - o.value('dns_edgedns', 'Akamai Edge DNS'); - o.value('dns_euserv', 'euserv.eu'); - o.value('dns_exoscale', 'Exoscale.com'); - o.value('dns_fornex', 'fornex.com'); - o.value('dns_freedns', 'FreeDNS.afraid.org'); - o.value('dns_gandi_livedns', 'LiveDNS.Gandi.net'); - // o.value('dns_gcloud', 'Google Cloud gcloud client'); - o.value('dns_gcore', 'Gcore.com'); - o.value('dns_gd', 'GoDaddy.com'); - o.value('dns_geoscaling', 'Geoscaling.com'); - o.value('dns_googledomains', 'Google Domains'); - o.value('dns_he', 'he.net'); - o.value('dns_hetzner', 'Hetzner.com'); - o.value('dns_hexonet', 'Hexonet.net'); - o.value('dns_hostingde', 'Hosting.de'); - o.value('dns_huaweicloud', 'MyHuaweiCloud.com'); - o.value('dns_infoblox', 'Infoblox'); - o.value('dns_infomaniak', 'InfoManiak.com'); - o.value('dns_internetbs', 'InternetBS.net'); - o.value('dns_inwx', 'inwx.de'); - o.value('dns_ionos', 'IONOS.com'); - o.value('dns_ipv64', 'ipv64.net'); - o.value('dns_ispconfig', 'ISPConfig Server'); - o.value('dns_jd', 'JDCloud.com'); - o.value('dns_joker', 'Joker.com'); - o.value('dns_kappernet', 'kapper.net'); - o.value('dns_kas', 'kasserver.com'); - o.value('dns_kinghost', 'KingHost.net'); - o.value('dns_la', 'dns.la'); - o.value('dns_leaseweb', 'leaseweb.com'); - // o.value('dns_lexicon', 'Lexicon client'); - o.value('dns_linode_v4', 'Linode.com'); - o.value('dns_loopia', 'Loopia.se'); - o.value('dns_lua', 'LuaDNS.com'); - // o.value('dns_maradns', 'MaraDNS Server zone file'); - o.value('dns_me', 'DNSMadeEasy.com'); - // o.value('dns_miab', 'Mail-in-a-Box Server API'); - o.value('dns_misaka', 'misaka.io'); - o.value('dns_mydevil', 'MyDevil.net'); - o.value('dns_mydnsjp', 'MyDNS.JP'); - o.value('dns_mythic_beasts', 'Mythic-Beasts.com'); - o.value('dns_namecheap', 'NameCheap.com'); - o.value('dns_namecom', 'Name.com'); - o.value('dns_namesilo', 'NameSilo.com'); - o.value('dns_nanelo', 'Nanelo.com'); - o.value('dns_nederhost', 'NederHost.nl'); - o.value('dns_neodigit', 'Neodigit.net'); - o.value('dns_netcup', 'netcup.eu netcup.de'); - o.value('dns_netlify', 'Netlify.com'); - o.value('dns_nic', 'nic.ru'); - o.value('dns_njalla', 'Njalla njal.la'); - o.value('dns_nm', 'NameMaster.de'); - // o.value('dns_nsd', 'NSD Server zone file'); - o.value('dns_nsone', 'NS1 nsone.net'); - o.value('dns_nsupdate', 'nsupdate (RFC2136) Server'); - o.value('dns_nw', 'Nexcess.net'); - o.value('dns_oci', 'Oracle Cloud Infrastructure (OCI)'); - o.value('dns_one', 'one.com'); - o.value('dns_online', 'online.net'); - o.value('dns_openprovider', 'OpenProvider.com'); - // o.value('dns_openstack', 'OpenStack Client'); - o.value('dns_opnsense', 'OPNsense Bind API'); - o.value('dns_ovh', 'OVH ovh.com ovhcloud.com kimsufi.com soyoustart.com'); - o.value('dns_pdns', 'PowerDNS Server'); - o.value('dns_pleskxml', 'plesk.com XML API'); - o.value('dns_pointhq', 'PointDNS pointhq.com'); - o.value('dns_porkbun', 'Porkbun.com'); - o.value('dns_rackcorp', 'RackCorp.com'); - o.value('dns_rackspace', 'RackSpace rackspacecloud.com'); - o.value('dns_rage4', 'rage4.com'); - o.value('dns_rcode0', 'Rcode0 rcodezero.at'); - o.value('dns_regru', 'Reg.ru'); - o.value('dns_scaleway', 'Scaleway.com'); - o.value('dns_schlundtech', 'Schlundtech.de'); - o.value('dns_selectel', 'Selectel.ru'); - o.value('dns_selfhost', 'selfhost.de'); - o.value('dns_servercow', 'servercow.de'); - o.value('dns_simply', 'Simply.com'); - o.value('dns_tele3', 'tele3.cz'); - o.value('dns_transip', 'transip.nl'); - o.value('dns_udr', 'ud-reselling.com'); - o.value('dns_ultra', 'UltraDNS.com'); - o.value('dns_variomedia', 'variomedia.de'); - o.value('dns_veesp', 'veesp.com'); - o.value('dns_vercel', 'Vercel.com'); - o.value('dns_vscale', 'vscale.io'); - o.value('dns_vultr', 'vultr.com'); - o.value('dns_websupport', 'websupport.sk'); - o.value('dns_world4you', 'World4You.com'); - o.value('dns_yandex', 'Yandex DNS dns.yandex.ru'); - o.value('dns_yc', 'Yandex Cloud cloud.yandex.net'); - o.value('dns_zilore', 'zilore.com'); - o.value('dns_zone', 'Zone.ee'); - o.value('dns_zonomi', 'Zonomi.com'); + for (let info of apiInfos) { + let title = info.Name; + if (info.Domains) { + title += ' (' + info.Domains + ')'; + } + o.value(info.Id, title); + } o.modalonly = true; o.onchange = _handleCheckService; @@ -243,206 +119,14 @@ return view.extend({ o.depends('validation_method', 'dns'); o.modalonly = true; - _addDnsProviderField(s, 'dns_1984hosting', 'One984HOSTING_Username', '1984.is Username', ''); - _addDnsProviderField(s, 'dns_1984hosting', 'One984HOSTING_Password', '1984.is Password', ''); - - _addDnsProviderField(s, 'dns_acmedns', 'ACMEDNS_BASE_URL', 'ACMEDNS URL', ''); - _addDnsProviderField(s, 'dns_acmedns', 'ACMEDNS_USERNAME', 'ACMEDNS User', ''); - _addDnsProviderField(s, 'dns_acmedns', 'ACMEDNS_PASSWORD', 'ACMEDNS Password', ''); - _addDnsProviderField(s, 'dns_acmedns', 'ACMEDNS_SUBDOMAIN', 'ACMEDNS Subdomain', ''); - - _addDnsProviderField(s, 'dns_ali', 'Ali_Key', 'Ali Key', ''); - _addDnsProviderField(s, 'dns_ali', 'Ali_Secret', 'Ali Secret', ''); - - _addDnsProviderField(s, 'dns_aws', 'AWS_ACCESS_KEY_ID', 'AWS access key id', ''); - _addDnsProviderField(s, 'dns_aws', 'AWS_SECRET_ACCESS_KEY', 'AWS secret access key', ''); - - _addDnsProviderField(s, 'dns_azure', 'AZUREDNS_SUBSCRIPTIONID', 'Azure Subscription ID', ''); - _addDnsProviderField(s, 'dns_azure', 'AZUREDNS_TENANTID', 'Azure Tenant ID', ''); - _addDnsProviderField(s, 'dns_azure', 'AZUREDNS_APPID', 'Azure App ID', ''); - _addDnsProviderField(s, 'dns_azure', 'AZUREDNS_CLIENTSECRET', 'Azure Client Secret', ''); - - _addDnsProviderField(s, 'dns_bunny', 'BUNNY_API_KEY', 'Bunny API Key', ''); - - _addDnsProviderField(s, 'dns_cf', 'CF_Key', 'CF Key', ''); - _addDnsProviderField(s, 'dns_cf', 'CF_Email', 'CF Email', ''); - _addDnsProviderField(s, 'dns_cf', 'CF_Token', 'CF Token', ''); - _addDnsProviderField(s, 'dns_cf', 'CF_Account_ID', 'CF Account ID', ''); - _addDnsProviderField(s, 'dns_cf', 'CF_Zone_ID', 'CF Zone ID', ''); - - _addDnsProviderField(s, 'dns_ddnss', 'DDNSS_Token', 'DDNSS.de Token', ''); - - _addDnsProviderField(s, 'dns_desec', 'DEDYN_TOKEN', 'deSEC.io Token', ''); - - _addDnsProviderField(s, 'dns_duckdns', 'DuckDNS_Token', 'DuckDNS Token', - _('Open DuckDNS and copy a token here') - ); - - _addDnsProviderField(s, 'dns_dynv6', 'DYNV6_TOKEN', 'DynV6 Token', ''); - - _addDnsProviderField(s, 'dns_dnsimple', 'DNSimple_OAUTH_TOKEN', 'DNSimple OAuth TOKEN', ''); - - _addDnsProviderField(s, 'dns_dgon', 'DO_API_KEY', 'Digital Ocean API Key', ''); - - _addDnsProviderField(s, 'dns_dreamhost', 'DH_API_KEY', 'DreamHost.com API Key', ''); - - _addDnsProviderField(s, 'dns_df', 'DF_user', 'DynDnsFree.de Username', ''); - _addDnsProviderField(s, 'dns_df', 'DF_password', 'DynDnsFree.de Password', ''); - - _addDnsProviderField(s, 'dns_gandi_livedns', 'GANDI_LIVEDNS_KEY', 'Gandi LiveDNS Key', ''); - - _addDnsProviderField(s, 'dns_gcore', 'GCORE_Key', 'GCore Key', ''); - - _addDnsProviderField(s, 'dns_gd', 'GD_Key', 'GoDaddy.com Key', ''); - _addDnsProviderField(s, 'dns_gd', 'GD_Secret', 'GoDaddy.com Secret', ''); - - _addDnsProviderField(s, 'dns_geoscaling', 'GEOSCALING_Username', 'Geoscaling.com Username', - _('This is usually NOT an email address') - ); - _addDnsProviderField(s, 'dns_geoscaling', 'GEOSCALING_Password', 'Geoscaling.com Password', ''); - - _addDnsProviderField(s, 'dns_googledomains', 'GOOGLEDOMAINS_ACCESS_TOKEN', 'Google Domains Access Token', ''); - _addDnsProviderField(s, 'dns_googledomains', 'GOOGLEDOMAINS_ZONE', 'Google Domains Zone', ''); - - _addDnsProviderField(s, 'dns_he', 'HE_Username', 'dns.he.net Username', ''); - _addDnsProviderField(s, 'dns_he', 'HE_Password', 'dns.he.net Password', ''); - - _addDnsProviderField(s, 'dns_hetzner', 'HETZNER_Token', 'Hetzner Token', ''); - - _addDnsProviderField(s, 'dns_he', 'dns_hexonet', 'Hexonet.net Login', 'username!roleId'); - _addDnsProviderField(s, 'dns_he', 'dns_hexonet', 'Hexonet.net Password', ''); - - _addDnsProviderField(s, 'dns_huaweicloud', 'HUAWEICLOUD_Username', 'MyHuaweiCloud.com Username', ''); - _addDnsProviderField(s, 'dns_huaweicloud', 'HUAWEICLOUD_Password', 'MyHuaweiCloud.com Password', ''); - _addDnsProviderField(s, 'dns_huaweicloud', 'HUAWEICLOUD_DomainName', 'MyHuaweiCloud.com Domain Name', ''); - - _addDnsProviderField(s, 'dns_infomaniak', 'INFOMANIAK_API_TOKEN', 'InfoManiak Token', ''); - - _addDnsProviderField(s, 'dns_ipv64', 'IPv64_Token', 'ipv64.net Token', ''); - - _addDnsProviderField(s, 'dns_jd', 'JD_ACCESS_KEY_ID', 'JDCloud.com Access Key ID', ''); - _addDnsProviderField(s, 'dns_jd', 'JD_ACCESS_KEY_SECRET', 'JDCloud.com Access Key Secret', ''); - _addDnsProviderField(s, 'dns_jd', 'JD_REGION', 'JDCloud.com Region', 'cn-north-1'); - - _addDnsProviderField(s, 'dns_joker', 'JOKER_USERNAME', 'Joker.com User', ''); - _addDnsProviderField(s, 'dns_joker', 'JOKER_PASSWORD', 'Joker.com Password', ''); - - _addDnsProviderField(s, 'dns_freedns', 'FREEDNS_User', 'FreeDNS User', ''); - _addDnsProviderField(s, 'dns_freedns', 'FREEDNS_Password', 'FreeDNS Password', ''); - - _addDnsProviderField(s, 'dns_la', 'LA_Id', 'dns.la Id', ''); - _addDnsProviderField(s, 'dns_la', 'LA_Key', 'dns.la Key', ''); - - _addDnsProviderField(s, 'dns_linodev4', 'LINODE_V4_API_KEY', 'Linode API Key', ''); - - _addDnsProviderField(s, 'dns_loopia', 'LOOPIA_User', 'Loopia User', ''); - _addDnsProviderField(s, 'dns_loopia', 'LOOPIA_Password', 'Loopia Password', ''); - - _addDnsProviderField(s, 'dns_lua', 'LUA_Email', 'luadns.com email', ''); - _addDnsProviderField(s, 'dns_lua', 'LUA_Key', 'luadns.com Key', ''); - - _addDnsProviderField(s, 'dns_mydnsjp', 'MYDNSJP_MasterID', 'MyDNS.jp MasterID', ''); - _addDnsProviderField(s, 'dns_mydnsjp', 'MYDNSJP_Password', 'MyDNS.jp Password', ''); - - _addDnsProviderField(s, 'dns_me', 'ME_Key', 'DNSMadeEasy Key', ''); - _addDnsProviderField(s, 'dns_me', 'ME_Secret', 'DNSMadeEasy Secret', ''); - - _addDnsProviderField(s, 'dns_namecom', 'Namecom_Username', 'Name.com Username', ''); - _addDnsProviderField(s, 'dns_namecom', 'Namecom_Token', 'Name.com Token', ''); - - _addDnsProviderField(s, 'dns_namecheap', 'NAMECHEAP_API_KEY', 'NameCheap API Key', ''); - _addDnsProviderField(s, 'dns_namecheap', 'NAMECHEAP_USERNAME', 'NameCheap User', ''); - _addDnsProviderField(s, 'dns_namecheap', 'NAMECHEAP_SOURCEIP', 'NameCheap Source IP', ''); - - _addDnsProviderField(s, 'dns_nic', 'NIC_ClientID', 'Nic.ru ClientID', ''); - _addDnsProviderField(s, 'dns_nic', 'NIC_ClientSecret', 'Nic.ru ClientSecret', ''); - _addDnsProviderField(s, 'dns_nic', 'NIC_Username', 'Nic.ru Username', ''); - _addDnsProviderField(s, 'dns_nic', 'NIC_Password', 'Nic.ru Password', ''); - - _addDnsProviderField(s, 'dns_netlify', 'NETLIFY_ACCESS_TOKEN', 'Netlify Access Token', ''); - - _addDnsProviderField(s, 'dns_nsone', 'NS1_Key', 'nsone.net Key', ''); - - _addDnsProviderField(s, 'dns_nsupdate', 'NSUPDATE_SERVER', 'nsupdate server address', ''); - _addDnsProviderField(s, 'dns_nsupdate', 'NSUPDATE_SERVER_PORT', 'nsupdate server port', ''); - _addDnsProviderField(s, 'dns_nsupdate', 'NSUPDATE_KEY', 'nsupdate key file path', ''); - _addDnsProviderField(s, 'dns_nsupdate', 'NSUPDATE_ZONE', 'nsupdate zone', ''); - - _addDnsProviderField(s, 'dns_nsupdate', 'OCI_CLI_TENANCY', 'OCI Tenancy', - _('OCID of tenancy that contains the target DNS zone') - ); - _addDnsProviderField(s, 'dns_nsupdate', 'OCI_CLI_USER', 'OCI User', - _('OCID of user with permission to add/remove records from zones') - ); - _addDnsProviderField(s, 'dns_nsupdate', 'OCI_CLI_REGION', 'OCI Region', - _('Should point to the tenancy home region') - ); - _addDnsProviderField(s, 'dns_nsupdate', 'OCI_CLI_KEY_FILE', 'OCI Key file', - _('Path to private API signing key file in PEM format') - ); - _addDnsProviderField(s, 'dns_nsupdate', 'OCI_CLI_KEY', 'OCI Key', - _('The private API signing key in PEM format') - ); - - _addDnsProviderField(s, 'dns_ovh', 'OVH_AK', 'OVH Application Key', ''); - _addDnsProviderField(s, 'dns_ovh', 'OVH_AS', 'OVH Application Secret', ''); - _addDnsProviderField(s, 'dns_ovh', 'OVH_CK', 'OVH Consumer Key', ''); - _addDnsProviderField(s, 'dns_ovh', 'OVH_END_POINT', 'OVH Region/Endpoint', - 'ovh-eu, ovh-us, ovh-ca, kimsufi-eu, kimsufi-ca, soyoustart-eu, soyoustart-ca' - ); - - _addDnsProviderField(s, 'dns_pdns', 'PDNS_Url', 'PDNS API URL', ''); - _addDnsProviderField(s, 'dns_pdns', 'PDNS_ServerId', 'PDNS Server ID', ''); - _addDnsProviderField(s, 'dns_pdns', 'PDNS_Token', 'PDNS Token', ''); - _addDnsProviderField(s, 'dns_pdns', 'PDNS_Ttl', 'PDNS Default TTL', '60'); - - _addDnsProviderField(s, 'dns_porkbun', 'PORKBUN_API_KEY', 'Porkbun API Key', ''); - _addDnsProviderField(s, 'dns_porkbun', 'PORKBUN_SECRET_API_KEY', 'Porkbun API Secret', ''); - - _addDnsProviderField(s, 'dns_rackspace', 'RACKSPACE_Apikey', 'RackSpace API Key', ''); - _addDnsProviderField(s, 'dns_rackspace', 'RACKSPACE_Username', 'Porkbun Username', ''); - - _addDnsProviderField(s, 'dns_regru', 'REGRU_API_Username', 'reg.ru Username', ''); - _addDnsProviderField(s, 'dns_regru', 'REGRU_API_Password', 'reg.ru Password', ''); - - _addDnsProviderField(s, 'dns_selectel', 'SL_Key', 'Selectel API Key', ''); - - _addDnsProviderField(s, 'dns_selfhost', 'SELFHOSTDNS_USERNAME', 'SelfHost.de Username', ''); - _addDnsProviderField(s, 'dns_selfhost', 'SELFHOSTDNS_PASSWORD', 'SelfHost.de Password', ''); - _addDnsProviderField(s, 'dns_selfhost', 'SELFHOSTDNS_MAP', 'SelfHost.de Domains map', - _('E.g. _acme-challenge.example.com:12345:98765 alias.example.com:11111') - ); - - _addDnsProviderField(s, 'dns_simply', 'SIMPLY_AccountName', 'Simply.com account name', ''); - _addDnsProviderField(s, 'dns_simply', 'SIMPLY_ApiKey', 'Simply.com API Key', ''); - - _addDnsProviderField(s, 'dns_tele3', 'TELE3_Key', 'tele3.cz API Key', ''); - _addDnsProviderField(s, 'dns_tele3', 'TELE3_Secret', 'tele3.cz API Secret', ''); - - _addDnsProviderField(s, 'dns_vultr', 'VULTR_API_KEY', 'Vultr API Secret', ''); - - _addDnsProviderField(s, 'dns_vscale', 'VSCALE_API_KEY', 'vscale.io API Key', ''); - - _addDnsProviderField(s, 'dns_yandex', 'PDD_Token', 'Yandex DNS API Token', ''); - - _addDnsProviderField(s, 'dns_yandex', 'PDD_Token', 'Yandex DNS API Token', ''); - - _addDnsProviderField(s, 'dns_yc', 'YC_Zone_ID', 'Yandex Cloud: DNS Zone ID', ''); - _addDnsProviderField(s, 'dns_yc', 'YC_Folder_ID', 'Yandex Cloud: YC Folder ID', ''); - _addDnsProviderField(s, 'dns_yc', 'YC_SA_ID', 'Yandex Cloud: Service Account ID', ''); - _addDnsProviderField(s, 'dns_yc', 'YC_SA_Key_ID', 'Yandex Cloud: Service Account IAM Key ID', ''); - _addDnsProviderField(s, 'dns_yc', 'YC_SA_Key_File_Path', 'Yandex Cloud: Path to private key', ''); - _addDnsProviderField(s, 'dns_yc', 'YC_SA_Key_File_PEM_b64', 'Yandex Cloud: PEM of private key', - _('Base64 content of private key. Use instead of YC_SA_Key_File_Path') - ); - - _addDnsProviderField(s, 'dns_zilore', 'Zilore_Key', 'Zilore API Key', ''); - - _addDnsProviderField(s, 'dns_zone', 'ZONE_Username', 'Zone.ee Username', ''); - _addDnsProviderField(s, 'dns_zone', 'ZONE_Key', 'Zone.ee API Key', ''); - - _addDnsProviderField(s, 'dns_zonomi', 'ZM_Key', 'Zonomi.com API Key', ''); - + for (let info of apiInfos) { + for (let opt of info.Opts) { + _addDnsProviderField(s, info.Id, opt); + } + for (let opt of info.OptsAlt) { + _addDnsProviderField(s, info.Id, opt); + } + } o = s.taboption('challenge_dns', form.DynamicList, 'credentials', _('DNS API credentials'), _("The credentials for the DNS API mode selected above. " + @@ -531,14 +215,18 @@ return view.extend({ }); -function _addDnsProviderField(s, provider, env, title, desc) { - let o = s.taboption('challenge_dns', form.Value, '_credentials_' + env, _(title), - _(desc)); - o.depends('dns', provider); +function _addDnsProviderField(s, apiId, opt) { + let desc = '' + opt.Name + ' ' + opt.Description; + if (opt.Default) { + desc += '
' + _('Default') + ' ' + opt.Default + ''; + } + let o = s.taboption('challenge_dns', form.Value, '_credentials_' + opt.Name, opt.Title, desc); + o.depends('dns', apiId); o.modalonly = true; + o.placeholder = opt.Default; o.cfgvalue = function (section_id) { let creds = this.map.data.get(this.map.config, section_id, 'credentials'); - return _extractParamValue(creds, env); + return _extractParamValue(creds, opt.Name); }; o.write = function (section_id, value) { }; o.onchange = _handleEditChange; diff --git a/applications/luci-app-acme/htdocs/luci-static/resources/view/dnsapi.js b/applications/luci-app-acme/htdocs/luci-static/resources/view/dnsapi.js new file mode 100644 index 00000000000..abbfe8afb33 --- /dev/null +++ b/applications/luci-app-acme/htdocs/luci-static/resources/view/dnsapi.js @@ -0,0 +1,110 @@ +// See https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Structural-Info-description +class DnsApiInfo { + Id = ''; + Name = ''; + Domains = ''; + OptsTitle = ''; + Opts = []; + OptsAltTitle = ''; + OptsAlt = []; +} + +class DnsApiInfoOpt { + Name = ''; + Title = ''; + Description = ''; + Default = ''; +} + +function parseFile(infoFileText) { + let infoFileLines = infoFileText.split('\n'); + let infos = []; + let startIdx = 0; + for (let i = 1; i < infoFileLines.length; i++) { + if (infoFileLines[i] == '') { + if (i - startIdx > 2) { + let infoLines = infoFileLines.slice(startIdx, i); + let info = parseDnsApiInfoLines(infoLines); + infos.push(info); + } + startIdx = i + 1; + } + } + return infos; +} + +function parseDnsApiInfoLines(lines) { + let info = new DnsApiInfo(); + info.Id = lines.shift(); + info.Name = lines.shift(); + let optsField = getFieldVal(lines, 'Options:'); + let [optsTitle, opts] = parseOpts(optsField); + info.OptsTitle = optsTitle; + info.Opts = opts; + let optsAltField = getFieldVal(lines, 'OptionsAlt:'); + let [optsAltTitle, optsAlt] = parseOpts(optsAltField); + info.OptsAltTitle = optsAltTitle; + info.OptsAlt = optsAlt; + info.Domains = getFieldVal(lines, 'Domains:'); + return info; +} + +function parseOpts(options) { + let opts = []; + let optLines = options.split('\n'); + let optsTitle = optLines.shift(); + for (let optLine of optLines) { + let posName = optLine.indexOf(' '); + if (posName <= 0) { + continue; + } + let opt = new DnsApiInfoOpt(); + opt.Name = optLine.substring(0, posName); + let posTitle = optLine.indexOf('.'); + if (posTitle <= 0) { + opt.Title = optLine.substring(posName + 1); + } else { + opt.Title = optLine.substring(posName + 1, posTitle); + opt.Description = optLine.substring(posTitle); + let defaultPos = opt.Description.indexOf(' Default: "'); + if (defaultPos >= 0) { + let defaultPosEnd = opt.Description.indexOf('".', defaultPos + 1); + opt.Default = opt.Description.substring(defaultPos + ' Default: "'.length, defaultPosEnd); + opt.Description = opt.Description.substring(0, defaultPos); + } + if (opt.Description.startsWith('. ')) { + opt.Description = opt.Description.substring(2); + } else if (opt.Description == '.') { + opt.Description = ''; + } + } + opts.push(opt); + } + return [optsTitle, opts]; +} + +function getFieldVal(lines, fieldName) { + for (let i = 0; i < lines.length; i++) { + if (lines[i].startsWith(fieldName)) { + let firstVal = lines[i].substring(fieldName.length).trim(); + let nextLines = lines.slice(i + 1); + return fieldMultiLines(nextLines, firstVal); + } + } + return ''; +} + +function fieldMultiLines(lines, fieldVal) { + while (lines.length > 0) { + if (!lines[0].startsWith(' ')) { + break; + } + let line = lines.shift().trim(); + fieldVal += '\n' + line; + } + return fieldVal; +} + +return L.Class.extend({ + parseFile: parseFile, +}); diff --git a/applications/luci-app-acme/root/usr/share/acmesh/dnsapi.info.txt b/applications/luci-app-acme/root/usr/share/acmesh/dnsapi.info.txt new file mode 100644 index 00000000000..884cf5e1e33 --- /dev/null +++ b/applications/luci-app-acme/root/usr/share/acmesh/dnsapi.info.txt @@ -0,0 +1,906 @@ +dns_1984hosting +1984.hosting +Domains: 1984.is +Options: + One984HOSTING_Username Username + One984HOSTING_Password Password + +dns_acmedns +acme-dns Server API +Options: + ACMEDNS_USERNAME Username + ACMEDNS_PASSWORD Password + ACMEDNS_SUBDOMAIN Subdomain + ACMEDNS_BASE_URL API endpoint. Default: "https://auth.acme-dns.io". + +dns_acmeproxy +AcmeProxy Server API +Options: + ACMEPROXY_ENDPOINT API Endpoint + ACMEPROXY_USERNAME Username + ACMEPROXY_PASSWORD Password + +dns_active24 +Active24.com +Options: + ACTIVE24_Token API Token + +dns_ad +AlwaysData.com +Options: + AD_API_KEY API Key + +dns_ali +AlibabaCloud.com +Domains: Aliyun.com +Options: + Ali_Key API Key + Ali_Secret API Secret + +dns_alviy +Alviy.com +Options: + Alviy_token API token. Get it from the https://cloud.alviy.com/token + +dns_anx +Anexia.com CloudDNS +Options: + ANX_Token API Token + +dns_artfiles +ArtFiles.de +Options: + AF_API_USERNAME API Username + AF_API_PASSWORD API Password + +dns_arvan +ArvanCloud.ir +Options: + Arvan_Token API Token + +dns_aurora +versio.nl AuroraDNS +Domains: pcextreme.nl +Options: + AURORA_Key API Key + AURORA_Secret API Secret + +dns_autodns +InternetX autoDNS +Options: + AUTODNS_USER Username + AUTODNS_PASSWORD Password + AUTODNS_CONTEXT Context + +dns_aws +Amazon AWS Route53 domain API +Options: + AWS_ACCESS_KEY_ID API Key ID + AWS_SECRET_ACCESS_KEY API Secret + +dns_azion +Azion.om +Options: + AZION_Email Email + AZION_Password Password + +dns_azure +Azure +Options: + AZUREDNS_SUBSCRIPTIONID Subscription ID + AZUREDNS_TENANTID Tenant ID + AZUREDNS_APPID App ID. App ID of the service principal + AZUREDNS_CLIENTSECRET Client Secret. Secret from creating the service principal + AZUREDNS_MANAGEDIDENTITY Use Managed Identity. Use Managed Identity assigned to a resource instead of a service principal. "true"/"false" + AZUREDNS_BEARERTOKEN Bearer Token. Used instead of service principal credentials or managed identity + +dns_bookmyname +BookMyName.com +Options: + BOOKMYNAME_USERNAME Username + BOOKMYNAME_PASSWORD Password + +dns_bunny +Bunny.net +Options: + BUNNY_API_KEY API Key + +dns_cf +CloudFlare +Options: + CF_Key API Key + CF_Email Your account email +OptionsAlt: + CF_Token API Token + CF_Account_ID Account ID + CF_Zone_ID Zone ID + +dns_clouddns +vshosting.cz CloudDNS +Options: + CLOUDDNS_EMAIL Email + CLOUDDNS_PASSWORD Password + CLOUDDNS_CLIENT_ID Client ID + +dns_cloudns +ClouDNS.net +Options: + CLOUDNS_AUTH_ID Regular auth ID + CLOUDNS_SUB_AUTH_ID Sub auth ID + CLOUDNS_AUTH_PASSWORD Auth Password + +dns_cn +Core-Networks.de +Options: + CN_User User + CN_Password Password + +dns_conoha +ConoHa.jp +Domains: ConoHa.io +Options: + CONOHA_Username Username + CONOHA_Password Password + CONOHA_TenantId TenantId + CONOHA_IdentityServiceApi Identity Service API. E.g. "https://identity.xxxx.conoha.io/v2.0" + +dns_constellix +Constellix.com +Options: + CONSTELLIX_Key API Key + CONSTELLIX_Secret API Secret + +dns_cpanel +cPanel Server API +Options: + cPanel_Username Username + cPanel_Apitoken API Token + cPanel_Hostname Server URL. E.g. "https://hostname:port" + +dns_curanet +Curanet.dk +Domains: scannet.dk wannafind.dk dandomain.dk +Options: + CURANET_AUTHCLIENTID Auth ClientID. Requires scope dns + CURANET_AUTHSECRET Auth Secret + +dns_cyon +cyon.ch +Options: + CY_Username Username + CY_Password API Token + CY_OTP_Secret OTP token. Only required if using 2FA + +dns_da +DirectAdmin Server API +Options: + DA_Api API Server URL. E.g. "https://remoteUser:remotePassword@da.domain.tld:8443" + DA_Api_Insecure Insecure TLS. 0: check for cert validity, 1: always accept + +dns_ddnss +DDNSS.de +Options: + DDNSS_Token API Token + +dns_desec +deSEC.io +Options: + DDNSS_Token API Token + +dns_df +DynDnsFree.de +Domains: dynup.de +Options: + DF_user Username + DF_password Password + +dns_dgon +DigitalOcean.com +Options: + DO_API_KEY API Key + +dns_dnsexit +DNSExit.com +Options: + DNSEXIT_API_KEY API Key + DNSEXIT_AUTH_USER Username + DNSEXIT_AUTH_PASS Password + +dns_dnshome +dnsHome.de +Options: + DNSHOME_Subdomain Subdomain + DNSHOME_SubdomainPassword Subdomain Password + +dns_dnsimple +DNSimple.com +Options: + DNSimple_OAUTH_TOKEN OAuth Token + +dns_dnsservices +DNS.Services +Options: + DnsServices_Username Username + DnsServices_Password Password + +dns_doapi +Domain-Offensive do.de +Options: + DO_LETOKEN LetsEncrypt Token + +dns_domeneshop +DomeneShop.no +Options: + DOMENESHOP_Token Token + DOMENESHOP_Secret Secret + +dns_dpi +DNSPod.com +Options: + DPI_Id Id + DPI_Key Key + +dns_dp +DNSPod.cn +Options: + DP_Id Id + DP_Key Key + +dns_dreamhost +DreamHost.com +Options: + DH_API_KEY API Key + +dns_duckdns +DuckDNS.org +Options: + DuckDNS_Token API Token + +dns_durabledns +DurableDNS.com +Options: + DD_API_User API User + DD_API_Key API Key + +dns_dyn +Dyn.com +Domains: dynect.net +Options: + DYN_Customer Customer + DYN_Username API Username + DYN_Password Secret + +dns_dynu +Dynu.com +Options: + Dynu_ClientId Client ID + Dynu_Secret Secret + +dns_dynv6 +DynV6.com +Options: + DYNV6_TOKEN REST API token. Get from https://DynV6.com/keys +OptionsAlt: + KEY Path to SSH private key file. E.g. "/root/.ssh/dynv6" + +dns_easydns +easyDNS.net +Options: + EASYDNS_Token API Token + EASYDNS_Key API Key + +dns_edgedns +Akamai.com Edge DNS +Options: Specify individual credentials + AKAMAI_HOST Host + AKAMAI_ACCESS_TOKEN Access token + AKAMAI_CLIENT_TOKEN Client token + AKAMAI_CLIENT_SECRET Client secret + +dns_euserv +EUserv.com +Domains: EUserv.eu +Options: + EUSERV_Username Username + EUSERV_Password Password + +dns_exoscale +Exoscale.com +Options: + EXOSCALE_API_KEY API Key + EXOSCALE_SECRET_KEY API Secret key + +dns_fornex +Fornex.com +Options: + FORNEX_API_KEY API Key + +dns_freedns +FreeDNS +Options: + FREEDNS_User Username + FREEDNS_Password Password + +dns_gandi_livedns +Gandi.net LiveDNS +Options: + GANDI_LIVEDNS_KEY API Key + +dns_gcore +Gcore.com +Options: + GCORE_Key API Key + +dns_gd +GoDaddy.com +Options: + GD_Key API Key + GD_Secret API Secret + +dns_geoscaling +GeoScaling.com +Options: + GEOSCALING_Username Username. This is usually NOT an email address + GEOSCALING_Password Password + +dns_googledomains +Google Domains +Options: + GOOGLEDOMAINS_ACCESS_TOKEN API Access Token + GOOGLEDOMAINS_ZONE Zone + +dns_he +Hurricane Electric HE.net +Options: + HE_Username Username + HE_Password Password + +dns_hetzner +Hetzner.com +Options: + HETZNER_Token API Token + +dns_hexonet +Hexonet.com +Options: + Hexonet_Login Login. E.g. "username!roleId" + Hexonet_Password Role Password + +dns_hostingde +Hosting.de +Options: + HOSTINGDE_ENDPOINT Endpoint. E.g. "https://secure.hosting.de" + HOSTINGDE_APIKEY API Key + +dns_huaweicloud +HuaweiCloud.com +Options: + HUAWEICLOUD_Username Username + HUAWEICLOUD_Password Password + HUAWEICLOUD_DomainName DomainName + +dns_infoblox +Infoblox.com +Options: + Infoblox_Creds Credentials. E.g. "username:password" + Infoblox_Server Server hostname. IP or FQDN of infoblox appliance + +dns_infomaniak +Infomaniak.com +Options: + INFOMANIAK_API_TOKEN API Token + +dns_internetbs +InternetBS.net +Options: + INTERNETBS_API_KEY API Key + INTERNETBS_API_PASSWORD API Password + +dns_inwx +INWX.de +Options: + INWX_User Username + INWX_Password Password + +dns_ionos_cloud +IONOS Cloud DNS +Options: + IONOS_TOKEN API Token. + +dns_ionos +IONOS.de +Options: + IONOS_PREFIX Prefix + IONOS_SECRET Secret + +dns_ipv64 +IPv64.net +Options: + IPv64_Token API Token + +dns_ispconfig +ISPConfig Server API +Options: + ISPC_User Remote User + ISPC_Password Remote Password + ISPC_Api API URL. E.g. "https://ispc.domain.tld:8080/remote/json.php" + ISPC_Api_Insecure Insecure TLS. 0: check for cert validity, 1: always accept + +dns_jd +jdcloud.com +Options: + JD_ACCESS_KEY_ID Access key ID + JD_ACCESS_KEY_SECRET Access key secret + JD_REGION Region. E.g. "cn-north-1" + +dns_joker +Joker.com +Options: + JOKER_USERNAME Username + JOKER_PASSWORD Password + +dns_kappernet +kapper.net +Options: + KAPPERNETDNS_Key API Key + KAPPERNETDNS_Secret API Secret + +dns_kas +All-inkl Kas Server +Options: + KAS_Login API login name + KAS_Authtype API auth type. Default: "plain" + KAS_Authdata API auth data + +dns_kinghost +King.host +Domains: KingHost.net KingHost.com.br +Options: + KINGHOST_Username Username + KINGHOST_Password Password + +dns_knot +Knot Server knsupdate +Options: + KNOT_SERVER Server hostname. Default: "localhost". + KNOT_KEY File path to TSIG key + +dns_la +dns.la +Options: + LA_Id API ID + LA_Key API key + +dns_leaseweb +Leaseweb.com +Options: + LSW_Key API Key + +dns_limacity +lima-city.de +Options: + LIMACITY_APIKEY API Key. Note: The API Key must have following roles: dns.admin, domains.reader + +dns_linode +Linode.com (Old) +Options: + LINODE_API_KEY API Key + +dns_linode_v4 +Linode.com +Options: + LINODE_V4_API_KEY API Key + +dns_loopia +Loopia.se +Options: + LOOPIA_Api API URL. E.g. "https://api.loopia./RPCSERV" where the is one of: com, no, rs, se. Default: "se". + LOOPIA_User Username + LOOPIA_Password Password + +dns_lua +LuaDNS.com +Domains: LuaDNS.net +Options: + LUA_Key API key + LUA_Email Email + +dns_me +DnsMadeEasy.com +Options: + ME_Key API Key + ME_Secret API Secret + +dns_miab +Mail-in-a-Box +Options: + MIAB_Username Admin username + MIAB_Password Admin password + MIAB_Server Server hostname. FQDN of your_MIAB Server + +dns_misaka +Misaka.io +Options: + Misaka_Key API Key + +dns_mydevil +MyDevil.net + +dns_mydnsjp +MyDNS.JP +Options: + MYDNSJP_MasterID Master ID + MYDNSJP_Password Password + +dns_mythic_beasts +Mythic-Beasts.com +Options: + MB_AK API Key + MB_AS API Secret + +dns_namecheap +NameCheap.com +Options: + NAMECHEAP_API_KEY API Key + NAMECHEAP_USERNAME Username + NAMECHEAP_SOURCEIP Source IP + +dns_namecom +Name.com +Options: + Namecom_Username Username + Namecom_Token API Token + +dns_namesilo +NameSilo.com +Options: + Namesilo_Key API Key + +dns_nanelo +Nanelo.com +Options: + NANELO_TOKEN API Token + +dns_nederhost +NederHost.nl +Options: + NederHost_Key API Key + +dns_neodigit +Neodigit.net +Options: + NEODIGIT_API_TOKEN API Token + +dns_netcup +netcup.eu +Domains: netcup.de netcup.net +Options: + NC_Apikey API Key + NC_Apipw API Password + NC_CID Customer Number + +dns_netlify +Netlify.com +Options: + NETLIFY_ACCESS_TOKEN API Token + +dns_nic +nic.ru +Options: + NIC_ClientID Client ID + NIC_ClientSecret Client Secret + NIC_Username Username + NIC_Password Password + +dns_njalla +Njalla +Options: + NJALLA_Token API Token + +dns_nm +NameMaster.de +Options: + NM_user API Username + NM_sha256 API Password as SHA256 hash + +dns_nsone +ns1.com +Domains: ns1.net +Options: + NS1_Key API Key + +dns_nsupdate +nsupdate RFC 2136 DynDNS client +Options: + NSUPDATE_SERVER Server hostname. Default: "localhost". + NSUPDATE_SERVER_PORT Server port. Default: "53". + NSUPDATE_KEY File path to TSIG key. + NSUPDATE_ZONE Domain zone to update + +dns_nw +Nexcess.net (NocWorx) +Domains: Thermo.io Futurehosting.com +Options: + NW_API_TOKEN API Token + NW_API_ENDPOINT API Endpoint. Default: "https://portal.nexcess.net". + +dns_oci +Oracle Cloud Infrastructure (OCI) + If OCI CLI configuration file ~/.oci/config has a DEFAULT profile then it will be used. +Options: + OCI_CLI_TENANCY OCID of tenancy that contains the target DNS zone + OCI_CLI_USER OCID of user with permission to add/remove records from zones + OCI_CLI_REGION Should point to the tenancy home region + OCI_CLI_KEY_FILE Path to private API signing key file in PEM format + OCI_CLI_KEY The private API signing key in PEM format + +dns_omglol +omg.lol +Options: + OMG_ApiKey API Key. This is accessible from the bottom of the account page at https://home.omg.lol/account + OMG_Address Address. This is your omg_lol address, without the preceding @ - you can see your list on your dashboard at https://home.omg.lol/dashboard + +dns_one +one.com +Options: + ONECOM_User Username + ONECOM_Password Password + +dns_online +online.net +Domains: scaleway.com +Options: + ONLINE_API_KEY API Key + +dns_openprovider +OpenProvider.eu +Domains: OpenProvider.com +Options: + OPENPROVIDER_USER Username + OPENPROVIDER_PASSWORDHASH Password hash + +dns_opnsense +OPNsense Server +Options: + OPNs_Host Server Hostname. E.g. "opnsense.example.com" + OPNs_Port Port. Default: "443". + OPNs_Key API Key + OPNs_Token API Token + OPNs_Api_Insecure Insecure TLS. 0: check for cert validity, 1: always accept + +dns_ovh +OVH.com +Domains: kimsufi.com soyoustart.com +Options: + OVH_END_POINT Endpoint. "ovh-eu", "ovh-us", "ovh-ca", "kimsufi-eu", "kimsufi-ca", "soyoustart-eu", "soyoustart-ca" or raw URL. Default: "ovh-eu". + OVH_AK Application Key + OVH_AS Application Secret + OVH_CK Consumer Key + +dns_pdns +PowerDNS Server API +Options: + PDNS_Url API URL. E.g. "http://ns.example.com:8081" + PDNS_ServerId Server ID. E.g. "localhost" + PDNS_Token API Token + PDNS_Ttl Domain TTL. Default: "60". + +dns_pleskxml +Plesk Server API +Options: + pleskxml_uri Plesk server API URL. E.g. "https://your-plesk-server.net:8443/enterprise/control/agent.php" + pleskxml_user Username + pleskxml_pass Password + +dns_pointhq +pointhq.com PointDNS +Options: + PointHQ_Key API Key + PointHQ_Email Email + +dns_porkbun +Porkbun.com +Options: + PORKBUN_API_KEY API Key + PORKBUN_SECRET_API_KEY API Secret + +dns_rackcorp +RackCorp.com +Options: + RACKCORP_APIUUID API UUID. See Portal: ADMINISTRATION -> API + RACKCORP_APISECRET API Secret + +dns_rackspace +RackSpace.com +Options: + RACKSPACE_Apikey API Key + RACKSPACE_Username Username + +dns_rage4 +rage4.com +Options: + RAGE4_TOKEN API Key + RAGE4_USERNAME Username + +dns_rcode0 +Rcode0 rcodezero.at +Options: + RCODE0_URL API URL. E.g. "https://my.rcodezero.at" + RCODE0_API_TOKEN API Token + RCODE0_TTL TTL. Default: "60". + +dns_regru +reg.ru +Options: + REGRU_API_Username Username + REGRU_API_Password Password + +dns_scaleway +ScaleWay.com +Options: + SCALEWAY_API_TOKEN API Token + +dns_schlundtech +SchlundTech.de +Options: + SCHLUNDTECH_USER Username + SCHLUNDTECH_PASSWORD Password + +dns_selectel +Selectel.com +Domains: Selectel.ru +Options: + SL_Key API Key + +dns_selfhost +SelfHost.de +Options: + SELFHOSTDNS_USERNAME Username + SELFHOSTDNS_PASSWORD Password + SELFHOSTDNS_MAP Subdomain name + +dns_servercow +ServerCow.de +Options: + SERVERCOW_API_Username Username + SERVERCOW_API_Password Password + +dns_simply +Simply.com +Options: + SIMPLY_AccountName Account name + SIMPLY_ApiKey API Key + +dns_technitium +Technitium DNS Server +Options: + Technitium_Server Server Address + Technitium_Token API Token + +dns_tele3 +tele3.cz +Options: + TELE3_Key API Key + TELE3_Secret API Secret + +dns_tencent +Tencent.com +Options: + Tencent_SecretId Secret ID + Tencent_SecretKey Secret Key + +dns_timeweb +Timeweb.Cloud +Options: + TW_Token API JWT token. Get it from the control panel at https://timeweb.cloud/my/api-keys + +dns_transip +TransIP.nl +Options: + TRANSIP_Username Username + TRANSIP_Key_File Private key file path + +dns_udr +united-domains Reselling +Options: + UDR_USER Username + UDR_PASS Password + +dns_ultra +UltraDNS.com +Options: + ULTRA_USR Username + ULTRA_PWD Password + +dns_unoeuro +unoeuro.com + Deprecated. The unoeuro.com is now simply.com +Options: + UNO_Key API Key + UNO_User Username + +dns_variomedia +variomedia.de +Options: + VARIOMEDIA_API_TOKEN API Token + +dns_veesp +veesp.com +Options: + VEESP_User Username + VEESP_Password Password + +dns_vercel +Vercel.com +Options: + VERCEL_TOKEN API Token + +dns_vscale +vscale.io +Options: + VSCALE_API_KEY API Key + +dns_vultr +vultr.com +Options: + VULTR_API_KEY API Key + +dns_websupport +Websupport.sk +Options: + WS_ApiKey API Key. Called "Identifier" in the WS Admin + WS_ApiSecret API Secret. Called "Secret key" in the WS Admin + +dns_west_cn +West.cn +Options: + WEST_Username API username + WEST_Key API Key. Set at https://www.west.cn/manager/API/APIconfig.asp + +dns_world4you +World4You.com +Options: + WORLD4YOU_USERNAME Username + WORLD4YOU_PASSWORD Password + +dns_yandex360 +Yandex 360 for Business DNS API. + Yandex 360 for Business is a digital environment for effective collaboration. +Options: + YANDEX360_CLIENT_ID OAuth 2.0 ClientID + YANDEX360_CLIENT_SECRET OAuth 2.0 Client secret +OptionsAlt: + YANDEX360_ORG_ID Organization ID + YANDEX360_ACCESS_TOKEN OAuth 2.0 Access token + +dns_yc +Yandex Cloud DNS +Options: + YC_Zone_ID DNS Zone ID + YC_Folder_ID YC Folder ID + YC_SA_ID Service Account ID + YC_SA_Key_ID Service Account IAM Key ID + YC_SA_Key_File_Path Private key file path + YC_SA_Key_File_PEM_b64 Base64 content of private key file. Use instead of Path to private key file + +dns_zilore +Zilore.com +Options: + Zilore_Key API Key + +dns_zoneedit +ZoneEdit.com +Options: + ZONEEDIT_ID ID + ZONEEDIT_Token API Token + +dns_zone +Zone.eu +Options: + ZONE_Username Username + ZONE_Key API Key + +dns_zonomi +zonomi.com +Options: + ZM_Key API Key diff --git a/applications/luci-app-acme/root/usr/share/rpcd/acl.d/luci-app-acme.json b/applications/luci-app-acme/root/usr/share/rpcd/acl.d/luci-app-acme.json index bf99dd57458..b6b5905806a 100644 --- a/applications/luci-app-acme/root/usr/share/rpcd/acl.d/luci-app-acme.json +++ b/applications/luci-app-acme/root/usr/share/rpcd/acl.d/luci-app-acme.json @@ -3,7 +3,8 @@ "description": "Grant UCI access for luci-app-acme", "read": { "file": { - "/etc/ssl/acme": [ "list" ] + "/etc/ssl/acme": [ "list" ], + "/usr/share/acmesh/dnsapi.info.txt": [ "read" ] }, "uci": [ "acme" ] },