# lwthiker/curl-impersonate architecture

> Architecture diagram of the GitHub repository lwthiker/curl-impersonate, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lwthiker/curl-impersonate
- Repository: https://github.com/lwthiker/curl-impersonate

## Overview

curl-impersonate is a browser-fingerprinting-compatible curl distribution, used through browser-specific command-line wrappers or as a libcurl replacement. The documented workflow is to choose a browser profile, invoke curl with its headers and flags, and send requests using browser-like TLS and HTTP handshakes. The repository tree includes profile wrappers and patches, but no curl implementation excerpts; relationships below rely on the README, so internal patch behavior is shown only at the documented level.

Main entry points: [`chrome`](https://github.com/lwthiker/curl-impersonate/tree/main/chrome) (Chrome, Edge, Safari profiles), [`firefox`](https://github.com/lwthiker/curl-impersonate/tree/main/firefox) (Firefox profiles), [`chrome/patches/curl-impersonate.patch`](https://github.com/lwthiker/curl-impersonate/blob/main/chrome/patches/curl-impersonate.patch) (Chrome-family curl patches), [`firefox/patches/curl-impersonate.patch`](https://github.com/lwthiker/curl-impersonate/blob/main/firefox/patches/curl-impersonate.patch) (Firefox curl patches)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_chrome["Chrome-family profiles"]
  node_chrome_profiles["Chrome, Edge, Safari profiles"]
  node_chrome_patch["Chrome-family curl patches"]
end

subgraph group_firefox["Firefox profiles"]
  node_firefox_profiles["Firefox profiles"]
  node_firefox_patch["Firefox curl patches"]
end

subgraph group_runtime["Impersonation runtime"]
  node_curl_cli["curl command line"]
  node_libcurl["libcurl integration"]
end

node_user(("CLI user"))
node_web_service(("Web service"))

node_user -->|"chooses profile"| node_chrome_profiles
node_user -->|"chooses profile"| node_firefox_profiles
node_chrome_profiles -->|"launches with flags"| node_curl_cli
node_firefox_profiles -->|"launches with flags"| node_curl_cli
node_chrome_patch -->|"modifies behavior"| node_curl_cli
node_firefox_patch -->|"modifies behavior"| node_curl_cli
node_curl_cli -->|"sends browser-like handshakes"| node_web_service
node_user -->|"integrates as library"| node_libcurl
node_libcurl -->|"sends requests"| node_web_service

click node_chrome_profiles "https://github.com/lwthiker/curl-impersonate/tree/main/chrome"
click node_chrome_patch "https://github.com/lwthiker/curl-impersonate/blob/main/chrome/patches/curl-impersonate.patch"
click node_firefox_profiles "https://github.com/lwthiker/curl-impersonate/tree/main/firefox"
click node_firefox_patch "https://github.com/lwthiker/curl-impersonate/blob/main/firefox/patches/curl-impersonate.patch"

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_chrome_profiles,node_chrome_patch,node_user toneBlue
class node_firefox_profiles,node_firefox_patch toneAmber
class node_curl_cli,node_libcurl toneMint
class node_web_service toneIndigo
```

## Components

### Chrome-family profiles

- [Chrome, Edge, Safari profiles](https://github.com/lwthiker/curl-impersonate/tree/main/chrome): `chrome`
- [Chrome-family curl patches](https://github.com/lwthiker/curl-impersonate/blob/main/chrome/patches/curl-impersonate.patch): `chrome/patches/curl-impersonate.patch`

### Firefox profiles

- [Firefox profiles](https://github.com/lwthiker/curl-impersonate/tree/main/firefox): `firefox`
- [Firefox curl patches](https://github.com/lwthiker/curl-impersonate/blob/main/firefox/patches/curl-impersonate.patch): `firefox/patches/curl-impersonate.patch`

### Impersonation runtime

- **curl command line**
- **libcurl integration**

### Other components

- **CLI user**
- **Web service**

## Connections

- CLI user → Chrome, Edge, Safari profiles: chooses profile (evidence: `README.md`)
- CLI user → Firefox profiles: chooses profile (evidence: `README.md`)
- Chrome, Edge, Safari profiles → curl command line: launches with flags (evidence: `README.md`)
- Firefox profiles → curl command line: launches with flags (evidence: `README.md`)
- Chrome-family curl patches → curl command line: modifies behavior (evidence: `README.md`)
- Firefox curl patches → curl command line: modifies behavior (evidence: `README.md`)
- curl command line → Web service: sends browser-like handshakes (evidence: `README.md`)
- CLI user → libcurl integration: integrates as library (evidence: `README.md`)
- libcurl integration → Web service: sends requests (evidence: `README.md`)
