File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function parseVersion (version) {
14
14
* @param log 日志对象
15
15
* @returns {number } 比较线上版本号是否为更新的版本,大于0=是|0=相等|小于0=否|-999=出现异常,比较结果未知
16
16
*/
17
- export function isNewVersion ( onlineVersion , currentVersion , log = console ) {
17
+ export function isNewVersion ( onlineVersion , currentVersion , log = null ) {
18
18
if ( onlineVersion === currentVersion ) {
19
19
return 0
20
20
}
Original file line number Diff line number Diff line change @@ -111,6 +111,14 @@ console.log('\n--------------- test ForSNI ---------------\n')
111
111
console . log ( `===> test ForSNI: ${ dnsProviders . ForSNI . dnsName } ` , '\n\n' )
112
112
assert . strictEqual ( dnsProviders . ForSNI , dnsProviders . safe360 )
113
113
114
+ const dnsProviders2 = dns . initDNS ( {
115
+ aliyun : {
116
+ server : 'udp://223.5.5.5' ,
117
+ } ,
118
+ } , { } )
119
+ console . log ( `===> test ForSNI2: ${ dnsProviders2 . ForSNI . dnsName } ` , '\n\n' )
120
+ assert . strictEqual ( dnsProviders2 . ForSNI , dnsProviders2 . PreSet ) // 未配置forSNI的DNS时,默认使用PreSet作为ForSNI
121
+
114
122
115
123
console . log ( '\n--------------- test PreSet ---------------\n' )
116
124
ip = await dnsProviders . PreSet . lookup ( hasPresetHostname )
You can’t perform that action at this time.
0 commit comments