Skip to content

Fix Glyph issues and remove CPP network patch#478

Open
julien-duponchelle wants to merge 1 commit intodaijro:mainfrom
wiremind:accept_encoding
Open

Fix Glyph issues and remove CPP network patch#478
julien-duponchelle wants to merge 1 commit intodaijro:mainfrom
wiremind:accept_encoding

Conversation

@julien-duponchelle
Copy link
Contributor

This PR fix the broken Accept-Encoding and clean the override code to use only firefox settings to set:

  • User-Agent
  • Accept-Encoding
  • Accept-Language

This allow to drop the network-patches reducing the maintenance cost.

User-Agent and Accept-Language was already no longer used in the patch as mentionned in the browserforge.yml

For the Accept-Encoding we are using the firefox settings network.http.accept-encoding.secure. It's important to apply it only for HTTPS because the value for HTTP is different. The fingerprint provided by BrowserForge match the HTTPS settings.

I cleaned camoucfg.jvv and properties.json but I'm not 100% sure it's what we need to do.

I tested the change with this code:

    fingerprint = generate_fingerprint()
    fingerprint.navigator.userAgent = "ChmolBrowser"
    fingerprint.headers['Accept-Encoding'] = "chmol"

    with Camoufox(headless=False, env=environ, config={'showcursor': False},
fingerprint=fingerprint,
 i_know_what_im_doing=True, locale='fr-FR') as browser:

And I got :

image

This PR fix the broken Accept-Encoding and clean the override code
to use only firefox settings to set:
* User-Agent
* Accept-Encoding
* Accept-Language

This allow to drop the network-patches reducing the maintenance cost.

User-Agent and Accept-Language was already no longer used in the patch
as mentionned in the browserforge.yml

For the Accept-Encoding we are using the firefox settings
network.http.accept-encoding.secure. It's important to apply it only
for HTTPS because the value for HTTP is different. The fingerprint
provided by BrowserForge match the HTTPS settings.

I cleaned camoucfg.jvv and properties.json but I'm not 100% sure it's
what we need to do.
@icepaq
Copy link
Collaborator

icepaq commented Feb 6, 2026

Thanks for opening. I'm going to have someone else make sure that the useragent mask isn't being used in an upcoming fingerprint update.

@decewei
Copy link

decewei commented Mar 3, 2026

I have a local mac build (FF146) with this patch. It works great except my navigator.userAgent is missing, and cannot be overridden by python setting. I have to include the patches/network-patches.patch to bring it back. Otherwise, I kept get detected by google.

I believe we don't need the entire network-patches tho, only the nsHttpHandler -> navigator.userAgent part.

@KittisakPh
Copy link

@decewei how to build FF146 on macOS
Pls guide me step by step I want to do that
But whatever I can not build success T_T

@decewei
Copy link

decewei commented Mar 3, 2026

@decewei how to build FF146 on macOS
Pls guide me step by step I want to do that
But whatever I can not build success T_T

Yeah I was planning to post a PR to add to build guide. May take me a few days tho. PS took me a long time to figure out plus my machine is not so powerful that made it worse.

@KittisakPh
Copy link

Ok thx u very much i will waiting it i love u
This will help me a lot thx god

@decewei
Copy link

decewei commented Mar 22, 2026

Ok thx u very much i will waiting it i love u This will help me a lot thx god

@KittisakPh I didn't actuall find time to post a proper PR. It still needs some clean up. Here is the branch with a commit that works: decewei@3e8f2a0

There are some redundant things in it that you can ignore.

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