# dragoncraftgg/claude-code-vpn-launcher architecture

> Architecture diagram of the GitHub repository dragoncraftgg/claude-code-vpn-launcher, 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/dragoncraftgg/claude-code-vpn-launcher
- Repository: https://github.com/dragoncraftgg/claude-code-vpn-launcher

## Overview

This Windows launcher intercepts the global `claude` command, collects VPN settings when needed, and offers direct or local-proxy launch modes. The main runtime path runs through the launcher and its VPN manager; the wrappers then hand off to native Claude Code, with proxy variables applied only in proxy mode. The README also documents importing Claude API settings and restoring wrappers on uninstall. The wrapper implementations and install/uninstall scripts were not sampled, so those relationships are based on README statements.

Main entry points: [`files/claude.ps1`](https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/claude.ps1) (PowerShell Wrapper), [`files/launcher.js`](https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/launcher.js) (Interactive Launcher), [`files/claude.cmd`](https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/claude.cmd) (claude Command), [`files/vpn-manager.js`](https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/vpn-manager.js) (VPN Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Command and Menu"]
  node_command["claude Command<br/>[claude.cmd]"]
  node_powershell["PowerShell Wrapper<br/>[claude.ps1]"]
  node_launcher["Interactive Launcher<br/>[launcher.js]"]
end

subgraph group_vpn["VPN Proxy"]
  node_settings["VPN Settings<br/>[vpn-manager.js]"]
  node_manager["VPN Manager<br/>[vpn-manager.js]"]
  node_singbox["sing-box Proxy"]
end

subgraph group_launch["Claude Handoff"]
  node_claude["Native Claude Code"]
  node_api_settings["Claude API Settings"]
end

node_user(("User"))

node_user -->|"runs"| node_command
node_command -->|"dispatches"| node_powershell
node_powershell -->|"starts"| node_launcher
node_launcher -->|"reads / writes"| node_settings
node_launcher -->|"starts / stops"| node_manager
node_manager -->|"starts / stops"| node_singbox
node_powershell -->|"imports env"| node_api_settings
node_powershell -->|"launches"| node_claude
node_singbox -->|"proxies traffic"| node_claude

click node_command "https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/claude.cmd"
click node_powershell "https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/claude.ps1"
click node_launcher "https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/launcher.js"
click node_settings "https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/vpn-manager.js"
click node_manager "https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/vpn-manager.js"

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_command,node_powershell,node_launcher,node_user toneBlue
class node_settings,node_manager,node_singbox toneAmber
class node_claude,node_api_settings toneMint
```

## Components

### Command and Menu

- [claude Command](https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/claude.cmd): `files/claude.cmd`
- [PowerShell Wrapper](https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/claude.ps1): `files/claude.ps1`
- [Interactive Launcher](https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/launcher.js): `files/launcher.js`

### VPN Proxy

- [VPN Settings](https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/vpn-manager.js): `files/vpn-manager.js`
- [VPN Manager](https://github.com/dragoncraftgg/claude-code-vpn-launcher/blob/main/files/vpn-manager.js): `files/vpn-manager.js`
- **sing-box Proxy**

### Claude Handoff

- **Native Claude Code**
- **Claude API Settings**

### Other components

- **User**

## Connections

- User → claude Command: runs (evidence: `README.md`)
- claude Command → PowerShell Wrapper: dispatches (evidence: `README.md`)
- PowerShell Wrapper → Interactive Launcher: starts (evidence: `README.md`)
- Interactive Launcher → VPN Settings: reads / writes (evidence: `files/launcher.js`)
- Interactive Launcher → VPN Manager: starts / stops (evidence: `files/launcher.js`)
- VPN Manager → sing-box Proxy: starts / stops (evidence: `files/vpn-manager.js`)
- PowerShell Wrapper → Claude API Settings: imports env (evidence: `README.md`)
- PowerShell Wrapper → Native Claude Code: launches (evidence: `README.md`)
- sing-box Proxy → Native Claude Code: proxies traffic (evidence: `README.md`)
