Skip to content

[CLOUD-31] Add acme.sh OpusDNS provider#6760

Merged
neilpang merged 11 commits intoacmesh-official:devfrom
OpusDNS:add-opusdns-provider
Jan 24, 2026
Merged

[CLOUD-31] Add acme.sh OpusDNS provider#6760
neilpang merged 11 commits intoacmesh-official:devfrom
OpusDNS:add-opusdns-provider

Conversation

@discostur
Copy link

@discostur discostur commented Jan 22, 2026

Add OpusDNS DNS API support

Description

Adds DNS API support for OpusDNS, a modern DNS management platform.

DNS Provider Information

Features

  • ✅ DNS-01 ACME challenge support
  • ✅ Wildcard certificate support (multiple TXT records)
  • ✅ Support for custom API endpoints (production/sandbox)

Usage

export OPUSDNS_API_Key="opk_..."

# Issue a certificate
acme.sh --issue --dns dns_opusdns -d example.com -d "*.example.com"

# Optional configuration
export OPUSDNS_API_Endpoint="https://api.opusdns.com"  # default
export OPUSDNS_TTL=60                                   # default

Checklist

  • DNS API script follows naming convention (dns_opusdns.sh)
  • Structural info description included
  • Both add and remove functions implemented
  • Uses _saveaccountconf_mutable for credential storage
  • Zone detection via API implemented
  • No use of curl, wget, or awk
  • Wildcard certificate support verified
  • Tested with Let's Encrypt staging

@github-actions
Copy link

Welcome
READ ME !!!!!
Read me !!!!!!
First thing: don't send PR to the master branch, please send to the dev branch instead.
Please read the DNS API Dev Guide.
You MUST pass the DNS-API-Test.
Then reply on this message, otherwise, your code will not be reviewed or merged.
Please also make sure to add/update the usage here: https://github.com/acmesh-official/acme.sh/wiki/dnsapi2
注意: 必须通过了 DNS-API-Test 才会被 review. 无论是修改, 还是新加的 dns api, 都必须确保通过这个测试.

@discostur discostur changed the base branch from master to dev January 22, 2026 15:52
- Add double quotes around variables to prevent globbing
- Fix parameter expansion quoting in ${domain%.${_zone}}
- Remove trailing whitespace for shfmt compliance
@discostur
Copy link
Author

acme.sh handles DNS propagation checking internally via --dnssleep
and _check_dns_record. Custom propagation checks are unnecessary
and can conflict with acme.sh's own timing.

Removed:
- _opusdns_wait_for_propagation() function
- OPUSDNS_Polling_Interval option
- OPUSDNS_Propagation_Timeout option

Script is now consistent with other DNS API implementations
(Cloudflare, AWS, etc.) which don't have custom propagation checks.
- Fixed jq path: .pagination.has_next_page instead of .has_next_page
- Fixed grep fallback: remove rrsets before extracting zone names
  to avoid matching nested 'name' fields
- Simplified has_next_page detection with simple grep -q
- Added debug output for page zones and has_next status
Instead of fetching all zones and matching, iterate through domain
parts and check each against the API until a valid zone is found.
Same approach as GoDaddy DNS plugin.

Example: _acme-challenge.test.example.com
- Try: test.example.com → 404
- Try: example.com → 200 ✓ → zone found!

Script reduced from 304 to 255 lines.
- Added _opusdns_api() for all API requests
- Added _opusdns_init() for config initialization
- Removed duplicate code in add/rm functions
- Removed dead code (orphaned lines 173-178)
- Script now 158 lines (was 255, originally 379)
The error response also contains 'name' in 'zone_name' field,
causing false positives. Check for 'dnssec_status' which only
exists in valid zone responses.
@discostur discostur force-pushed the add-opusdns-provider branch from 96e513d to 2e85e6f Compare January 22, 2026 17:33
@discostur
Copy link
Author

@discostur
Copy link
Author

Seems like the shellcheck failure is coming from the main script acme.sh and not from my changes ...

@neilpang neilpang merged commit d8053ed into acmesh-official:dev Jan 24, 2026
14 of 15 checks passed
@discostur discostur deleted the add-opusdns-provider branch January 26, 2026 09:25
@Wereally1
Copy link

Application for the job, sine boot root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants