brave-real-browser-mcp-server 2.43.2 → 2.43.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/packages/brave-real-blocker/package.json +2 -2
- package/packages/brave-real-blocker/src/brave-blocker.ts +88 -9
- package/packages/brave-real-blocker/src/cosmetic.ts +1 -1
- package/packages/brave-real-blocker/src/filter-updater.ts +108 -9
- package/packages/brave-real-blocker/src/redirects.ts +4 -2
- package/packages/brave-real-blocker/src/scriptlets.ts +1 -1
- package/packages/brave-real-blocker/src/stealth.ts +1 -1
- package/packages/brave-real-launcher/package.json +2 -2
- package/packages/brave-real-playwright-core/package.json +1 -1
- package/packages/brave-real-puppeteer-core/package.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brave-real-browser-mcp-server",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.3",
|
|
4
4
|
"description": "MCP Server for Brave Real Browser - Puppeteer with Brave Browser, Stealth Mode, Ad Blocker, and Turnstile Auto-Solver for undetectable web automation.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/esm/index.mjs",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"license": "ISC",
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
77
|
-
"brave-real-puppeteer-core": "^24.37.2-brave.
|
|
77
|
+
"brave-real-puppeteer-core": "^24.37.2-brave.9",
|
|
78
78
|
"ghost-cursor": "^1.4.2",
|
|
79
79
|
"puppeteer-extra": "^3.3.6",
|
|
80
80
|
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brave-real-blocker",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.4",
|
|
4
4
|
"description": "Advanced uBlock Origin management and stealth features for Brave Real Browser",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@types/adm-zip": "^0.5.5",
|
|
65
65
|
"@types/fs-extra": "^11.0.4",
|
|
66
66
|
"@types/node": "^20.0.0",
|
|
67
|
-
"brave-real-puppeteer-core": "^24.37.2-brave.
|
|
67
|
+
"brave-real-puppeteer-core": "^24.37.2-brave.9",
|
|
68
68
|
"mocha": "^10.4.0",
|
|
69
69
|
"puppeteer-core": ">=24.0.0",
|
|
70
70
|
"sinon": "^17.0.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PuppeteerBlocker, fullLists } from '@cliqz/adblocker-puppeteer';
|
|
2
2
|
import fetch from 'cross-fetch';
|
|
3
|
-
import { Page } from 'brave-real-puppeteer-core';
|
|
3
|
+
import type { Page } from 'brave-real-puppeteer-core';
|
|
4
4
|
import { injectStealth } from './stealth';
|
|
5
5
|
import { injectScriptlets } from './scriptlets';
|
|
6
6
|
import { injectCosmeticFiltering } from './cosmetic';
|
|
@@ -47,6 +47,9 @@ export interface BraveBlockerOptions {
|
|
|
47
47
|
|
|
48
48
|
// Additional filter lists for aggressive blocking
|
|
49
49
|
const EXTRA_FILTER_LISTS = [
|
|
50
|
+
// ==========================================
|
|
51
|
+
// Anti-Adblock & Anti-Detection
|
|
52
|
+
// ==========================================
|
|
50
53
|
'https://raw.githubusercontent.com/nicholast/nicholast-adblock-list/main/nicholast-adblock-list.txt',
|
|
51
54
|
'https://raw.githubusercontent.com/nicholast/nicholast-annoyance-list/main/nicholast-annoyance-list.txt',
|
|
52
55
|
'https://raw.githubusercontent.com/nicholast/nicholast-anti-script-list/main/nicholast-anti-script-list.txt',
|
|
@@ -55,16 +58,52 @@ const EXTRA_FILTER_LISTS = [
|
|
|
55
58
|
'https://raw.githubusercontent.com/nicholast/nicholast-anti-adblock-list/main/nicholast-anti-adblock-list.txt',
|
|
56
59
|
'https://raw.githubusercontent.com/nicholast/nicholast-anti-overlay-list/main/nicholast-anti-overlay-list.txt',
|
|
57
60
|
'https://raw.githubusercontent.com/nicholast/nicholast-anti-cookie-list/main/nicholast-anti-cookie-list.txt',
|
|
58
|
-
'https://raw.githubusercontent.com/nicholast/nicholast-anti-tracking-list/main/nicholast-anti-tracking-list.txt'
|
|
61
|
+
'https://raw.githubusercontent.com/nicholast/nicholast-anti-tracking-list/main/nicholast-anti-tracking-list.txt',
|
|
62
|
+
|
|
63
|
+
// ==========================================
|
|
64
|
+
// Aggressive Ad Blocking
|
|
65
|
+
// ==========================================
|
|
66
|
+
'https://filters.adtidy.org/extension/ublock/filters/19.txt',
|
|
67
|
+
'https://filters.adtidy.org/extension/ublock/filters/14.txt',
|
|
68
|
+
'https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt',
|
|
69
|
+
|
|
70
|
+
// ==========================================
|
|
71
|
+
// File Hosting / Streaming Specific
|
|
72
|
+
// ==========================================
|
|
73
|
+
'https://secure.fanboy.co.nz/fanboy-annoyance.txt',
|
|
74
|
+
'https://easylist.to/easylist/fanboy-social.txt',
|
|
75
|
+
'https://easylist-downloads.adblockplus.org/antiadblockfilters.txt',
|
|
76
|
+
|
|
77
|
+
// ==========================================
|
|
78
|
+
// Cookie/GDPR Banners
|
|
79
|
+
// ==========================================
|
|
80
|
+
'https://www.i-dont-care-about-cookies.eu/abp/',
|
|
81
|
+
'https://secure.fanboy.co.nz/fanboy-cookiemonster.txt',
|
|
82
|
+
|
|
83
|
+
// ==========================================
|
|
84
|
+
// Tracking & Analytics Blocking
|
|
85
|
+
// ==========================================
|
|
86
|
+
'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=adblockplus&mimetype=plaintext',
|
|
87
|
+
'https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt',
|
|
88
|
+
'https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt',
|
|
89
|
+
|
|
90
|
+
// ==========================================
|
|
91
|
+
// Malware & Phishing
|
|
92
|
+
// ==========================================
|
|
93
|
+
'https://malware-filter.gitlab.io/malware-filter/urlhaus-filter.txt',
|
|
94
|
+
'https://s3.amazonaws.com/lists.disconnect.me/simple_malware.txt',
|
|
59
95
|
];
|
|
60
96
|
|
|
61
|
-
// Built-in custom filters for
|
|
97
|
+
// Built-in custom filters for aggressive blocking
|
|
62
98
|
const BUILTIN_CUSTOM_FILTERS = `
|
|
63
99
|
! ==========================================
|
|
64
|
-
! Built-in
|
|
100
|
+
! Brave Real Browser - Built-in Filter Rules
|
|
101
|
+
! Comprehensive Anti-Ad/Popup/Tracking Rules
|
|
65
102
|
! ==========================================
|
|
66
103
|
|
|
67
|
-
!
|
|
104
|
+
! ==========================================
|
|
105
|
+
! SECTION 1: Popup/Popunder Ad Networks
|
|
106
|
+
! ==========================================
|
|
68
107
|
||profitableratecpm.com^$all
|
|
69
108
|
||engridfanlike.com^$all
|
|
70
109
|
||pubfuture.com^$all
|
|
@@ -77,14 +116,46 @@ const BUILTIN_CUSTOM_FILTERS = `
|
|
|
77
116
|
||exoclick.com^$all
|
|
78
117
|
||trafficjunky.net^$all
|
|
79
118
|
||juicyads.com^$all
|
|
119
|
+
||hilltopads.net^$all
|
|
120
|
+
||adsterra.com^$all
|
|
121
|
+
||mgid.com^$all
|
|
122
|
+
||revcontent.com^$all
|
|
123
|
+
||outbrain.com^$all
|
|
124
|
+
||taboola.com^$all
|
|
125
|
+
|
|
126
|
+
! ==========================================
|
|
127
|
+
! SECTION 2: Cryptocurrency Miners
|
|
128
|
+
! ==========================================
|
|
129
|
+
||coin-hive.com^$all
|
|
130
|
+
||coinhive.com^$all
|
|
131
|
+
||crypto-loot.com^$all
|
|
132
|
+
||authedmine.com^$all
|
|
80
133
|
|
|
81
|
-
!
|
|
134
|
+
! ==========================================
|
|
135
|
+
! SECTION 3: Block All Third-Party Popups
|
|
136
|
+
! ==========================================
|
|
82
137
|
*$popup,third-party
|
|
83
138
|
|
|
84
|
-
!
|
|
85
|
-
|
|
139
|
+
! ==========================================
|
|
140
|
+
! SECTION 4: File Hosting Site Specific
|
|
141
|
+
! ==========================================
|
|
142
|
+
*$script,third-party,domain=oxxfile.info|hubcloud.club|filepress.top|hubcloud.lol|hubcloud.art|gdtot.cfd|mixdrop.co|streamtape.com|upstream.to|dood.watch|doodstream.com
|
|
86
143
|
|
|
87
|
-
!
|
|
144
|
+
! ==========================================
|
|
145
|
+
! SECTION 5: Cookie Consent/GDPR Overlays
|
|
146
|
+
! ==========================================
|
|
147
|
+
##div[id*="cookie-consent"]
|
|
148
|
+
##div[id*="cookie-banner"]
|
|
149
|
+
##div[class*="cookie-consent"]
|
|
150
|
+
##div[class*="cookie-banner"]
|
|
151
|
+
##div[id*="gdpr"]
|
|
152
|
+
##div[class*="gdpr"]
|
|
153
|
+
##div[class*="onetrust"]
|
|
154
|
+
##div[id*="onetrust"]
|
|
155
|
+
|
|
156
|
+
! ==========================================
|
|
157
|
+
! SECTION 6: Generic Ad Element Hiding
|
|
158
|
+
! ==========================================
|
|
88
159
|
##div[id^="div-gpt-ad"]
|
|
89
160
|
##div[class*="adsbygoogle"]
|
|
90
161
|
##ins.adsbygoogle
|
|
@@ -94,6 +165,14 @@ const BUILTIN_CUSTOM_FILTERS = `
|
|
|
94
165
|
##div[class*="popup-ad"]
|
|
95
166
|
##div[class*="overlay-ad"]
|
|
96
167
|
##div[class*="interstitial"]
|
|
168
|
+
|
|
169
|
+
! ==========================================
|
|
170
|
+
! SECTION 7: Anti-Adblock Detection Bypass
|
|
171
|
+
! ==========================================
|
|
172
|
+
##div[class*="adblock-notice"]
|
|
173
|
+
##div[class*="adblock-warning"]
|
|
174
|
+
##div[class*="adblocker-detected"]
|
|
175
|
+
##div[id*="adblock-notice"]
|
|
97
176
|
`;
|
|
98
177
|
|
|
99
178
|
export class BraveBlocker {
|
|
@@ -26,7 +26,9 @@ const currentDir = getCurrentDir();
|
|
|
26
26
|
|
|
27
27
|
// uBlock Origin official filter list URLs
|
|
28
28
|
export const UBLOCK_FILTER_LISTS = {
|
|
29
|
-
//
|
|
29
|
+
// ==========================================
|
|
30
|
+
// CORE uBlock Origin Filters (Essential)
|
|
31
|
+
// ==========================================
|
|
30
32
|
ublock_filters: 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt',
|
|
31
33
|
ublock_badware: 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt',
|
|
32
34
|
ublock_privacy: 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/privacy.txt',
|
|
@@ -34,24 +36,87 @@ export const UBLOCK_FILTER_LISTS = {
|
|
|
34
36
|
ublock_unbreak: 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt',
|
|
35
37
|
ublock_quick_fixes: 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/quick-fixes.txt',
|
|
36
38
|
ublock_annoyances: 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/annoyances.txt',
|
|
39
|
+
ublock_annoyances_cookies: 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/annoyances-cookies.txt',
|
|
40
|
+
ublock_annoyances_others: 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/annoyances-others.txt',
|
|
37
41
|
|
|
38
|
-
//
|
|
42
|
+
// ==========================================
|
|
43
|
+
// EasyList Family (Most Popular)
|
|
44
|
+
// ==========================================
|
|
39
45
|
easylist: 'https://easylist.to/easylist/easylist.txt',
|
|
40
46
|
easyprivacy: 'https://easylist.to/easylist/easyprivacy.txt',
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
easylist_cookie: 'https://secure.fanboy.co.nz/fanboy-cookiemonster.txt',
|
|
48
|
+
easylist_annoyances: 'https://secure.fanboy.co.nz/fanboy-annoyance.txt',
|
|
49
|
+
easylist_social: 'https://easylist.to/easylist/fanboy-social.txt',
|
|
50
|
+
easylist_antiadblock: 'https://easylist-downloads.adblockplus.org/antiadblockfilters.txt',
|
|
51
|
+
|
|
52
|
+
// ==========================================
|
|
53
|
+
// AdGuard Filters (Comprehensive)
|
|
54
|
+
// ==========================================
|
|
55
|
+
adguard_base: 'https://filters.adtidy.org/extension/ublock/filters/2.txt',
|
|
56
|
+
adguard_mobile: 'https://filters.adtidy.org/extension/ublock/filters/11.txt',
|
|
57
|
+
adguard_tracking: 'https://filters.adtidy.org/extension/ublock/filters/3.txt',
|
|
58
|
+
adguard_social: 'https://filters.adtidy.org/extension/ublock/filters/4.txt',
|
|
59
|
+
adguard_annoyances: 'https://filters.adtidy.org/extension/ublock/filters/14.txt',
|
|
60
|
+
adguard_popup: 'https://filters.adtidy.org/extension/ublock/filters/19.txt',
|
|
61
|
+
adguard_dns: 'https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt',
|
|
62
|
+
|
|
63
|
+
// ==========================================
|
|
64
|
+
// Anti-Adblock Killer Lists
|
|
65
|
+
// ==========================================
|
|
66
|
+
anti_adblock_killer: 'https://raw.githubusercontent.com/AzagraMac/nicholast-adblock-list/main/nicholast-adblock-list.txt',
|
|
67
|
+
reeks_anti_adblock: 'https://raw.githubusercontent.com/nicholast/nicholast-anti-adblock-list/main/nicholast-anti-adblock-list.txt',
|
|
68
|
+
fuckfuckadblock: 'https://raw.githubusercontent.com/nicholast/nicholast-anti-script-list/main/nicholast-anti-script-list.txt',
|
|
69
|
+
|
|
70
|
+
// ==========================================
|
|
71
|
+
// Popup/Overlay/Redirect Blockers
|
|
72
|
+
// ==========================================
|
|
46
73
|
anti_popup: 'https://raw.githubusercontent.com/nicholast/nicholast-anti-popup-list/main/nicholast-anti-popup-list.txt',
|
|
47
74
|
anti_redirect: 'https://raw.githubusercontent.com/nicholast/nicholast-anti-redirect-list/main/nicholast-anti-redirect-list.txt',
|
|
48
|
-
|
|
75
|
+
anti_overlay: 'https://raw.githubusercontent.com/nicholast/nicholast-anti-overlay-list/main/nicholast-anti-overlay-list.txt',
|
|
76
|
+
poper_blocker: 'https://raw.githubusercontent.com/nicholast/nicholast-annoyance-list/main/nicholast-annoyance-list.txt',
|
|
77
|
+
|
|
78
|
+
// ==========================================
|
|
79
|
+
// Privacy & Tracking Protection
|
|
80
|
+
// ==========================================
|
|
81
|
+
peter_lowes: 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=adblockplus&mimetype=plaintext',
|
|
82
|
+
disconnect_me: 'https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt',
|
|
83
|
+
disconnect_tracking: 'https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt',
|
|
84
|
+
disconnect_malware: 'https://s3.amazonaws.com/lists.disconnect.me/simple_malware.txt',
|
|
85
|
+
|
|
86
|
+
// ==========================================
|
|
87
|
+
// Malware & Phishing Protection
|
|
88
|
+
// ==========================================
|
|
89
|
+
malware_domains: 'https://malware-filter.gitlab.io/malware-filter/urlhaus-filter.txt',
|
|
90
|
+
phishing_domains: 'https://malware-filter.gitlab.io/malware-filter/phishing-filter.txt',
|
|
91
|
+
spam_404: 'https://raw.githubusercontent.com/nicholast/nicholast-anti-tracking-list/main/nicholast-anti-tracking-list.txt',
|
|
92
|
+
|
|
93
|
+
// ==========================================
|
|
94
|
+
// Cookie/GDPR Consent Blockers
|
|
95
|
+
// ==========================================
|
|
96
|
+
i_dont_care_cookies: 'https://www.i-dont-care-about-cookies.eu/abp/',
|
|
97
|
+
easylist_cookie_general: 'https://raw.githubusercontent.com/nicholast/nicholast-anti-cookie-list/main/nicholast-anti-cookie-list.txt',
|
|
98
|
+
|
|
99
|
+
// ==========================================
|
|
100
|
+
// Regional Filters (Major Regions)
|
|
101
|
+
// ==========================================
|
|
102
|
+
easylist_india: 'https://easylist-downloads.adblockplus.org/indianlist.txt',
|
|
103
|
+
easylist_germany: 'https://easylist.to/easylistgermany/easylistgermany.txt',
|
|
104
|
+
easylist_france: 'https://easylist-downloads.adblockplus.org/liste_fr.txt',
|
|
105
|
+
easylist_china: 'https://easylist-downloads.adblockplus.org/easylistchina.txt',
|
|
106
|
+
easylist_russia: 'https://easylist-downloads.adblockplus.org/ruadlist.txt',
|
|
107
|
+
adguard_japanese: 'https://filters.adtidy.org/extension/ublock/filters/7.txt',
|
|
108
|
+
easylist_arabic: 'https://easylist-downloads.adblockplus.org/Liste_AR.txt',
|
|
109
|
+
easylist_spanish: 'https://easylist-downloads.adblockplus.org/easylistspanish.txt',
|
|
110
|
+
easylist_dutch: 'https://easylist-downloads.adblockplus.org/easylistdutch.txt',
|
|
111
|
+
easylist_italian: 'https://easylist-downloads.adblockplus.org/easylistitaly.txt',
|
|
49
112
|
};
|
|
50
113
|
|
|
51
114
|
// Alternative backup URLs (in case primary fails)
|
|
52
115
|
export const BACKUP_FILTER_LISTS = {
|
|
53
116
|
easylist: 'https://raw.githubusercontent.com/AzagraMac/nicholast-adblock-list/main/nicholast-adblock-list.txt',
|
|
54
117
|
easyprivacy: 'https://raw.githubusercontent.com/nicholast/nicholast-annoyance-list/main/nicholast-annoyance-list.txt',
|
|
118
|
+
adguard_base: 'https://raw.githubusercontent.com/nicholast/nicholast-adblock-list/main/nicholast-adblock-list.txt',
|
|
119
|
+
peter_lowes: 'https://raw.githubusercontent.com/nicholast/nicholast-anti-tracking-list/main/nicholast-anti-tracking-list.txt',
|
|
55
120
|
};
|
|
56
121
|
|
|
57
122
|
export interface FilterCache {
|
|
@@ -81,13 +146,47 @@ const DEFAULT_OPTIONS: Required<FilterUpdaterOptions> = {
|
|
|
81
146
|
cacheDir: path.join(currentDir, '..', 'cache'),
|
|
82
147
|
cacheExpiry: 7 * 24 * 60 * 60 * 1000, // 7 days
|
|
83
148
|
enabledLists: [
|
|
149
|
+
// Core uBlock Origin (Essential)
|
|
84
150
|
'ublock_filters',
|
|
85
151
|
'ublock_badware',
|
|
86
152
|
'ublock_privacy',
|
|
87
153
|
'ublock_quick_fixes',
|
|
88
154
|
'ublock_annoyances',
|
|
155
|
+
'ublock_annoyances_cookies',
|
|
156
|
+
'ublock_unbreak',
|
|
157
|
+
|
|
158
|
+
// EasyList Family (Most Popular)
|
|
89
159
|
'easylist',
|
|
90
|
-
'easyprivacy'
|
|
160
|
+
'easyprivacy',
|
|
161
|
+
'easylist_cookie',
|
|
162
|
+
'easylist_annoyances',
|
|
163
|
+
'easylist_antiadblock',
|
|
164
|
+
|
|
165
|
+
// AdGuard (Comprehensive)
|
|
166
|
+
'adguard_base',
|
|
167
|
+
'adguard_tracking',
|
|
168
|
+
'adguard_popup',
|
|
169
|
+
'adguard_annoyances',
|
|
170
|
+
|
|
171
|
+
// Anti-Adblock Killers
|
|
172
|
+
'anti_adblock_killer',
|
|
173
|
+
'reeks_anti_adblock',
|
|
174
|
+
|
|
175
|
+
// Popup/Redirect Blockers
|
|
176
|
+
'anti_popup',
|
|
177
|
+
'anti_redirect',
|
|
178
|
+
'anti_overlay',
|
|
179
|
+
|
|
180
|
+
// Privacy & Tracking
|
|
181
|
+
'peter_lowes',
|
|
182
|
+
'disconnect_me',
|
|
183
|
+
'disconnect_tracking',
|
|
184
|
+
|
|
185
|
+
// Malware Protection
|
|
186
|
+
'malware_domains',
|
|
187
|
+
|
|
188
|
+
// Cookie/GDPR
|
|
189
|
+
'i_dont_care_cookies',
|
|
91
190
|
],
|
|
92
191
|
customFiltersPath: path.join(currentDir, '..', 'assets', 'ublock-custom-filters.txt'),
|
|
93
192
|
forceUpdate: false,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Page } from 'brave-real-puppeteer-core';
|
|
1
|
+
import type { Page } from 'brave-real-puppeteer-core';
|
|
2
2
|
import { Logger } from './logger';
|
|
3
3
|
|
|
4
4
|
const log = new Logger();
|
|
@@ -20,6 +20,7 @@ export async function injectRedirectBlocking(page: Page): Promise<void> {
|
|
|
20
20
|
];
|
|
21
21
|
|
|
22
22
|
page.on('popup', async (popup) => {
|
|
23
|
+
if (!popup) return; // Guard: popup can be null
|
|
23
24
|
try {
|
|
24
25
|
const url = popup.url();
|
|
25
26
|
|
|
@@ -58,7 +59,8 @@ export async function injectRedirectBlocking(page: Page): Promise<void> {
|
|
|
58
59
|
if (target.type() === 'page') {
|
|
59
60
|
const newPage = await target.page();
|
|
60
61
|
if (newPage) {
|
|
61
|
-
|
|
62
|
+
// opener() returns the page that opened this one (if any)
|
|
63
|
+
const opener = await (newPage as any).opener?.();
|
|
62
64
|
if (opener) {
|
|
63
65
|
const url = newPage.url();
|
|
64
66
|
const urlLower = url.toLowerCase();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brave-real-launcher",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.3",
|
|
4
4
|
"description": "Launch Brave Browser with ease from node. Based on chrome-launcher with Brave-specific support.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"typescript": "^5.0.0"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"brave-real-blocker": "^1.19.
|
|
57
|
+
"brave-real-blocker": "^1.19.4",
|
|
58
58
|
"escape-string-regexp": "^5.0.0",
|
|
59
59
|
"is-wsl": "^3.1.0",
|
|
60
60
|
"which": "^6.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brave-real-puppeteer-core",
|
|
3
|
-
"version": "24.37.2-brave.
|
|
3
|
+
"version": "24.37.2-brave.9",
|
|
4
4
|
"description": "🦁 Brave Real-World Optimized Puppeteer & Playwright Core with 1-5ms ultra-fast timing, 50+ professional stealth features, intelligent browser auto-detection, and 100% bot detection bypass. Features cross-platform Brave browser integration, comprehensive anti-detection, and breakthrough performance improvements.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
},
|
|
136
136
|
"dependencies": {
|
|
137
137
|
"@puppeteer/browsers": "2.12.0",
|
|
138
|
-
"brave-real-launcher": "^1.25.
|
|
138
|
+
"brave-real-launcher": "^1.25.3",
|
|
139
139
|
"chromium-bidi": "13.1.1",
|
|
140
140
|
"debug": "^4.4.3",
|
|
141
141
|
"devtools-protocol": "0.0.1566079",
|