feat: custom domain management, config and notification fixes, and VPS auto-renewal rollover

This commit is contained in:
Bot
2026-09-01 23:45:21 +08:00
parent 00f5777112
commit 3d2b27f4ec
30 changed files with 610 additions and 359 deletions
+24 -9
View File
@@ -119,17 +119,32 @@ func (provider *Provider) splitDomainSOA(ctx context.Context, domain string) (pr
continue
}
if len(r.Answer) > 0 {
if soa, ok := r.Answer[0].(*dns.SOA); ok {
zone := soa.Hdr.Name
prefix := libdns.RelativeName(domain, zone)
// Convert "@" to empty string for zone apex
if prefix == "@" {
prefix = ""
}
return prefix, zone, nil
var soaRecord *dns.SOA
for _, ans := range r.Answer {
if soa, ok := ans.(*dns.SOA); ok {
soaRecord = soa
break
}
}
if soaRecord == nil {
for _, ns := range r.Ns {
if soa, ok := ns.(*dns.SOA); ok {
soaRecord = soa
break
}
}
}
if soaRecord != nil {
zone := soaRecord.Hdr.Name
prefix := libdns.RelativeName(domain, zone)
// Convert "@" to empty string for zone apex
if prefix == "@" {
prefix = ""
}
return prefix, zone, nil
}
}
}