mirror of https://github.com/certd/certd
chore:
parent
4ea3edd59e
commit
3681d89a61
|
@ -264,6 +264,7 @@ module.exports = async (client, userOpts) => {
|
||||||
finally {
|
finally {
|
||||||
if (client.opts.sslProvider !== 'google') {
|
if (client.opts.sslProvider !== 'google') {
|
||||||
// letsencrypt 如果同时检出两个TXT记录,会以第一个为准,就会校验失败,所以需要提前删除
|
// letsencrypt 如果同时检出两个TXT记录,会以第一个为准,就会校验失败,所以需要提前删除
|
||||||
|
// zerossl 此方式测试无问题
|
||||||
log(`清理challenge痕迹,length:${clearTasks.length}`);
|
log(`清理challenge痕迹,length:${clearTasks.length}`);
|
||||||
try {
|
try {
|
||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
|
@ -279,7 +280,11 @@ module.exports = async (client, userOpts) => {
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (client.opts.sslProvider === 'google') {
|
if (client.opts.sslProvider === 'google') {
|
||||||
// google 相同的域名txt记录是一样的,不能提前删除,否则校验失败
|
// google 相同的域名txt记录是一样的,不能提前删除,否则校验失败,报错如下
|
||||||
|
// Error: The TXT record retrieved from _acme-challenge.bbc.handsfree.work.
|
||||||
|
// at the time the challenge was validated did not contain JshHVu7dt_DT6uYILWhokHefFVad2Q6Mw1L-fNZFcq8
|
||||||
|
// (the base64url-encoded SHA-256 digest of RlJZNBR0LWnxNK_xd2zqtYVvCiNJOKJ3J1NmCjU_9BjaUJgL3k-qSpIhQ-uF4FBS.NRyqT8fRiq6THzzrvkgzgR5Xai2LsA2SyGLAq_wT3qc).
|
||||||
|
// See https://tools.ietf.org/html/rfc8555#section-8.4 for more information.
|
||||||
log(`清理challenge痕迹,length:${clearTasks.length}`);
|
log(`清理challenge痕迹,length:${clearTasks.length}`);
|
||||||
try {
|
try {
|
||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
|
|
|
@ -90,9 +90,9 @@ export class AcmeService {
|
||||||
|
|
||||||
async getAcmeClient(email: string, isTest = false): Promise<acme.Client> {
|
async getAcmeClient(email: string, isTest = false): Promise<acme.Client> {
|
||||||
const mappings = {};
|
const mappings = {};
|
||||||
if (this.sslProvider === "google") {
|
if (this.sslProvider === "letsencrypt") {
|
||||||
mappings["acme-v02.api.letsencrypt.org"] = this.options.reverseProxy || "le.px.certd.handfree.work";
|
mappings["acme-v02.api.letsencrypt.org"] = this.options.reverseProxy || "le.px.certd.handfree.work";
|
||||||
} else if (this.sslProvider === "letsencrypt") {
|
} else if (this.sslProvider === "google") {
|
||||||
mappings["dv.acme-v02.api.pki.goog"] = this.options.reverseProxy || "gg.px.certd.handfree.work";
|
mappings["dv.acme-v02.api.pki.goog"] = this.options.reverseProxy || "gg.px.certd.handfree.work";
|
||||||
}
|
}
|
||||||
const urlMapping: UrlMapping = {
|
const urlMapping: UrlMapping = {
|
||||||
|
|
|
@ -3,8 +3,10 @@ import { request } from "/src/api/service";
|
||||||
const apiPrefix = "/cname/record";
|
const apiPrefix = "/cname/record";
|
||||||
|
|
||||||
export type CnameRecord = {
|
export type CnameRecord = {
|
||||||
id: number;
|
id?: number;
|
||||||
status: string;
|
status?: string;
|
||||||
|
hostRecord?: string;
|
||||||
|
recordValue?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function GetList() {
|
export async function GetList() {
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<td class="host-record" :title="'域名:' + props.domain">
|
<td class="host-record" :title="'域名:' + props.domain">
|
||||||
<fs-copyable v-model="cnameRecord.hostRecord"></fs-copyable>
|
<fs-copyable v-model="cnameRecord.hostRecord"></fs-copyable>
|
||||||
</td>
|
</td>
|
||||||
|
<td style="text-align: center">CNAME</td>
|
||||||
<td class="record-value">
|
<td class="record-value">
|
||||||
<fs-copyable v-model="cnameRecord.recordValue"></fs-copyable>
|
<fs-copyable v-model="cnameRecord.recordValue"></fs-copyable>
|
||||||
</td>
|
</td>
|
||||||
|
@ -44,10 +45,12 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
change: {
|
change: [
|
||||||
id: number | null;
|
{
|
||||||
status: string | null;
|
id: number | null;
|
||||||
};
|
status: string | null;
|
||||||
|
}
|
||||||
|
];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const cnameRecord = ref<CnameRecord | null>(null);
|
const cnameRecord = ref<CnameRecord | null>(null);
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 160px">主机记录</td>
|
<td style="width: 160px">主机记录</td>
|
||||||
|
<td style="width: 100px; text-align: center">记录类型</td>
|
||||||
<td style="width: 250px">请设置CNAME记录(验证成功以后不要删除)</td>
|
<td style="width: 250px">请设置CNAME记录(验证成功以后不要删除)</td>
|
||||||
<td style="width: 120px" class="center">状态</td>
|
<td style="width: 120px" class="center">状态</td>
|
||||||
<td style="width: 80px" class="center">操作</td>
|
<td style="width: 80px" class="center">操作</td>
|
||||||
|
|
Loading…
Reference in New Issue