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) {
1414 * @param log 日志对象
1515 * @returns {number } 比较线上版本号是否为更新的版本,大于0=是|0=相等|小于0=否|-999=出现异常,比较结果未知
1616 */
17- export function isNewVersion ( onlineVersion , currentVersion , log = console ) {
17+ export function isNewVersion ( onlineVersion , currentVersion , log = null ) {
1818 if ( onlineVersion === currentVersion ) {
1919 return 0
2020 }
Original file line number Diff line number Diff line change @@ -111,6 +111,14 @@ console.log('\n--------------- test ForSNI ---------------\n')
111111console . log ( `===> test ForSNI: ${ dnsProviders . ForSNI . dnsName } ` , '\n\n' )
112112assert . strictEqual ( dnsProviders . ForSNI , dnsProviders . safe360 )
113113
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+
114122
115123console . log ( '\n--------------- test PreSet ---------------\n' )
116124ip = await dnsProviders . PreSet . lookup ( hasPresetHostname )
You can’t perform that action at this time.
0 commit comments