CamouBrowser Docs

Changing patches

Both browsers keep their changes as .patch files in browser/patches/. Never hand-edit a .patch file: edit the source, then write the diff with the repository's tool, which checks that the result applies. The tools differ.

Camoufox's patches apply to an unpacked Firefox source tree. All commands run from the browser folder.

How to make a patch

  1. Prepare the source tree and mark it as the base for the diff:
make dir && make first-checkpoint
  1. Make changes in the camoufox-*/ folder as needed. You can test your changes with make build and make run. Run git add -N <file> in that folder for any new file, so the diff includes it.
  2. Write the diff to a patch file:
make diff > patches/my-change.patch

How to work on an existing patch

  1. Set the workspace to the patch. This reverses the patch if it's applied, checkpoints the tree, and applies it again, so the diff holds only that patch:
make dir && make workspace ./patches/x.patch
  1. Make your changes, then overwrite the patch file:
make diff > patches/x.patch

Other commands

Command Description
make patch ./patches/x.patch Apply one patch
make unpatch ./patches/x.patch Reverse one patch
make revert Reset the tree to unpatched Firefox
make grep <string> Search the patches for a string
make help List every target

Porting the patches to a new Firefox version is covered in the patch upgrading guide.

© Copyright daijro 2026. All rights reserved.