Commit Graph
91 Commits
Author SHA1 Message Date
icepaq d6540b52ce Service Test and Contributing Guides (#521)
* example files

* contributing guides

* simple service test

* run tests in sync

* update pr template

* pip updates

* Update README.md

* typo fixes

* undo pip package update lol

* upgraded service test

* undo injections

* test with proxies

* auto set timezone and proxy url

* delete checks bundle

* split up service tests

* split up build tests

* rename service tests to service tester

* Update CONTRIBUTING.md

* fix entry vs exit ip

* allow alpha versions

* fix patch issues on macos

* bidirectional patch

* Add note on experimental pip package
2026-03-15 21:31:49 -04:00
c6a6c20670 Camoufox 2.0: Hardware Spoofing + Python Package Updates (#519)
* feat: update timezone, geolocation, and locale spoofing patches

- timezone-spoofing.patch: per-context timezone via per-realm DateTimeInfo
- geolocation-spoofing.patch: CAMOU_CONFIG backwards compatibility for geolocation
- locale-spoofing.patch: add camoucfg LOCAL_INCLUDES
- anti-font-fingerprinting.patch: add RoverfoxStorageManager exports to moz.build

* feat: per-context audio fingerprinting and screen spoofing patches

- audio-fingerprint-manager.patch: per-context audio fingerprinting (all 6 API methods)
- screen-spoofing.patch: per-context screen dimensions with global MaskConfig fallback
- Disable webrtc-ip-spoofing.patch (will re-enable after fixing)
- Remove screen-hijacker.patch (superseded by screen-spoofing.patch)

* fix: add global MaskConfig hooks for navigator.platform, hardwareConcurrency, and timezone (#443)

Fixes issue where global CAMOU_CONFIG settings for navigator.platform,
navigator.hardwareConcurrency, and timezone were not applied in the main
window Navigator (only WorkerNavigator was patched via fingerprint-injection.patch).

* fix: run nsJSUtils::SetTimeZoneOverride() after SpiderMonkey has Initialized to prevent SIGSEGV

* Add fingerprint improvements for PR #3

- navigator-spoofing.patch: Global config fixes for platform/hardwareConcurrency/timezone
- timezone-spoofing.patch: Persistence across page navigation via SetNewDocument hook
- audio-fingerprint-manager.patch: Full 6-method coverage with self-destruct pattern
- screen-spoofing.patch: Per-context dimensions with self-destruct pattern
- webrtc-ip-spoofing.patch: Re-enabled with getStats() sanitization + comprehensive IPv6 regex

* fix: simplify userContextId to BrowsingContext + add per-context docs

* feat(navigator): Add per-context spoofing (platform, oscpu, hardwareConcurrency) with global fallback + docs update.

* fix(navigator): use 2-arg GetUint(key, value) for RoverfoxStorageManager

* fix(navigator): header line count build error

* fix(navigator): move NavigatorManager.cpp into SOURCES for leakage error

* fix(navigator): more line count build errors

* fix(navigator): include nsTHashMap and nsHashKeys.h before RoverfoxStorageManager

* feat(webgl): per-context spoofing patch

* fix(webgl): changed GetCanvasElement() to mCanvasElement() for firefox version

* fix(webgl): remove coupled self-destruct

* feat(canvas): per-context spoofing

* feat(font-list): per-context spoofing

* fix(font-list): use GetOwnerWindow() instead of GetOwner()

* feat(speech): per-context spoofing

* fix(speech): add /dom/base inside local_includes

* fix(speech): changed context to avoid conflicts

* feat(navigator): add WorkerNavigator hooks for per-context platform and hardwareConcurrency in workers

* feat(timezone): add per-context timezone override to workers

* fix(canvas): add OffscreenCanvas userContextId support and skip zero pixels in canvas noise

* fix(screen): hook nsMediaFeatures GetDeviceSize for per-context matchMedia device-width/height

* fix(webgl): add OffscreenCanvas userContextId fallback in WebGL GetUserContextId

* fix(canvas): make canvas noise use proper format for BGRA toDataURL path

* fix(canvas): line count fixes

* docs: updated hardware per-context documentation

* Final Per-Context Hardware Fingerprint Spoofing (#9)

* feat(navigator): Add per-context spoofing (platform, oscpu, hardwareConcurrency) with global fallback + docs update.

* fix(navigator): use 2-arg GetUint(key, value) for RoverfoxStorageManager

* fix(navigator): header line count build error

* fix(navigator): move NavigatorManager.cpp into SOURCES for leakage error

* fix(navigator): more line count build errors

* fix(navigator): include nsTHashMap and nsHashKeys.h before RoverfoxStorageManager

* feat(webgl): per-context spoofing patch

* fix(webgl): changed GetCanvasElement() to mCanvasElement() for firefox version

* fix(webgl): remove coupled self-destruct

* feat(canvas): per-context spoofing

* feat(font-list): per-context spoofing

* fix(font-list): use GetOwnerWindow() instead of GetOwner()

* feat(speech): per-context spoofing

* fix(speech): add /dom/base inside local_includes

* fix(speech): changed context to avoid conflicts

* feat(navigator): add WorkerNavigator hooks for per-context platform and hardwareConcurrency in workers

* feat(timezone): add per-context timezone override to workers

* fix(canvas): add OffscreenCanvas userContextId support and skip zero pixels in canvas noise

* fix(screen): hook nsMediaFeatures GetDeviceSize for per-context matchMedia device-width/height

* fix(webgl): add OffscreenCanvas userContextId fallback in WebGL GetUserContextId

* fix(canvas): make canvas noise use proper format for BGRA toDataURL path

* fix(canvas): line count fixes

* docs: updated hardware per-context documentation

* feat(screen): screen avail per context

* fix(font): align userContextId resolution to BrowsingContext

* fix(audio): align userContextId resolution to BrowsingContext

* Avoid macos caching (#11)

* the property to undefined before deleting

* undo webrtc undefined

* feat: userContextId added to WordCacheKey

* fix: hunk line counts for macos cache changes

* fix: add WorkerPrivate fallback in OffscreenCanvas

* fix(audio): transformation added to mSharedChannels path to ensure consistency

* fix(webgl): added WorkerPrivate to ucid

* fix(timezone): add ucid=0 fallback for worker timezone resolution

* fix(audio): move seed lookup outside window guard for all 6 hooks

* fix(canvas): add ucid=0 fallback and WorkerPrivate resolution for workers

* fix(navigator): add setNavigatorUserAgent and ucid=0 fallback and WorkerNavigator for UA spoofing fix

* fix(webgl): add ucid=0 fallback and WorkerPrivate resolution

* fix(webgl): decouple vendor/renderer self-destruct

* fix(navigator): add main-thread navigator.userAgent getter hook

* fix(navigator): add MaskConfig hook for navigator.appVersion in main window

* feat: Add Chakra Petch font for macOS to solidify detection on CreepJS

* fix(fontconfig): rename to match Go launcher, add TTC aliases and update .gitignore

* fix(navigator): oscpu missing MaskConfig global fallback

* feat: add real fingerprint presets (65 firefox profiles) - mainly to test with, more will come when tested.

* feat: use real fingerprint presets as default with BrowserForge as fallback

* feat: add audio:seed and canvas:seed to property schema and validation

* feat: add MaskConfig fallback to seed managers for cross-process worker consistency - don't need to disable fission

* fix(font): moved mUserContextId declaration before mRounding in WordCacheKey so init order matches

* fix(audio): line count correction

* fix(canvas): line count fix

* feat: add per-context fingerprinting API (NewContext/AsyncNewContext) + merge upstream

- fix seed range
- add oscpu derivation from platform, and timezone mapping in from_preset()
- new real fingerprints preset support

* feat: new presets + en-US only, stripped fonts/language, clamp DPR

* feat: random 30-78% font subset generation for NewBrowser and NewContext

* fix: add fission.autostart=true to camoufox.cfg - will be changing this soon with new update so processCount is not 1, so it will be undetectable

* fix: update macos fonts.conf rendering settings

* feat: cross-process fingerprint storage via Firefox Preferences API

Replace RoverfoxStorageManager's per-process static HashMap with Firefox's
built-in Preferences system. Values stored as CString prefs under
"roverfox.s." namespace, auto-synced to all content processes by Firefox.

Content processes can't set prefs directly (ENSURE_PARENT_PROCESS), so a
single IPDL message (RoverfoxStoragePut) routes writes through the parent.
Same public API — all 10 dependent patches require zero changes.

Removes dom.ipc.processCount=1 from camoufox.cfg. Firefox now uses
Playwright's default multi-process model (fresh process per page) with
fission enabled, while fingerprint values remain accessible everywhere.

* fix(cross-process): hunk headers and build fixes

* fix(storage): add local write-through cache to RoverfoxStorageManager

* fix(storage): add sync IPC read fallback for cross-process fingerprint propagation

* fix(storage): add NS_IsMainThread guard to sync IPC fallback - prevent crashes

* fix(storage): sync IPC + pref whitelist for cross-process fingerprint sync

* feat: full documentation update, speech voices generated per context and BrowserForge primary fingerprint generation method for global and per context.

* fix: Direct3D NVIDIA GTX 980 renderers incorrectly appearing on mac because of duplicates

* Update .gitignore

---------

Co-authored-by: PopcornDev1 <e.coiley@icloud.com>
Co-authored-by: Build <build@local>
Co-authored-by: Elliot Coiley <153072396+PopcornDev1@users.noreply.github.com>
2026-03-14 11:29:12 -04:00
daijro be0951543b Update help msg, icon, & bugfix
- Don't fall back to old browsers if the active one isnt installed
- Remade the icon for the gui
- Better exception info
2026-03-07 02:21:15 -06:00
daijro dd798fda87 Support passing channels in remove & fetch cli 2026-03-07 00:31:53 -06:00
daijro ce3b93b958 Clean READMEs, clean old data dir on fetch, & more
- Removes the old data directory if Camoufox was installed before 0.5.0
- Fix messy sponsors segment & add repo status info at the top of the README
- Add camoufox/camoufox org as fallback
- Remove (experimental) next to the GeoIP by daijro source
- Format
2026-03-06 07:38:43 -06:00
daijro 1ca7f9982e Better channel switching in UI 2026-02-08 01:05:40 -06:00
daijro ac9ee1531a Clean up manager UI & add more info in version cli
- Rewrite `camoufox version` to show storage/path info and more python packages
- In camoufox active/set, show active channels. Fall back to original/stable if none is set
- Remove config files in `camoufox remove --all`
- Spoof the camoufox python library version in UI debug mode
- Fix scrollbar always showing on windows
- Other UI cleanup
2026-02-07 23:16:16 -06:00
daijro b92681759f Remove filters section in gui 2026-02-07 19:55:18 -06:00
daijro febffaa85c Missing geoip support message in gui 2026-02-07 19:53:30 -06:00
daijro 3c13e6ed5f Fix windows strftime 2026-02-07 19:45:31 -06:00
daijro 5661e0a676 Add more spacing in cli version info 2026-02-07 04:46:47 -06:00
daijro f843120052 Cli fixes 2026-02-07 04:10:57 -06:00
daijro ee27755bb3 Show active even if not installed 2026-02-07 03:32:03 -06:00
daijro 0923b12194 Exception handling 2026-02-07 03:29:35 -06:00
daijro 61a9e1f9bb Update browserforge (remove manual model downloading) 2026-02-07 03:14:41 -06:00
daijro 4973672d01 Remove canvas anti-fingerprinting 2026-02-07 03:05:50 -06:00
daijro b4d5ae515f Merge branch 'daijro-fixes' into daijro-camoufox-manager 2026-02-07 03:04:31 -06:00
daijro e0e2eeb2f3 Add version manager in python library 2026-02-07 02:47:01 -06:00
Julien Duponchelle 99f5aaaca2 feat: Add --executable-path flag to the test command
This allow to pass to Camoufox library the executable-path
from the cli test command allowing to use a camoufox from a different
folder during development.

Example:
python -m camoufox test --executable-path="/tmp/camoufox/camoufox-bin"
2026-02-02 09:41:35 +01:00
daijro e365d42a72 Merge pull request #351 from PierreMesure/patch-1
Use GITHUB_TOKEN if it exists to download Camoufox
2026-01-11 23:40:26 -06:00
daijro fa647700e9 Merge pull request #323 from dozed-dev/main
fix: return correct country from geoip database
2026-01-11 23:39:53 -06:00
daijro 90c916e708 Merge pull request #273 from joaoneves0/fix/xvfb-leak
fix: Ensure virtual_display is killed even if browser.close fails
2026-01-11 23:38:28 -06:00
daijro 2e98b57693 Merge pull request #251 from wv-opt-ai/patch-1
Fix cleanup on exception in sync_api __enter__
2026-01-11 23:37:49 -06:00
daijro b161c24fc9 Merge branch 'fix-ip-exception' into daijro-fixes 2026-01-11 23:34:54 -06:00
daijro 72833eeff9 Merge library fixes from coryking 2026-01-11 23:30:51 -06:00
Pierre 6e6f6736fb Use GITHUB_TOKEN if it exists to download Camoufox 2025-07-10 15:01:19 +02:00
dozed-dev b08a700314 fix: return correct country from geoip database
Return country instead of registered_country for iso code in get_geolocation
2025-06-08 19:53:51 +03:00
joaoneves0 fd1bb2f878 Ensure virtual display cleanup runs on browser close failure 2025-04-14 14:23:38 -03:00
wv-opt-ai e008580521 Fix cleanup on exception in sync_api __enter__
If an exception is raised in the synchronous api during the setup, super().__enter__ has been called but super().__exit__ will not get called, leading to asyncio runloop exceptions further down the line if one tries to create a new context. This commit catches the exception in order to clean up the super().__exit__ calls before reraising.
2025-03-21 16:35:11 +01:00
DeviousStoat 326e3a6976 Fix unbound exception ip function 2025-03-21 14:59:04 +01:00
Ven Om dcda82e94f Get IP fix 2025-03-06 15:30:25 +01:00
gsli97 c8eca598a9 unexpected keyword argument when using proxy-bypass with geoip=True
passing a proxy to camoufox with the "bypass"-argument while using geoip=True runs into an exception.
extending the class attributes fixes the problem on my local machine
2025-02-07 18:15:57 -08:00
daijro 0dabcb726d Add leak warning for block_images 0.4.11 #170 2025-01-29 03:32:40 -06:00
daijro a9b1934790 pythonlib: Add COOP toggle (workaround for #150) 0.4.10 2025-01-25 18:02:40 -06:00
Karim shoair 6fc8ee287e Make Geolocation frozen to use less memory
And it can be cached later if that intended in the future
2025-01-24 21:21:27 +02:00
Karim shoair b5a248707e Small performance boost on ip validation with caching 2025-01-24 21:19:29 +02:00
TimurKutsenko a44986e1a0 Remove print on start of virtual display 2025-01-05 10:23:55 +02:00
vihangatheturtle 133afbcdea Update launchServer.js 2024-12-17 17:58:18 +00:00
vihangatheturtle f5def98300 Update server.py 2024-12-17 17:57:50 +00:00
daijro e3d3dcd6e7 pythonlib: Look for assets in earlier releases #134 0.4.9 2024-12-13 01:01:20 -06:00
daijro 2422d622eb pythonlib: Auto offset Canvas anti-aliasing 2024-12-09 08:27:05 -06:00
Ivan Suslov 685f2ff744 Fixes WebGL support for virtual display 2024-12-08 10:36:14 -05:00
daijro 4c52518dd2 pythonlib: Cleanup & bump to 0.4.6
- `camoufox test` will no longer highlight the cursor by default
- Fixed launch_options blocking async
- WebGL database cleanup & added ability to query all possible vendor/renderer pairs
2024-12-04 19:35:54 -06:00
daijro 31963aa83b pythonlib: Update WebGL sample database 2024-12-04 00:38:12 -06:00
daijro f6ef52a39b pythonlib: Support for main world evaluation 0.4.5 2024-12-03 22:58:08 -06:00
daijro 3210351527 pythonlib: Add parameter to only use user-specified fonts #109
Added a `custom_fonts_only` parameter to ignore the fonts in fonts.json.
2024-11-28 22:15:36 -06:00
daijro 30a92edb1b pythonlib: Do not override productSub #105 2024-11-28 21:36:49 -06:00
daijro cf3f8e6bde pythonlib: Fix WebGL injection causing crashing 0.4.4-beta 2024-11-25 00:20:27 -06:00
daijro 145b737069 pythonlib: [Rollback] Disable WebGL by default #90 0.4.3
Disables WebGL by default until a fix is available.
2024-11-22 11:13:43 -06:00
daijro 01aff40fc5 pythonlib: Rollback WebGL fingerprint injection 0.4.2
Rolling back WebGL injection temporarily until the crashing issue on certain devices is fixed.
2024-11-22 03:28:01 -06:00