fix: 修复中文域名使用cname方式校验无法通过的问题

This commit is contained in:
xiaojunnuo
2025-06-05 11:25:16 +08:00
parent 6ff509d263
commit f7d5baa6d0
11 changed files with 85 additions and 16 deletions
@@ -29,9 +29,25 @@ export type DnsProviderContext = {
export interface IDnsProvider<T = any> {
onInstance(): Promise<void>;
/**
* 中文转英文
* @param domain
*/
punyCodeEncode(domain: string): string;
/**
* 转中文域名
* @param domain
*/
punyCodeDecode(domain: string): string;
createRecord(options: CreateRecordOptions): Promise<T>;
removeRecord(options: RemoveRecordOptions<T>): Promise<void>;
setCtx(ctx: DnsProviderContext): void;
//中文域名是否需要punycode转码,如果返回True,则使用punycode来添加解析记录,否则使用中文域名添加解析记录
usePunyCode(): boolean;
}