# chiakorh/wsk architecture

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

- Interactive diagram: https://gitdiagram.com/chiakorh/wsk
- Repository: https://github.com/chiakorh/wsk

## Overview

WSK turns WhiteDNS subscriptions into country-specific feeds for other VPN clients. The main workflow fetches Mihomo proxies and Base64-encoded share links, detects countries, then writes four feed formats; users consume a country’s feed directly or find links through the companion site. The README describes hourly updates and site features, but the workflow and site implementation were not sampled, so those details are shown only where documented and no internal site data flow is inferred.

Main entry points: [`split.py`](https://github.com/chiakorh/wsk/blob/main/split.py) (Fetch and split), [`subs/mihomo`](https://github.com/chiakorh/wsk/tree/main/subs/mihomo) (Mihomo feeds), [`subs/clash`](https://github.com/chiakorh/wsk/tree/main/subs/clash) (Clash configs), [`subs/base64`](https://github.com/chiakorh/wsk/tree/main/subs/base64) (Base64 links)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processing["Feed processing"]
  node_splitter["Fetch and split<br/>[split.py]"]
  node_country_detection["Country detection<br/>[split.py]"]
end

subgraph group_feeds["Country feeds"]
  node_mihomo_feeds["Mihomo feeds"]
  node_clash_feeds["Clash configs"]
  node_base64_feeds["Base64 links"]
  node_raw_feeds["Raw links"]
  node_feed_index["Feed index<br/>[index.json]"]
end

subgraph group_discovery["Feed discovery"]
  node_site["Feed link site<br/>[index.html]"]
end

node_user(("VPN app user"))
node_upstream["WhiteDNS subscriptions"]

node_upstream -->|"provides subscriptions"| node_splitter
node_splitter -->|"groups by country"| node_country_detection
node_splitter -->|"writes proxies"| node_mihomo_feeds
node_splitter -->|"writes configs"| node_clash_feeds
node_splitter -->|"writes encoded links"| node_base64_feeds
node_splitter -->|"writes plain links"| node_raw_feeds
node_splitter -->|"writes counts"| node_feed_index
node_user -->|"imports feed"| node_mihomo_feeds
node_user -->|"imports feed"| node_clash_feeds
node_user -->|"imports feed"| node_base64_feeds
node_user -->|"copies links"| node_raw_feeds
node_user -->|"finds feed links"| node_site

click node_splitter "https://github.com/chiakorh/wsk/blob/main/split.py"
click node_country_detection "https://github.com/chiakorh/wsk/blob/main/split.py"
click node_mihomo_feeds "https://github.com/chiakorh/wsk/tree/main/subs/mihomo"
click node_clash_feeds "https://github.com/chiakorh/wsk/tree/main/subs/clash"
click node_base64_feeds "https://github.com/chiakorh/wsk/tree/main/subs/base64"
click node_raw_feeds "https://github.com/chiakorh/wsk/tree/main/subs/raw"
click node_feed_index "https://github.com/chiakorh/wsk/blob/main/subs/index.json"
click node_site "https://github.com/chiakorh/wsk/blob/main/docs/index.html"

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_splitter,node_country_detection,node_user toneBlue
class node_mihomo_feeds,node_clash_feeds,node_base64_feeds,node_raw_feeds,node_feed_index toneAmber
class node_site toneMint
class node_upstream toneIndigo
```

## Components

### Feed processing

- [Fetch and split](https://github.com/chiakorh/wsk/blob/main/split.py): `split.py`
- [Country detection](https://github.com/chiakorh/wsk/blob/main/split.py): `split.py`

### Country feeds

- [Mihomo feeds](https://github.com/chiakorh/wsk/tree/main/subs/mihomo): `subs/mihomo`
- [Clash configs](https://github.com/chiakorh/wsk/tree/main/subs/clash): `subs/clash`
- [Base64 links](https://github.com/chiakorh/wsk/tree/main/subs/base64): `subs/base64`
- [Raw links](https://github.com/chiakorh/wsk/tree/main/subs/raw): `subs/raw`
- [Feed index](https://github.com/chiakorh/wsk/blob/main/subs/index.json): `subs/index.json`

### Feed discovery

- [Feed link site](https://github.com/chiakorh/wsk/blob/main/docs/index.html): `docs/index.html`

### Other components

- **VPN app user**
- **WhiteDNS subscriptions**

## Connections

- WhiteDNS subscriptions → Fetch and split: provides subscriptions (evidence: `README.md`)
- Fetch and split → Country detection: groups by country (evidence: `split.py`)
- Fetch and split → Mihomo feeds: writes proxies (evidence: `split.py`)
- Fetch and split → Clash configs: writes configs (evidence: `split.py`)
- Fetch and split → Base64 links: writes encoded links (evidence: `split.py`)
- Fetch and split → Raw links: writes plain links (evidence: `split.py`)
- Fetch and split → Feed index: writes counts (evidence: `split.py`)
- VPN app user → Mihomo feeds: imports feed (evidence: `README.md`)
- VPN app user → Clash configs: imports feed (evidence: `README.md`)
- VPN app user → Base64 links: imports feed (evidence: `README.md`)
- VPN app user → Raw links: copies links (evidence: `README.md`)
- VPN app user → Feed link site: finds feed links (evidence: `README.md`)
