mirror of https://github.com/certd/certd
chore: 增加dns地址配置
parent
4404f99642
commit
d86fc9569a
|
@ -11,6 +11,12 @@ services:
|
||||||
ports: # 端口映射
|
ports: # 端口映射
|
||||||
# ↓↓↓↓ ----------------------------------------------------------3、如果端口有冲突,可以修改第一个7001为其他不冲突的端口号【可选】
|
# ↓↓↓↓ ----------------------------------------------------------3、如果端口有冲突,可以修改第一个7001为其他不冲突的端口号【可选】
|
||||||
- "7001:7001"
|
- "7001:7001"
|
||||||
|
dns:
|
||||||
|
# 如果出现getaddrinfo ENOTFOUND等错误,可以尝试修改或注释dns配置
|
||||||
|
- 223.5.5.5
|
||||||
|
- 223.6.6.6
|
||||||
|
- 8.8.8.8
|
||||||
|
- 8.8.4.4
|
||||||
environment: # 环境变量
|
environment: # 环境变量
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
- certd_system_resetAdminPassword=false
|
- certd_system_resetAdminPassword=false
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import { Autowire, HttpClient, ILogger } from '@certd/pipeline';
|
import { Autowire, HttpClient, ILogger } from '@certd/pipeline';
|
||||||
import {
|
import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from '@certd/plugin-cert';
|
||||||
AbstractDnsProvider,
|
|
||||||
CreateRecordOptions,
|
|
||||||
IsDnsProvider,
|
|
||||||
RemoveRecordOptions,
|
|
||||||
} from '@certd/plugin-cert';
|
|
||||||
import * as _ from 'lodash-es';
|
import * as _ from 'lodash-es';
|
||||||
import { DnspodAccess } from '../access/index.js';
|
import { DnspodAccess } from '../access/index.js';
|
||||||
|
|
||||||
|
@ -50,9 +45,7 @@ export class DnspodDnsProvider extends AbstractDnsProvider {
|
||||||
if (!ret || !ret.status) {
|
if (!ret || !ret.status) {
|
||||||
const code = ret.status.code;
|
const code = ret.status.code;
|
||||||
if (code !== '1' || !successCodes.includes(code)) {
|
if (code !== '1' || !successCodes.includes(code)) {
|
||||||
throw new Error(
|
throw new Error('请求失败:' + ret.status.message + ',api=' + config.url);
|
||||||
'请求失败:' + ret.status.message + ',api=' + config.url
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -87,12 +80,7 @@ export class DnspodDnsProvider extends AbstractDnsProvider {
|
||||||
},
|
},
|
||||||
['104']
|
['104']
|
||||||
); // 104错误码为记录已存在,无需再次添加
|
); // 104错误码为记录已存在,无需再次添加
|
||||||
this.logger.info(
|
this.logger.info('添加域名解析成功:', fullRecord, value, JSON.stringify(ret.record));
|
||||||
'添加域名解析成功:',
|
|
||||||
fullRecord,
|
|
||||||
value,
|
|
||||||
JSON.stringify(ret.record)
|
|
||||||
);
|
|
||||||
return ret.record;
|
return ret.record;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue