mirror of
https://github.com/certd/certd.git
synced 2026-04-29 08:47:24 +08:00
perf: 优化权威域名服务器查询超时时长
This commit is contained in:
@@ -92,7 +92,6 @@ async function walkDnsChallengeRecord(recordName, resolver = dns,deep = 0) {
|
|||||||
try {
|
try {
|
||||||
log(`检查域名 ${recordName} 的TXT记录`);
|
log(`检查域名 ${recordName} 的TXT记录`);
|
||||||
const txtRecords = await resolver.resolveTxt(recordName);
|
const txtRecords = await resolver.resolveTxt(recordName);
|
||||||
|
|
||||||
if (txtRecords && txtRecords.length) {
|
if (txtRecords && txtRecords.length) {
|
||||||
log(`找到 ${txtRecords.length} 条 TXT记录( ${recordName})`);
|
log(`找到 ${txtRecords.length} 条 TXT记录( ${recordName})`);
|
||||||
log(`TXT records: ${JSON.stringify(txtRecords)}`);
|
log(`TXT records: ${JSON.stringify(txtRecords)}`);
|
||||||
@@ -149,6 +148,7 @@ async function walkDnsChallengeRecord(recordName, resolver = dns,deep = 0) {
|
|||||||
/* Authoritative DNS resolver */
|
/* Authoritative DNS resolver */
|
||||||
log(`从域名权威服务器获取TXT解析记录`);
|
log(`从域名权威服务器获取TXT解析记录`);
|
||||||
const authoritativeResolver = await util.getAuthoritativeDnsResolver(recordName,log);
|
const authoritativeResolver = await util.getAuthoritativeDnsResolver(recordName,log);
|
||||||
|
resolver.setTimeout(10000);
|
||||||
const res = await walkDnsChallengeRecord(recordName, authoritativeResolver,deep);
|
const res = await walkDnsChallengeRecord(recordName, authoritativeResolver,deep);
|
||||||
if (res && res.length > 0) {
|
if (res && res.length > 0) {
|
||||||
for (const item of res) {
|
for (const item of res) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import GroupSelector from "/@/views/certd/pipeline/group/group-selector.vue";
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { fillPipelineByDefaultForm } from "/@/views/certd/pipeline/certd-form/use";
|
import { fillPipelineByDefaultForm } from "/@/views/certd/pipeline/certd-form/use";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
import { useI18n } from "vue-i18n";
|
import { $t } from "/@/locales";
|
||||||
|
|
||||||
export function createExtraColumns() {
|
export function createExtraColumns() {
|
||||||
const groupDictRef = dict({
|
const groupDictRef = dict({
|
||||||
@@ -15,7 +15,7 @@ export function createExtraColumns() {
|
|||||||
value: "id",
|
value: "id",
|
||||||
label: "name",
|
label: "name",
|
||||||
});
|
});
|
||||||
const { t } = useI18n();
|
const t = $t;
|
||||||
const randomHour = Math.floor(Math.random() * 6);
|
const randomHour = Math.floor(Math.random() * 6);
|
||||||
const randomMin = Math.floor(Math.random() * 60);
|
const randomMin = Math.floor(Math.random() * 60);
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user