feat(stealth): 增强浏览器级 UA 覆盖并修复背景特征
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
import {
|
||||
STEALTH_CHROMIUM_ARGS,
|
||||
applyStealthScripts,
|
||||
applyBrowserLevelStealth,
|
||||
type StealthScriptOptions,
|
||||
} from './stealth.js';
|
||||
|
||||
@@ -1576,6 +1577,10 @@ export class BrowserManager {
|
||||
});
|
||||
this.cdpEndpoint = null;
|
||||
|
||||
if (stealthPolicy.enabled && browserType === 'chromium') {
|
||||
await applyBrowserLevelStealth(this.browser);
|
||||
}
|
||||
|
||||
if (!options.userAgent && stealthPolicy.enabled && browserType === 'chromium') {
|
||||
const runtimeVersion = this.extractChromiumVersion(this.browser.version());
|
||||
if (runtimeVersion) {
|
||||
|
||||
Reference in New Issue
Block a user