# marselnet86/node-master architecture

> Architecture diagram of the GitHub repository marselnet86/node-master, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/marselnet86/node-master
- Repository: https://github.com/marselnet86/node-master

## Overview

node-master is a Bash tool for configuring a Remnawave server with optional CDN, VLESS Reality, and Hysteria2 connectivity. The main workflow gathers settings, prepares host networking and services, generates files for the Remnawave panel, and installs or updates the node; a separate checker tests subscription traffic. The README documents these stages and their connections, but no source excerpts were supplied, so relationships below rely on the README and do not assert internal function calls.

Main entry points: [`deploy.sh`](https://github.com/marselnet86/node-master/blob/main/deploy.sh) (Deployment entry), [`lib/nginx.sh`](https://github.com/marselnet86/node-master/blob/main/lib/nginx.sh) (CDN nginx proxy), [`lib/remnawave.sh`](https://github.com/marselnet86/node-master/blob/main/lib/remnawave.sh) (Panel file preparation), [`lib/sysctl.sh`](https://github.com/marselnet86/node-master/blob/main/lib/sysctl.sh) (Kernel tuning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup workflow"]
  node_deploy["Deployment entry<br/>[deploy.sh]"]
  node_prompts["Setup prompts<br/>[prompt.sh]"]
  node_validation["Settings validation<br/>[validate.sh]"]
  node_common["Shared utilities<br/>[common.sh]"]
  node_i18n["Language messages<br/>[i18n-ru.sh]"]
end

subgraph group_host["Host services"]
  node_certificates["TLS certificates<br/>[certs.sh]"]
  node_nginx["CDN nginx proxy<br/>[nginx.sh]"]
  node_nginx_templates["nginx configuration<br/>[nginx.conf.tmpl]"]
  node_acme_template["ACME configuration"]
  node_site_template["CDN site configuration"]
  node_sysctl["Kernel tuning<br/>[sysctl.sh]"]
  node_sysctl_template["Kernel settings<br/>[sysctl-99-cdn.conf]"]
end

subgraph group_panel["Panel configuration"]
  node_panel_files["Panel profile and inbounds"]
  node_subscription_template["Subscription template"]
  node_cdn_host["CDN host extras"]
  node_panel_operator["Remnawave panel"]
  node_node_setup["Node installation<br/>[node.sh]"]
  node_remnawave["Panel file preparation<br/>[remnawave.sh]"]
end

subgraph group_verification["Verification and traffic"]
  node_xray["Xray node"]
  node_cdn["Timeweb CDN"]
  node_client(("VPN client"))
  node_checker["Subscription checker<br/>[check.sh]"]
end

node_operator(("Server operator"))

node_operator -->|"starts"| node_deploy
node_deploy -.->|"collects settings"| node_prompts
node_deploy -.->|"validates settings"| node_validation
node_deploy -->|"issues certificates"| node_certificates
node_deploy -->|"configures proxy"| node_nginx
node_nginx -.->|"uses template"| node_nginx_templates
node_nginx -.->|"uses template"| node_acme_template
node_nginx -.->|"uses template"| node_site_template
node_deploy -->|"tunes kernel"| node_sysctl
node_sysctl -.->|"uses settings"| node_sysctl_template
node_deploy -->|"prepares panel files"| node_remnawave
node_remnawave -.->|"generates profile"| node_panel_files
node_remnawave -.->|"prepares template"| node_subscription_template
node_remnawave -.->|"prepares host extras"| node_cdn_host
node_operator -->|"configures node"| node_panel_operator
node_deploy -->|"sets up node"| node_node_setup
node_node_setup -->|"starts node"| node_xray
node_client -->|"connects via CDN"| node_cdn
node_cdn -->|"forwards HTTPS"| node_nginx
node_nginx -->|"forwards xhttp"| node_xray
node_client -->|"connects directly"| node_xray
node_operator -->|"runs checks"| node_checker
node_checker -->|"tests subscription"| node_client

click node_deploy "https://github.com/marselnet86/node-master/blob/main/deploy.sh"
click node_prompts "https://github.com/marselnet86/node-master/blob/main/lib/prompt.sh"
click node_validation "https://github.com/marselnet86/node-master/blob/main/lib/validate.sh"
click node_common "https://github.com/marselnet86/node-master/blob/main/lib/common.sh"
click node_i18n "https://github.com/marselnet86/node-master/blob/main/lib/i18n-ru.sh"
click node_certificates "https://github.com/marselnet86/node-master/blob/main/lib/certs.sh"
click node_nginx "https://github.com/marselnet86/node-master/blob/main/lib/nginx.sh"
click node_nginx_templates "https://github.com/marselnet86/node-master/blob/main/templates/nginx.conf.tmpl"
click node_acme_template "https://github.com/marselnet86/node-master/blob/main/templates/acme-http.conf.tmpl"
click node_site_template "https://github.com/marselnet86/node-master/blob/main/templates/site-8444.conf.tmpl"
click node_sysctl "https://github.com/marselnet86/node-master/blob/main/lib/sysctl.sh"
click node_sysctl_template "https://github.com/marselnet86/node-master/blob/main/templates/sysctl-99-cdn.conf"
click node_panel_files "https://github.com/marselnet86/node-master/blob/main/remnawave/config-profile.json"
click node_subscription_template "https://github.com/marselnet86/node-master/blob/main/remnawave/subscription-xray-json.json"
click node_cdn_host "https://github.com/marselnet86/node-master/blob/main/remnawave/host-xhttp-extra.json"
click node_node_setup "https://github.com/marselnet86/node-master/blob/main/lib/node.sh"
click node_remnawave "https://github.com/marselnet86/node-master/blob/main/lib/remnawave.sh"
click node_checker "https://github.com/marselnet86/node-master/blob/main/check.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_deploy,node_prompts,node_validation,node_common,node_i18n toneBlue
class node_certificates,node_nginx,node_nginx_templates,node_acme_template,node_site_template,node_sysctl,node_sysctl_template toneAmber
class node_panel_files,node_subscription_template,node_cdn_host,node_panel_operator,node_node_setup,node_remnawave,node_operator toneMint
class node_xray,node_cdn,node_client,node_checker toneRose
```

## Components

### Setup workflow

- [Deployment entry](https://github.com/marselnet86/node-master/blob/main/deploy.sh): `deploy.sh`
- [Setup prompts](https://github.com/marselnet86/node-master/blob/main/lib/prompt.sh): `lib/prompt.sh`
- [Settings validation](https://github.com/marselnet86/node-master/blob/main/lib/validate.sh): `lib/validate.sh`
- [Shared utilities](https://github.com/marselnet86/node-master/blob/main/lib/common.sh): `lib/common.sh`
- [Language messages](https://github.com/marselnet86/node-master/blob/main/lib/i18n-ru.sh): `lib/i18n-ru.sh`

### Host services

- [TLS certificates](https://github.com/marselnet86/node-master/blob/main/lib/certs.sh): `lib/certs.sh`
- [CDN nginx proxy](https://github.com/marselnet86/node-master/blob/main/lib/nginx.sh): `lib/nginx.sh`
- [nginx configuration](https://github.com/marselnet86/node-master/blob/main/templates/nginx.conf.tmpl): `templates/nginx.conf.tmpl`
- [ACME configuration](https://github.com/marselnet86/node-master/blob/main/templates/acme-http.conf.tmpl): `templates/acme-http.conf.tmpl`
- [CDN site configuration](https://github.com/marselnet86/node-master/blob/main/templates/site-8444.conf.tmpl): `templates/site-8444.conf.tmpl`
- [Kernel tuning](https://github.com/marselnet86/node-master/blob/main/lib/sysctl.sh): `lib/sysctl.sh`
- [Kernel settings](https://github.com/marselnet86/node-master/blob/main/templates/sysctl-99-cdn.conf): `templates/sysctl-99-cdn.conf`

### Panel configuration

- [Panel profile and inbounds](https://github.com/marselnet86/node-master/blob/main/remnawave/config-profile.json): `remnawave/config-profile.json`
- [Subscription template](https://github.com/marselnet86/node-master/blob/main/remnawave/subscription-xray-json.json): `remnawave/subscription-xray-json.json`
- [CDN host extras](https://github.com/marselnet86/node-master/blob/main/remnawave/host-xhttp-extra.json): `remnawave/host-xhttp-extra.json`
- **Remnawave panel**
- [Node installation](https://github.com/marselnet86/node-master/blob/main/lib/node.sh): `lib/node.sh`
- [Panel file preparation](https://github.com/marselnet86/node-master/blob/main/lib/remnawave.sh): `lib/remnawave.sh`

### Verification and traffic

- **Xray node**
- **Timeweb CDN**
- **VPN client**
- [Subscription checker](https://github.com/marselnet86/node-master/blob/main/check.sh): `check.sh`

### Other components

- **Server operator**

## Connections

- Server operator → Deployment entry: starts (evidence: `README.md`)
- Deployment entry → Setup prompts: collects settings
- Deployment entry → Settings validation: validates settings
- Deployment entry → TLS certificates: issues certificates (evidence: `README.md`)
- Deployment entry → CDN nginx proxy: configures proxy (evidence: `README.md`)
- CDN nginx proxy → nginx configuration: uses template
- CDN nginx proxy → ACME configuration: uses template
- CDN nginx proxy → CDN site configuration: uses template
- Deployment entry → Kernel tuning: tunes kernel (evidence: `README.md`)
- Kernel tuning → Kernel settings: uses settings
- Deployment entry → Panel file preparation: prepares panel files (evidence: `README.md`)
- Panel file preparation → Panel profile and inbounds: generates profile
- Panel file preparation → Subscription template: prepares template
- Panel file preparation → CDN host extras: prepares host extras
- Server operator → Remnawave panel: configures node (evidence: `README.md`)
- Deployment entry → Node installation: sets up node (evidence: `README.md`)
- Node installation → Xray node: starts node (evidence: `README.md`)
- VPN client → Timeweb CDN: connects via CDN (evidence: `README.md`)
- Timeweb CDN → CDN nginx proxy: forwards HTTPS (evidence: `README.md`)
- CDN nginx proxy → Xray node: forwards xhttp (evidence: `README.md`)
- VPN client → Xray node: connects directly (evidence: `README.md`)
- Server operator → Subscription checker: runs checks (evidence: `README.md`)
- Subscription checker → VPN client: tests subscription (evidence: `README.md`)
