# rekt0ro/proxy-harvester architecture

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

- Interactive diagram: https://gitdiagram.com/rekt0ro/proxy-harvester
- Repository: https://github.com/rekt0ro/proxy-harvester

## Overview

Proxy-Harvester gathers public proxy configurations, extracts and tests them, then publishes complete and light subscriptions in plain-text and Base64 formats. The principal runtime is in `src/main.rs`; the graph separates its documented stages even though they share one file. README capabilities define the supported protocol scope and subscription variants. The excerpts do not show the source-list file or full implementations, so source configuration details and uncertain internal wiring are omitted.

Main entry points: [`src/main.rs`](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs) (Harvester runtime), [`subscriptions/all.txt`](https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/all.txt) (All subscription), [`subscriptions/light.txt`](https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/light.txt) (Light subscription), [`subscriptions/all-base64.txt`](https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/all-base64.txt) (All Base64)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_harvest["Collection"]
  node_harvester["Harvester runtime<br/>[main.rs]"]
  node_fetch["Fetch source text<br/>[main.rs]"]
  node_extract["Extract configs<br/>[main.rs]"]
  node_normalize["Normalize configs<br/>[main.rs]"]
end

subgraph group_validate["Validation and selection"]
  node_reachability["TCP reachability<br/>[main.rs]"]
  node_filter["Compatibility filter<br/>[main.rs]"]
  node_lightselect["Light selection<br/>[main.rs]"]
end

subgraph group_publish["Subscriptions"]
  node_encode["Base64 encoding<br/>[main.rs]"]
  node_publisher["Subscription publisher<br/>[main.rs]"]
  node_alltxt["All subscription<br/>[all.txt]"]
  node_lighttxt["Light subscription<br/>[light.txt]"]
  node_allb64["All Base64<br/>[all-base64.txt]"]
  node_lightb64["Light Base64<br/>[light-base64.txt]"]
end

node_feeds(("Public feeds"))
node_clients(("Subscription clients"))

node_harvester -->|"runs collection"| node_fetch
node_fetch -->|"downloads from"| node_feeds
node_fetch -->|"parses response"| node_extract
node_harvester -->|"normalizes results"| node_normalize
node_harvester -->|"tests chunks"| node_reachability
node_harvester -->|"filters results"| node_filter
node_harvester -->|"selects light set"| node_lightselect
node_harvester -->|"encodes variants"| node_encode
node_harvester -->|"publishes outputs"| node_publisher
node_publisher -->|"writes"| node_alltxt
node_publisher -->|"writes"| node_lighttxt
node_publisher -->|"writes"| node_allb64
node_publisher -->|"writes"| node_lightb64
node_clients -->|"consume"| node_alltxt
node_clients -->|"consume"| node_lighttxt
node_clients -->|"consume"| node_allb64
node_clients -->|"consume"| node_lightb64

click node_harvester "https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs"
click node_fetch "https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs"
click node_extract "https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs"
click node_normalize "https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs"
click node_reachability "https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs"
click node_filter "https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs"
click node_lightselect "https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs"
click node_encode "https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs"
click node_publisher "https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs"
click node_alltxt "https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/all.txt"
click node_lighttxt "https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/light.txt"
click node_allb64 "https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/all-base64.txt"
click node_lightb64 "https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/light-base64.txt"

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_harvester,node_fetch,node_extract,node_normalize,node_clients toneBlue
class node_reachability,node_filter,node_lightselect toneAmber
class node_encode,node_publisher,node_alltxt,node_lighttxt,node_allb64,node_lightb64 toneMint
class node_feeds toneIndigo
```

## Components

### Collection

- [Harvester runtime](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs): `src/main.rs`
- [Fetch source text](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs): `src/main.rs`
- [Extract configs](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs): `src/main.rs`
- [Normalize configs](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs): `src/main.rs`

### Validation and selection

- [TCP reachability](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs): `src/main.rs`
- [Compatibility filter](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs): `src/main.rs`
- [Light selection](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs): `src/main.rs`

### Subscriptions

- [Base64 encoding](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs): `src/main.rs`
- [Subscription publisher](https://github.com/rekt0ro/proxy-harvester/blob/main/src/main.rs): `src/main.rs`
- [All subscription](https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/all.txt): `subscriptions/all.txt`
- [Light subscription](https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/light.txt): `subscriptions/light.txt`
- [All Base64](https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/all-base64.txt): `subscriptions/all-base64.txt`
- [Light Base64](https://github.com/rekt0ro/proxy-harvester/blob/main/subscriptions/light-base64.txt): `subscriptions/light-base64.txt`

### Other components

- **Public feeds**
- **Subscription clients**

## Connections

- Harvester runtime → Fetch source text: runs collection
- Fetch source text → Public feeds: downloads from
- Fetch source text → Extract configs: parses response
- Harvester runtime → Normalize configs: normalizes results
- Harvester runtime → TCP reachability: tests chunks
- Harvester runtime → Compatibility filter: filters results
- Harvester runtime → Light selection: selects light set
- Harvester runtime → Base64 encoding: encodes variants
- Harvester runtime → Subscription publisher: publishes outputs
- Subscription publisher → All subscription: writes
- Subscription publisher → Light subscription: writes
- Subscription publisher → All Base64: writes
- Subscription publisher → Light Base64: writes
- Subscription clients → All subscription: consume
- Subscription clients → Light subscription: consume
- Subscription clients → All Base64: consume
- Subscription clients → Light Base64: consume
