Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit camoufox.cfg #162

Closed
D4Vinci opened this issue Jan 24, 2025 · 5 comments
Closed

Revisit camoufox.cfg #162

D4Vinci opened this issue Jan 24, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@D4Vinci
Copy link
Contributor

D4Vinci commented Jan 24, 2025

Hi @daijro , I have been researching for some time the settings you are using in camoufox.cfg and comparing it with the one used in playwright's file.

While I understand how most of the settings improve the stealth and the performance of Camoufox, some seem not logical to have. It may be set in Camoufox's early versions and you didn't have a chance to revisit it. I wanted to make a PR but thought to create an issue to discuss these options and think out loud.

  1. dom.event.clipboardevents.enabled = false
    Websites can check if clipboard events are turned off by playing around with the navigator.clipboard for example, which will hurt Camoufox's stealth. I think turning it on will be better.

  2. dom.ipc.processCount = 1
    I can't figure out why you did this, you didn't explain it in the comments like what you did with other settings. I know this eliminates process isolation, but it's causing performance bottlenecks (especially with multiple tabs) as well as increasing crash risks. Can't we set the value of this to 4 for example? I don't know if this can be passed as config as here or not.

  3. privacy.resistFingerprinting = false
    Disabling Firefox’s anti-fingerprinting feature makes the browser more unique and detectable. Metrics like screen resolution, timezone, and fonts become easier to track. You have written a comment saying 'This will actually hurt fingerprinting.' next to it, is there still a reason to leave this disabled?

There are other settings I'm not sure about if I'm correct or not but these are more important, I'm looking forward to your answer. I love Camoufox and the work you are doing and I'm just trying to help improve it the way I know the best.

I think performance should take priority over memory usage like in Playwright. Being stealthy and fast is better than being stealthy and slow, you can add, for example, a page on the website for what settings to turn off to save memory for people who prioritize that but I don't think it's ideal to make it slow browsing is the default behavior as Camoufox is significantly slower than Playwright.

@D4Vinci D4Vinci added the enhancement New feature or request label Jan 24, 2025
@daijro
Copy link
Owner

daijro commented Jan 24, 2025

Hello,

  1. dom.event.clipboardevents.enabled = false
    You are right, this line should be removed. I believe I forgot to remove it from the BetterFox config. 😅

  2. dom.ipc.processCount = 1
    Playwright's original preference uses infinite processes, and this caused a heavy CPU overhead load (I left a comment here about it). When I set this, I had only planned for Camoufox to be optimized for 1 context and 1 tab. However, I can see the value in disabling this for a performance boost. I will revert it back to the original Playwright preference.

  3. privacy.resistFingerprinting = false
    This is intentionally disabled, and enabling this can hurt Camoufox's stealth. RFP mimics how TOR makes all users look the same by standardizing these values and blocking access to certain browser APIs. Enabling this can be easily detected by websites and raises suspicions from Creepjs, Cloudflare, etc. Camoufox's goal is to inject it's own believable fingerprint data into these APIs rather than blocking them off completely or setting them to a standard value.

@D4Vinci
Copy link
Contributor Author

D4Vinci commented Jan 24, 2025

Aha, nice! thanks, mate! I will make a PR for 1 and 2 as I was planning to originally if you don't mind and close this issue.

@D4Vinci
Copy link
Contributor Author

D4Vinci commented Jan 24, 2025

@daijro I have created a PR and added two more improvements. Have a look and tell me what you think.
No need to keep this ticket open then

@D4Vinci D4Vinci closed this as completed Jan 24, 2025
@daijro
Copy link
Owner

daijro commented Jan 24, 2025

Thanks! You don't have to make a PR if you don't want, I'm currently going through the config and removing everything non-essential 👍

@D4Vinci
Copy link
Contributor Author

D4Vinci commented Jan 24, 2025

It's cool @daijro I like to contribute. If that's something I can help with, then I'm more than happy to do it 😄

daijro added a commit that referenced this issue Jan 24, 2025
Various perfomance improvements and one stealth improvement ( #162 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants