@@ -36,6 +36,8 @@ const isPromise = o => o instanceof Promise;
36
36
const isResolvedObject = o => o instanceof Object &&
37
37
o instanceof Promise === false ;
38
38
const reIPv4 = / ^ \d + \. \d + \. \d + \. \d + $ /
39
+ const skipDNS = proxyInfo =>
40
+ proxyInfo ?. proxyDNS || proxyInfo ?. type ?. startsWith ( 'http' ) ;
39
41
40
42
/******************************************************************************/
41
43
@@ -102,7 +104,7 @@ vAPI.Net = class extends vAPI.Net {
102
104
103
105
normalizeDetails ( details ) {
104
106
// https://github.com/uBlockOrigin/uBlock-issues/issues/3379
105
- if ( details . proxyInfo ?. proxyDNS && details . ip === '0.0.0.0' ) {
107
+ if ( skipDNS ( details . proxyInfo ) && details . ip === '0.0.0.0' ) {
106
108
details . ip = null ;
107
109
}
108
110
const type = details . type ;
@@ -182,8 +184,8 @@ vAPI.Net = class extends vAPI.Net {
182
184
if ( isResolvedObject ( dnsEntry ) ) {
183
185
return this . onAfterDNSResolution ( hn , details , dnsEntry ) ;
184
186
}
187
+ if ( skipDNS ( details . proxyInfo ) ) { return ; }
185
188
if ( this . dnsShouldResolve ( hn ) === false ) { return ; }
186
- if ( details . proxyInfo ?. proxyDNS ) { return ; }
187
189
const promise = dnsEntry || this . dnsResolve ( hn , details ) ;
188
190
return promise . then ( ( ) => this . onAfterDNSResolution ( hn , details ) ) ;
189
191
}
0 commit comments