perf: ipv6支持

This commit is contained in:
xiaojunnuo
2024-11-13 23:37:35 +08:00
parent a38ff69cbd
commit da6ac1626b
4 changed files with 16 additions and 0 deletions
@@ -30,6 +30,7 @@ export class SysPrivateSettings extends BaseSettings {
httpsProxy? = '';
httpProxy? = '';
dnsResultOrder? = '';
removeSecret() {
const clone = cloneDeep(this);
@@ -7,6 +7,7 @@ import { BaseSettings, SysInstallInfo, SysPrivateSettings, SysPublicSettings, Sy
import * as _ from 'lodash-es';
import { BaseService } from '../../../basic/index.js';
import { logger, setGlobalProxy } from '@certd/basic';
import * as dns from 'node:dns';
/**
* 设置
*/
@@ -131,6 +132,10 @@ export class SysSettingsService extends BaseService<SysSettingsEntity> {
httpsProxy: bean.httpsProxy,
};
setGlobalProxy(opts);
if (bean.dnsResultOrder) {
dns.setDefaultResultOrder(bean.dnsResultOrder as any);
}
}
async updateByKey(key: string, setting: any) {