# v2ray/domain-list-community architecture

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

- Interactive diagram: https://gitdiagram.com/v2ray/domain-list-community
- Repository: https://github.com/v2ray/domain-list-community

## Overview

This repository builds Project V geosite routing data from domain-list files. The principal workflow is to select a data directory, load its lists, expand inclusions, convert entries to GeoSite protobuf records, and write `dlc.dat`. The implementation is concentrated in `main.go`; the README documents the list syntax, attributes, and intended routing use. Source evidence is limited to the excerpted `main.go` and README.

Main entry points: [`main.go`](https://github.com/v2ray/domain-list-community/blob/master/main.go) (Generator CLI), [`data`](https://github.com/v2ray/domain-list-community/tree/master/data) (Domain lists)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_operator(("Operator"))
node_generator["Generator CLI<br/>[main.go]"]
node_path_selection["Path selection<br/>[main.go]"]
node_domain_lists["Domain lists"]
node_list_loading["List loading<br/>[main.go]"]
node_include_expansion["Include expansion<br/>[main.go]"]
node_protobuf_conversion["Protobuf conversion<br/>[main.go]"]
node_dlc_output["dlc.dat"]
node_project_v(("Project V routing"))

node_operator -->|"runs"| node_generator
node_generator -->|"selects path"| node_path_selection
node_generator -->|"walks and loads"| node_list_loading
node_list_loading -->|"reads lists"| node_domain_lists
node_generator -->|"expands lists"| node_include_expansion
node_generator -->|"converts entries"| node_protobuf_conversion
node_generator -->|"writes output"| node_dlc_output
node_dlc_output -->|"supplies geosite data"| node_project_v

click node_generator "https://github.com/v2ray/domain-list-community/blob/master/main.go"
click node_path_selection "https://github.com/v2ray/domain-list-community/blob/master/main.go"
click node_domain_lists "https://github.com/v2ray/domain-list-community/tree/master/data"
click node_list_loading "https://github.com/v2ray/domain-list-community/blob/master/main.go"
click node_include_expansion "https://github.com/v2ray/domain-list-community/blob/master/main.go"
click node_protobuf_conversion "https://github.com/v2ray/domain-list-community/blob/master/main.go"

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_operator,node_dlc_output,node_project_v toneIndigo
class node_generator,node_path_selection,node_domain_lists,node_list_loading,node_include_expansion,node_protobuf_conversion toneTeal
```

## Components

### Other components

- **Operator**
- [Generator CLI](https://github.com/v2ray/domain-list-community/blob/master/main.go): `main.go`
- [Path selection](https://github.com/v2ray/domain-list-community/blob/master/main.go): `main.go`
- [Domain lists](https://github.com/v2ray/domain-list-community/tree/master/data): `data`
- [List loading](https://github.com/v2ray/domain-list-community/blob/master/main.go): `main.go`
- [Include expansion](https://github.com/v2ray/domain-list-community/blob/master/main.go): `main.go`
- [Protobuf conversion](https://github.com/v2ray/domain-list-community/blob/master/main.go): `main.go`
- **dlc.dat**
- **Project V routing**

## Connections

- Operator → Generator CLI: runs (evidence: `README.md`)
- Generator CLI → Path selection: selects path (evidence: `main.go`)
- Generator CLI → List loading: walks and loads (evidence: `main.go`)
- List loading → Domain lists: reads lists (evidence: `main.go`)
- Generator CLI → Include expansion: expands lists (evidence: `main.go`)
- Generator CLI → Protobuf conversion: converts entries (evidence: `main.go`)
- Generator CLI → dlc.dat: writes output (evidence: `main.go`)
- dlc.dat → Project V routing: supplies geosite data (evidence: `README.md`)
