Skip to content

Stealth mode, Cloudflare bypass, and MakerWorld upload fixes#13

Merged
TheCraftyMaker merged 4 commits into
masterfrom
feat/thangs-publisher-fixes
Mar 28, 2026
Merged

Stealth mode, Cloudflare bypass, and MakerWorld upload fixes#13
TheCraftyMaker merged 4 commits into
masterfrom
feat/thangs-publisher-fixes

Conversation

@TheCraftyMaker

Copy link
Copy Markdown
Owner

Fixes Cloudflare bot detection and MakerWorld upload hangs.

Changes

Stealth mode (--stealth flag)

  • Adds playwright-extra + puppeteer-extra-plugin-stealth via a Node.js launcher that .NET connects to over CDP
  • Bypasses Cloudflare at the browser fingerprint level (webdriver flag, canvas, WebGL, plugins)
  • Uses launchPersistentContext so the session is saved between runs -- log in once, reused after

Profile path (--profile-path flag)

  • Copies cf_clearance cookies and DPAPI key from a real Brave profile into the platform profile
  • Strongest Cloudflare bypass when combined with --stealth (Brave must be closed first)

MakerWorld upload fix

  • WaitForLoadState(NetworkIdle) never resolves on MakerWorld (React SPA with continuous background requests)
  • Added networkIdleTimeoutMs parameter to UploadSequentialAsync (default 0 = no timeout, existing callers unaffected)
  • MakerWorld passes 10s timeout so uploads do not hang

Dev tooling

  • .vscode/launch.json + tasks.json with MakerWorld and Printables debug profiles (F5 in VS Code)
  • launchSettings.json for Visual Studio / Rider

BrowserContextFactory hardening

  • Uses ArgumentList instead of Arguments string to avoid path quoting/newline issues on Windows

TheCraftyMaker and others added 4 commits March 28, 2026 11:45
- Add --stealth flag to CLI (root + codegen commands) that launches Brave
  via playwright-extra stealth plugin (Node.js) and connects over CDP
- Add --profile-path flag to copy cf_clearance cookies + DPAPI key from
  real Brave profile into the platform profile for Cloudflare bypass
- Add stealth-launcher.js: Node.js script that starts Brave with the
  puppeteer-extra-plugin-stealth plugin and emits READY:{port} on stdout
- Add package.json with playwright-extra and stealth plugin dependencies
- Add BrowserContextFactory.GetStealthContextAsync: starts the Node.js
  launcher, waits for READY signal, then connects via ConnectOverCDPAsync
- Add anti-automation patches to persistent context: removes navigator.webdriver,
  spoofs canvas/WebGL/plugins, adds --disable-blink-features=AutomationControlled
- Update .gitignore to exclude node_modules/ and package-lock.json
- Update README and CLAUDE.md with stealth mode usage and Cloudflare notes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- FileUploadHelper: Add `networkIdleTimeoutMs` parameter for wait customization; handle timeout exceptions during SPA loads.
- stealth-launcher.js: Refactor Brave profile logic to correctly handle platform-specific profiles.
- BrowserContextFactory: Support dynamic Brave profile paths based on `platformKey`; ensure directory creation for platform profiles.
- PublishCommand: Pass `platformKey` to stealth context creation for profile-specific contexts.
- Clean up unused solution folder from ModelPublisher.sln.
- Add .vscode/launch.json and tasks.json with MakerWorld and Printables
  debug profiles so F5 in VS Code runs with the correct CLI args
- Add src/ModelPublisher.Cli/Properties/launchSettings.json for Visual Studio
- Pass networkIdleTimeoutMs: 10_000 to both MakerWorld upload calls so the
  second upload (model files) does not hang waiting for NetworkIdle on a SPA

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These files contain machine-specific paths and should not be shared.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@TheCraftyMaker TheCraftyMaker merged commit d6fbef3 into master Mar 28, 2026
5 checks passed
@TheCraftyMaker TheCraftyMaker deleted the feat/thangs-publisher-fixes branch March 28, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant