# ungoogled-software/ungoogled-chromium architecture

> Architecture diagram of the GitHub repository ungoogled-software/ungoogled-chromium, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ungoogled-software/ungoogled-chromium
- Repository: https://github.com/ungoogled-software/ungoogled-chromium

## Overview

ungoogled-chromium is a privacy-focused Chromium variant: this repository supplies configuration, patches, and scripts that customize Chromium, rather than the browser’s core runtime. Its principal workflow is to obtain source dependencies, transform the source tree (including domain substitution and binary pruning), and apply patches; flags and patch sets also carry the documented browser changes. The graph emphasizes these product capabilities and their utility layer. Some orchestration details and unsampled modules are not shown, so uncertain links are omitted or dashed.

Main entry points: [`utils/_common.py`](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/_common.py) (Shared utilities), [`utils/domain_substitution.py`](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/domain_substitution.py) (Domain substitution), [`utils/downloads.py`](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/downloads.py) (Dependency downloads), [`utils/prune_binaries.py`](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/prune_binaries.py) (Binary pruning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_source["Source preparation"]
  node_downloads["Dependency downloads<br/>[downloads.py]"]
  node_extract["Archive extraction<br/>[_extraction.py]"]
  node_clone["Chromium source clone<br/>[clone.py]"]
  node_common["Shared utilities<br/>[_common.py]"]
end

subgraph group_customization["Browser customization"]
  node_domsub["Domain substitution"]
  node_prune["Binary pruning<br/>[prune_binaries.py]"]
  node_patchapply["Patch application<br/>[patches.py]"]
  node_patchset["Chromium patch sets"]
  node_runtimeblock["Request blocking change"]
  node_make_domsub["Substitution script generator"]
end

subgraph group_configuration["Configuration inputs"]
  node_flags["GN build flags<br/>[flags.gn]"]
  node_domrules["Domain substitution rules"]
  node_domregex["Domain regex rules<br/>[domain_regex.list]"]
  node_prunelist["Pruning rules<br/>[pruning.list]"]
  node_filecfg["File configuration<br/>[filescfg.py]"]
end

subgraph group_maintenance["Repository maintenance"]
  node_update_lists["Rule list updater<br/>[update_lists.py]"]
  node_validate_patches["Patch validation"]
end

node_user(("Maintainer or builder"))

node_user -.->|"requests downloads"| node_downloads
node_downloads -->|"unpacks archives"| node_extract
node_user -.->|"obtains source"| node_clone
node_user -.->|"runs transformation"| node_domsub
node_domsub -.->|"uses rules"| node_domrules
node_domsub -->|"uses regexes"| node_domregex
node_user -.->|"runs pruning"| node_prune
node_prune -.->|"reads rules"| node_prunelist
node_user -.->|"applies changes"| node_patchapply
node_patchapply -.->|"applies series"| node_patchset
node_patchset -.->|"includes change"| node_runtimeblock
node_user -.->|"configures build"| node_flags
node_update_lists -->|"uses processor"| node_domsub
node_update_lists -->|"uses processor"| node_prune
node_make_domsub -->|"imports helpers"| node_common
node_downloads -->|"imports helpers"| node_common
node_downloads -->|"uses extraction"| node_extract
node_domsub -->|"imports helpers"| node_common
node_domsub -->|"imports extraction"| node_extract
node_prune -->|"imports helpers"| node_common
node_clone -->|"imports helpers"| node_common
node_filecfg -->|"imports helpers"| node_common
node_patchapply -->|"imports helpers"| node_common
node_validate_patches -->|"uses patch utilities"| node_patchapply

click node_downloads "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/downloads.py"
click node_extract "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/_extraction.py"
click node_clone "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/clone.py"
click node_common "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/_common.py"
click node_domsub "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/domain_substitution.py"
click node_prune "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/prune_binaries.py"
click node_patchapply "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/patches.py"
click node_patchset "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/patches/series"
click node_runtimeblock "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/patches/core/ungoogled-chromium/block-trk-and-subdomains.patch"
click node_flags "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/flags.gn"
click node_domrules "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/domain_substitution.list"
click node_domregex "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/domain_regex.list"
click node_prunelist "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/pruning.list"
click node_filecfg "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/filescfg.py"
click node_make_domsub "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/make_domsub_script.py"
click node_update_lists "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/devutils/update_lists.py"
click node_validate_patches "https://github.com/ungoogled-software/ungoogled-chromium/blob/master/devutils/validate_patches.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_downloads,node_extract,node_clone,node_common toneBlue
class node_domsub,node_prune,node_patchapply,node_patchset,node_runtimeblock,node_make_domsub toneAmber
class node_flags,node_domrules,node_domregex,node_prunelist,node_filecfg toneMint
class node_update_lists,node_validate_patches toneRose
class node_user toneIndigo
```

## Components

### Source preparation

- [Dependency downloads](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/downloads.py): `utils/downloads.py`
- [Archive extraction](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/_extraction.py): `utils/_extraction.py`
- [Chromium source clone](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/clone.py): `utils/clone.py`
- [Shared utilities](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/_common.py): `utils/_common.py`

### Browser customization

- [Domain substitution](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/domain_substitution.py): `utils/domain_substitution.py`
- [Binary pruning](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/prune_binaries.py): `utils/prune_binaries.py`
- [Patch application](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/patches.py): `utils/patches.py`
- [Chromium patch sets](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/patches/series): `patches/series`
- [Request blocking change](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/patches/core/ungoogled-chromium/block-trk-and-subdomains.patch): `patches/core/ungoogled-chromium/block-trk-and-subdomains.patch`
- [Substitution script generator](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/make_domsub_script.py): `utils/make_domsub_script.py`

### Configuration inputs

- [GN build flags](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/flags.gn): `flags.gn`
- [Domain substitution rules](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/domain_substitution.list): `domain_substitution.list`
- [Domain regex rules](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/domain_regex.list): `domain_regex.list`
- [Pruning rules](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/pruning.list): `pruning.list`
- [File configuration](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/utils/filescfg.py): `utils/filescfg.py`

### Repository maintenance

- [Rule list updater](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/devutils/update_lists.py): `devutils/update_lists.py`
- [Patch validation](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/devutils/validate_patches.py): `devutils/validate_patches.py`

### Other components

- **Maintainer or builder**

## Connections

- Maintainer or builder → Dependency downloads: requests downloads
- Dependency downloads → Archive extraction: unpacks archives (evidence: `utils/downloads.py`)
- Maintainer or builder → Chromium source clone: obtains source
- Maintainer or builder → Domain substitution: runs transformation
- Domain substitution → Domain substitution rules: uses rules
- Domain substitution → Domain regex rules: uses regexes (evidence: `utils/domain_substitution.py`)
- Maintainer or builder → Binary pruning: runs pruning
- Binary pruning → Pruning rules: reads rules
- Maintainer or builder → Patch application: applies changes
- Patch application → Chromium patch sets: applies series
- Chromium patch sets → Request blocking change: includes change (evidence: `README.md`)
- Maintainer or builder → GN build flags: configures build
- Rule list updater → Domain substitution: uses processor (evidence: `devutils/update_lists.py`)
- Rule list updater → Binary pruning: uses processor (evidence: `devutils/update_lists.py`)
- Substitution script generator → Shared utilities: imports helpers (evidence: `utils/make_domsub_script.py`)
- Dependency downloads → Shared utilities: imports helpers (evidence: `utils/downloads.py`)
- Dependency downloads → Archive extraction: uses extraction (evidence: `utils/downloads.py`)
- Domain substitution → Shared utilities: imports helpers (evidence: `utils/domain_substitution.py`)
- Domain substitution → Archive extraction: imports extraction (evidence: `utils/domain_substitution.py`)
- Binary pruning → Shared utilities: imports helpers (evidence: `utils/prune_binaries.py`)
- Chromium source clone → Shared utilities: imports helpers (evidence: `utils/clone.py`)
- File configuration → Shared utilities: imports helpers (evidence: `utils/filescfg.py`)
- Patch application → Shared utilities: imports helpers (evidence: `utils/patches.py`)
- Patch validation → Patch application: uses patch utilities (evidence: `devutils/validate_patches.py`)
