# 233boy/v2ray architecture

> Architecture diagram of the GitHub repository 233boy/v2ray, 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/233boy/v2ray
- Repository: https://github.com/233boy/v2ray

## Overview

This repository is a shell-based V2Ray installation and management tool. Its documented workflow is a user invoking the `v2ray` command to perform setup or manage configurations and the running service. The README also describes protocol/configuration operations, TLS, DNS, BBR, and compatibility commands. No source excerpts were provided, so internal calls and mappings from those capabilities to individual scripts cannot be verified; the subsystem nodes use only paths visible in the tree.

Main entry points: [`v2ray.sh`](https://github.com/233boy/v2ray/blob/master/v2ray.sh) (V2Ray CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Command interface"]
  node_cli["V2Ray CLI<br/>[v2ray.sh]"]
end

subgraph group_config["Configuration management"]
  node_config_ops["Config operations<br/>[core.sh]"]
  node_protocols["Protocol configs"]
end

subgraph group_service["Installation and service"]
  node_install["Install and updates<br/>[download.sh]"]
  node_service_control["Service control<br/>[systemd.sh]"]
end

subgraph group_network["Networking features"]
  node_tls["TLS and web<br/>[caddy.sh]"]
  node_dns["DNS settings<br/>[dns.sh]"]
  node_bbr["BBR<br/>[bbr.sh]"]
end

node_user(("Operator"))

node_user -->|"runs commands"| node_cli

click node_cli "https://github.com/233boy/v2ray/blob/master/v2ray.sh"
click node_config_ops "https://github.com/233boy/v2ray/blob/master/src/core.sh"
click node_protocols "https://github.com/233boy/v2ray/tree/master/src"
click node_tls "https://github.com/233boy/v2ray/blob/master/src/caddy.sh"
click node_dns "https://github.com/233boy/v2ray/blob/master/src/dns.sh"
click node_bbr "https://github.com/233boy/v2ray/blob/master/src/bbr.sh"
click node_install "https://github.com/233boy/v2ray/blob/master/src/download.sh"
click node_service_control "https://github.com/233boy/v2ray/blob/master/src/systemd.sh"

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_cli toneBlue
class node_config_ops,node_protocols toneAmber
class node_install,node_service_control toneMint
class node_tls,node_dns,node_bbr toneRose
class node_user toneIndigo
```

## Components

### Command interface

- [V2Ray CLI](https://github.com/233boy/v2ray/blob/master/v2ray.sh): `v2ray.sh`

### Configuration management

- [Config operations](https://github.com/233boy/v2ray/blob/master/src/core.sh): `src/core.sh`
- [Protocol configs](https://github.com/233boy/v2ray/tree/master/src): `src`

### Installation and service

- [Install and updates](https://github.com/233boy/v2ray/blob/master/src/download.sh): `src/download.sh`
- [Service control](https://github.com/233boy/v2ray/blob/master/src/systemd.sh): `src/systemd.sh`

### Networking features

- [TLS and web](https://github.com/233boy/v2ray/blob/master/src/caddy.sh): `src/caddy.sh`
- [DNS settings](https://github.com/233boy/v2ray/blob/master/src/dns.sh): `src/dns.sh`
- [BBR](https://github.com/233boy/v2ray/blob/master/src/bbr.sh): `src/bbr.sh`

### Other components

- **Operator**

## Connections

- Operator → V2Ray CLI: runs commands (evidence: `README.md`)
