diff --git a/app/lib/DnsHelper.php b/app/lib/DnsHelper.php index 831b1c7..073f25d 100644 --- a/app/lib/DnsHelper.php +++ b/app/lib/DnsHelper.php @@ -126,6 +126,7 @@ class DnsHelper 'huoshan' => ['DEF' => 'default', 'CT' => 'telecom', 'CU' => 'unicom', 'CM' => 'mobile', 'AB' => 'oversea'], 'baidu' => ['DEF' => 'default', 'CT' => 'ct', 'CU' => 'cnc', 'CM' => 'cmnet', 'AB' => ''], 'cloudflare' => ['DEF' => '0'], + 'namesilo' => ['DEF' => '0'], ]; public static function getList() diff --git a/app/utils/CertDnsUtils.php b/app/utils/CertDnsUtils.php index dd7621a..f1f951b 100644 --- a/app/utils/CertDnsUtils.php +++ b/app/utils/CertDnsUtils.php @@ -70,7 +70,8 @@ class CertDnsUtils } } - $res = $dns->addDomainRecord($row['name'], $row['type'], $row['value'], DnsHelper::$line_name[$drow['type']]['DEF'], 600); + $ttl = $drow['type'] == 'namesilo' ? 3600 : 600; + $res = $dns->addDomainRecord($row['name'], $row['type'], $row['value'], DnsHelper::$line_name[$drow['type']]['DEF'], $ttl); if (!$res && $row['type'] != 'CAA') throw new Exception('添加'.$domain.'解析记录失败,' . $dns->getError()); $log('Add DNS Record: '.$domain.' '.$row['type'].' '.$row['value']); }