explaingit

jimzhang168872/vpnkit

11GoAudience · ops devopsComplexity · 3/5ActiveSetup · moderate

TLDR

Terminal manager in Go for the mihomo proxy core, with a TUI and CLI for subscriptions, local nodes, and user rules, all in a single rootless binary.

Mindmap

mindmap
  root((vpnkit))
    Inputs
      Subscription URLs
      Local proxy nodes
      User routing rules
    Outputs
      Local proxy port
      Shell env vars
      Status bar info
    Use Cases
      Manage mihomo from terminal
      Chain proxies through egress
      Apply user rules over subscriptions
    Tech Stack
      Go
      mihomo
      Clash Meta
      TUI

Things people build with this

USE CASE 1

Manage mihomo subscriptions and proxy nodes from a single terminal binary without root

USE CASE 2

Add hand-entered Hysteria2 or Shadowsocks nodes and chain their egress through another source

USE CASE 3

Write local routing rules that always win over rules pulled from a subscription

USE CASE 4

Switch between rule, global, and direct routing modes for the active source

Tech stack

GomihomoClash

Getting it running

Difficulty · moderate Time to first run · 30min

curl-to-bash install is fast, but users behind the Great Firewall must follow INSTALL-CN.md since vpnkit hits github.com directly with no mirror.

In plain English

vpnkit is a terminal app, written in Go, that manages a proxy engine called mihomo. Mihomo is the actively maintained version of the Clash.Meta core, which can route a computer's network traffic through different proxy servers based on rules. The README calls vpnkit a terminal-native manager: there is a TUI you can drive with the keyboard and a matching command-line interface, but no Electron desktop wrapper and no background daemon. The whole thing is a single Go binary and runs without root. The headline features in version 1.0.0 are multi-source subscriptions, hand-entered local nodes, structured local rules, and a single-active-source routing model. A subscription is a remote URL that lists proxy servers. A local node is a proxy you type in yourself, for example a Hysteria2 or Shadowsocks URL. Local rules are user-written routing rules that always win over rules that came from a subscription. The default loyalsoldier rule set is shipped inside the binary as a small gzipped snapshot, so first launch still works on slow or restricted networks without waiting on a CDN. Installation is either a curl-to-bash one-liner that drops the binary into ~/.local/bin and writes a default config, or a make install from source with Go 1.23 or newer. The README is honest that vpnkit reaches github.com directly and offers no mirror fallback, so users behind the Great Firewall are pointed at a dedicated INSTALL-CN.md document with three install paths including a fully offline one. Day to day, you run vpnkit and it opens a seven-tab TUI. You can add a subscription with vpnkit subs add, group local nodes with vpnkit local-groups, add local nodes with vpnkit local-nodes add and chain their egress through another source with --via, and add user rules with vpnkit local-rules add. There are three routing modes: rule, global, and direct. The active source, which is either one subscription or one local-nodes group, decides the rule baseline and which nodes the catch-all proxy contains. To use the proxy from your shell you can run eval with vpnkit env. The README also lists update commands, including options to update only vpnkit or only mihomo, and a status-bar badge that appears when a new release is available.

Copy-paste prompts

Prompt 1
Install vpnkit with the curl one-liner and add my first subscription using vpnkit subs add
Prompt 2
Show me how to add a Hysteria2 local node in vpnkit and route it through another subscription with the --via flag
Prompt 3
Write a local rule in vpnkit that forces traffic to a specific domain through a chosen node
Prompt 4
Run eval with vpnkit env in my shell and confirm my terminal traffic now goes through the mihomo proxy
Prompt 5
Update only the mihomo core inside vpnkit without changing the vpnkit binary itself
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.