# hamzaless/vanguard-gateway-notes architecture

> Architecture diagram of the GitHub repository hamzaless/vanguard-gateway-notes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hamzaless/vanguard-gateway-notes
- Repository: https://github.com/hamzaless/vanguard-gateway-notes

## Overview

Vanguard Gateway is a defensive reverse-engineering reference for the Vanguard client stack, not a live client or bypass tool. A researcher follows the documented protocol findings and can use the educational reference code to construct gateway requests or serve the client’s named-pipe IPC; the code does not supply kernel-only identity values. The graph separates wire/auth, IPC, and research findings. Findings beyond the sampled reference code are represented by their documented paths; their internal relationships are not inferred.

Main entry points: [`reference/pipe_server.py`](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/pipe_server.py) (Named-pipe server), [`reference/auth_build.py`](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/auth_build.py) (Auth request builder), [`docs/01-protocol.md`](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/01-protocol.md) (Wire protocol), [`docs/05-ipc-pipe.md`](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/05-ipc-pipe.md) (IPC framing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_wire["Gateway protocol"]
  node_wire_spec["Wire protocol<br/>[01-protocol.md]"]
  node_crypto_spec["Envelope cryptography<br/>[02-crypto.md]"]
  node_auth_spec["Auth payload<br/>[03-auth-payload.md]"]
  node_schema["Recovered schema<br/>[vanguard.proto]"]
end

subgraph group_ipc["Client IPC"]
  node_ipc_spec["IPC framing<br/>[05-ipc-pipe.md]"]
end

subgraph group_research["Research findings"]
  node_key_recovery["Key recovery<br/>[04-key-recovery.md]"]
  node_client_gates["Client dependency gates<br/>[06-client-gates.md]"]
  node_detection["Detection findings<br/>[07-detection.md]"]
  node_rms["RMS session carrier<br/>[13-rms.md]"]
  node_memory["Memory capture"]
  node_additional["Additional findings"]
  node_archive["Archive findings"]
  node_measurements["Measurements<br/>[measurements.md]"]
  node_knowledge["Knowledge base<br/>[knowledge.json]"]
end

subgraph group_reference["Reference code"]
  node_auth_builder["Auth request builder<br/>[auth_build.py]"]
  node_http_sender["Gateway transport<br/>[auth_build.py]"]
  node_ipc_codec["IPC codec<br/>[pipe_proto.py]"]
  node_pipe_server["Named-pipe server<br/>[pipe_server.py]"]
end

node_researcher(("Researcher"))
node_gateway{{"Gateway service"}}
node_client(("Vanguard client"))

node_researcher -->|"consults"| node_wire_spec
node_researcher -->|"consults"| node_ipc_spec
node_researcher -->|"consults"| node_key_recovery
node_researcher -->|"consults"| node_client_gates
node_researcher -->|"consults"| node_detection
node_researcher -->|"consults"| node_memory
node_researcher -->|"consults"| node_rms
node_researcher -->|"consults"| node_additional
node_researcher -->|"consults"| node_archive
node_researcher -->|"consults"| node_measurements
node_researcher -->|"consults"| node_knowledge
node_researcher -->|"uses reference"| node_auth_builder
node_auth_builder -->|"sends frames"| node_http_sender
node_http_sender -->|"posts request"| node_gateway
node_client -->|"connects to pipe"| node_pipe_server
node_pipe_server -->|"parses and builds"| node_ipc_codec
node_pipe_server -->|"writes replies"| node_client

click node_wire_spec "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/01-protocol.md"
click node_crypto_spec "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/02-crypto.md"
click node_auth_spec "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/03-auth-payload.md"
click node_schema "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/schemas/vanguard.proto"
click node_auth_builder "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/auth_build.py"
click node_http_sender "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/auth_build.py"
click node_ipc_spec "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/05-ipc-pipe.md"
click node_ipc_codec "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/pipe_proto.py"
click node_pipe_server "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/pipe_server.py"
click node_key_recovery "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/04-key-recovery.md"
click node_client_gates "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/06-client-gates.md"
click node_detection "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/07-detection.md"
click node_rms "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/13-rms.md"
click node_memory "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/15-memory-capture.md"
click node_additional "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/16-additional-findings.md"
click node_archive "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/17-archive-findings.md"
click node_measurements "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/data/measurements.md"
click node_knowledge "https://github.com/hamzaless/vanguard-gateway-notes/blob/main/data/knowledge.json"

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_wire_spec,node_crypto_spec,node_auth_spec,node_schema,node_client toneBlue
class node_ipc_spec toneAmber
class node_key_recovery,node_client_gates,node_detection,node_rms,node_memory,node_additional,node_archive,node_measurements,node_knowledge toneMint
class node_auth_builder,node_http_sender,node_ipc_codec,node_pipe_server toneRose
class node_researcher,node_gateway toneIndigo
```

## Components

### Gateway protocol

- [Wire protocol](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/01-protocol.md): `docs/01-protocol.md`
- [Envelope cryptography](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/02-crypto.md): `docs/02-crypto.md`
- [Auth payload](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/03-auth-payload.md): `docs/03-auth-payload.md`
- [Recovered schema](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/schemas/vanguard.proto): `schemas/vanguard.proto`

### Client IPC

- [IPC framing](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/05-ipc-pipe.md): `docs/05-ipc-pipe.md`

### Research findings

- [Key recovery](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/04-key-recovery.md): `docs/04-key-recovery.md`
- [Client dependency gates](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/06-client-gates.md): `docs/06-client-gates.md`
- [Detection findings](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/07-detection.md): `docs/07-detection.md`
- [RMS session carrier](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/13-rms.md): `docs/13-rms.md`
- [Memory capture](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/15-memory-capture.md): `docs/15-memory-capture.md`
- [Additional findings](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/16-additional-findings.md): `docs/16-additional-findings.md`
- [Archive findings](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/docs/17-archive-findings.md): `docs/17-archive-findings.md`
- [Measurements](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/data/measurements.md): `data/measurements.md`
- [Knowledge base](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/data/knowledge.json): `data/knowledge.json`

### Reference code

- [Auth request builder](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/auth_build.py): `reference/auth_build.py`
- [Gateway transport](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/auth_build.py): `reference/auth_build.py`
- [IPC codec](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/pipe_proto.py): `reference/pipe_proto.py`
- [Named-pipe server](https://github.com/hamzaless/vanguard-gateway-notes/blob/main/reference/pipe_server.py): `reference/pipe_server.py`

### Other components

- **Researcher**
- **Gateway service**
- **Vanguard client**

## Connections

- Researcher → Wire protocol: consults (evidence: `README.md`)
- Researcher → IPC framing: consults (evidence: `README.md`)
- Researcher → Key recovery: consults (evidence: `README.md`)
- Researcher → Client dependency gates: consults (evidence: `README.md`)
- Researcher → Detection findings: consults (evidence: `README.md`)
- Researcher → Memory capture: consults (evidence: `README.md`)
- Researcher → RMS session carrier: consults (evidence: `README.md`)
- Researcher → Additional findings: consults (evidence: `README.md`)
- Researcher → Archive findings: consults (evidence: `README.md`)
- Researcher → Measurements: consults (evidence: `README.md`)
- Researcher → Knowledge base: consults (evidence: `README.md`)
- Researcher → Auth request builder: uses reference (evidence: `README.md`)
- Auth request builder → Gateway transport: sends frames (evidence: `reference/auth_build.py`)
- Gateway transport → Gateway service: posts request (evidence: `reference/auth_build.py`)
- Vanguard client → Named-pipe server: connects to pipe (evidence: `reference/pipe_server.py`)
- Named-pipe server → IPC codec: parses and builds (evidence: `reference/pipe_server.py`)
- Named-pipe server → Vanguard client: writes replies (evidence: `reference/pipe_server.py`)
