@@ -36,6 +36,8 @@ const isPromise = o => o instanceof Promise;
3636const isResolvedObject = o => o instanceof Object &&
3737 o instanceof Promise === false ;
3838const reIPv4 = / ^ \d + \. \d + \. \d + \. \d + $ /
39+ const skipDNS = proxyInfo =>
40+ proxyInfo ?. proxyDNS || proxyInfo ?. type ?. startsWith ( 'http' ) ;
3941
4042/******************************************************************************/
4143
@@ -102,7 +104,7 @@ vAPI.Net = class extends vAPI.Net {
102104
103105 normalizeDetails ( details ) {
104106 // 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' ) {
106108 details . ip = null ;
107109 }
108110 const type = details . type ;
@@ -182,8 +184,8 @@ vAPI.Net = class extends vAPI.Net {
182184 if ( isResolvedObject ( dnsEntry ) ) {
183185 return this . onAfterDNSResolution ( hn , details , dnsEntry ) ;
184186 }
187+ if ( skipDNS ( details . proxyInfo ) ) { return ; }
185188 if ( this . dnsShouldResolve ( hn ) === false ) { return ; }
186- if ( details . proxyInfo ?. proxyDNS ) { return ; }
187189 const promise = dnsEntry || this . dnsResolve ( hn , details ) ;
188190 return promise . then ( ( ) => this . onAfterDNSResolution ( hn , details ) ) ;
189191 }
0 commit comments