diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..94f480d --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a3c9d82 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.11-slim-bullseye + +WORKDIR /app + +# Copy the current directory contents into the container at /app +COPY . /app + +# Install necessary packages +RUN apt-get update && apt-get install -y \ + # Makefile utils + build-essential make git msitools wget unzip \ + # Camoufox build system utils + p7zip-full golang-go + +RUN make fetch && make mozbootstrap + +ENTRYPOINT ["python3", "./multibuild.py"] diff --git a/Makefile b/Makefile index d933424..0848672 100644 --- a/Makefile +++ b/Makefile @@ -4,16 +4,17 @@ export ff_source_dir := firefox-$(version) lw_source_dir := camoufox-$(version)-$(release) -debs := python3 python3-dev python3-pip p7zip-full golang-go -rpms := python3 python3-devel p7zip golang -pacman := python python-pip p7zip go +debs := python3 python3-dev python3-pip p7zip-full golang-go msitools wget +rpms := python3 python3-devel p7zip golang msitools wget +pacman := python python-pip p7zip go msitools wget -.PHONY: help fetch clean distclean build package build-launcher check-arch edits run bootstrap dir package-common package-linux package-macos package-windows +.PHONY: help fetch clean distclean build package build-launcher check-arch edits run bootstrap mozbootstrap dir package-common package-linux package-macos package-windows help: @echo "Available targets:" @echo " fetch - Clone Firefox source code" @echo " bootstrap - Set up build environment" + @echo " mozbootstrap - Sets up mach" @echo " dir - Prepare Camoufox source directory" @echo " edits - Camoufox developer UI" @echo " build-launcher - Build launcher" @@ -37,9 +38,12 @@ dir: cp -r $(ff_source_dir) $(lw_source_dir) python3 scripts/patch.py $(version) $(release) +mozbootstrap: + cd $(ff_source_dir) && MOZBUILD_STATE_PATH=$$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser + bootstrap: dir (sudo apt-get -y install $(debs) || sudo dnf -y install $(rpms) || sudo pacman -Sy $(pacman)) - cd $(lw_source_dir) && MOZBUILD_STATE_PATH=$$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser + make mozbootstrap clean: rm -rf $(lw_source_dir) diff --git a/README.md b/README.md index 151e456..7ddf5ec 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@
-Camoufox aims to be a minimalistic browser that for robust fingerprint injection & anti-bot evasion. +Camoufox aims to be a minimalistic browser for robust fingerprint injection & anti-bot evasion.
@@ -22,6 +22,7 @@ Camoufox aims to be a minimalistic browser that for robust fingerprint injection - Full integration of Playwright's Juggler ✅ - Patches from LibreWolf & Ghostery to remove Mozilla services ✅ - Optimized for memory and speed ✅ +- Stays up to date with the latest Firefox version ⌚ #### What's planned? @@ -295,7 +296,9 @@ graph TD end ``` -### Build CLI +This was originally forked from the LibreWolf build system. + +## Build CLI > [!WARNING] > Camoufox's build system is designed to be used in Linux. WSL will not work! @@ -329,6 +332,49 @@ make package-windows arch=x86 make package-macos arch=amd64 ``` +### Using Docker + +Camoufox can be built through Docker on all platforms. + +1. Create the Docker image containing Firefox's source code: + +```bash +docker build -t camoufox-builder . +``` + +2. Build Camoufox patches to a target platform and architecture: + +```bash +docker run camoufox-builder --target