File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,12 @@ export const handleProxyRequest = async (details: browser.proxy._OnRequestDetail
50
50
51
51
// 3. When the request if a conncheck/DNS check originating from the extension,
52
52
// we want to use the same proxy as the active tab, to get a consistent conncheck result
53
- const isExtensionRequest = details . documentUrl ?. startsWith ( 'moz-extension://' ) ;
54
- const isConnCheck = details . url ?. endsWith ( 'am.i.mullvad.net/json' ) ;
55
- const isDNSCheck = details . url ?. endsWith ( 'dnsleak.am.i.mullvad.net/' ) ;
53
+ const { domain : maybeMullvadDomain } = checkDomain ( details . url ) ;
54
+ const isMullvadNet = maybeMullvadDomain === 'mullvad.net' ;
56
55
56
+ const isExtensionRequest = details . documentUrl ?. startsWith ( 'moz-extension://' ) ;
57
+ const isConnCheck = isMullvadNet && details . url ?. endsWith ( 'am.i.mullvad.net/json' ) ;
58
+ const isDNSCheck = isMullvadNet && details . url ?. endsWith ( 'dnsleak.am.i.mullvad.net/' ) ;
57
59
const isExtConnCheck = isExtensionRequest && ( isConnCheck || isDNSCheck ) ;
58
60
59
61
if ( isExtConnCheck ) {
You can’t perform that action at this time.
0 commit comments