feat: add camoufox support default for potoken generation - #360
Open
unixfox wants to merge 4 commits into
Open
Conversation
Fijxu
reviewed
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
AI Disclosure
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