Skip to content

feat: add camoufox support default for potoken generation - #360

Open
unixfox wants to merge 4 commits into
iv-org:masterfrom
unixfox:camoufox-support-potoken
Open

feat: add camoufox support default for potoken generation#360
unixfox wants to merge 4 commits into
iv-org:masterfrom
unixfox:camoufox-support-potoken

Conversation

@unixfox

@unixfox unixfox commented Aug 3, 2026

Copy link
Copy Markdown
Member

Checklist

  • I have read the AI Policy and understand the disclosure requirements

AI Disclosure

  • AI was not used to create this pull request
  • AI was used to fully create this pull request
  • AI was used to partially create this pull request

Model(s) used (and thinking/reasoning level if relevant):
GPT 5.6 Sol (Max) + Claude Opus 4.8

Tool(s) used:
Opencode and Claude code

How was AI used?

GPT 5.6 Sol was used to fully write the code. And Claude Opus 4.8 reviewed the code and improved it.


Pull request description

While working on iv-org/invidious#5814, I found that a potoken generated by jsdom doesn't work. It needs to be generated from a real browser environment.

I have evaluated a lot of headless browsers:

I implemented camoufox because it doesn't require a virtual display, lower on memory usage than chromium and has very good stealth capabilities.

The code is implemented in a way that allows to swap to any other browser that support CDP protocol. In case we want to switch to a more lightweight one.

I don't fully like it but camoufox introduced a lot of requirements and was hard to package for docker + deno compile. It's the best candidate as of right now but I hope I'll be able to replace it with either oxide or obscura in the future.

This new potoken generation may allow being less blocked by YouTube.

So this PR adds a new potoken generation for the current way of fetching videoplayback URLs for DASH but will be mandatory for SABR usage.

Features

Copilot AI review requested due to automatic review settings August 3, 2026 00:20

This comment was marked as resolved.

Comment thread docker/ldd Outdated
@TheFrenchGhosty

Copy link
Copy Markdown
Member

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 50 minutes.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@TheFrenchGhosty, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 91960adc-98b4-434e-8cae-7cbd314f2554

📥 Commits

Reviewing files that changed from the base of the PR and between 4345b19 and 0343528.

⛔ Files ignored due to path filters (1)
  • deno.lock is excluded by !**/*.lock
📒 Files selected for processing (21)
  • .github/workflows/deno-check.yaml
  • .github/workflows/release-binaries.yaml
  • Dockerfile
  • README.md
  • deno.jsonc
  • dependencies.json
  • docker-compose.yaml
  • docker/camoufox-bootstrap.go
  • renovate.json
  • src/lib/camoufox/browser.ts
  • src/lib/camoufox/packageManager.ts
  • src/lib/camoufox/webgl.ts
  • src/lib/jobs/camoufox.ts
  • src/lib/jobs/potoken.ts
  • src/lib/jobs/worker.ts
  • src/lib/potoken/attestation.ts
  • src/lib/potoken/browserPage.ts
  • src/lib/potoken/constants.ts
  • src/lib/potoken/errors.ts
  • src/main.ts
  • src/tests/main_test.ts

Comment @coderabbitai help to get the list of available commands.

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.

4 participants