Repolode
wnlen

wnlen/clash-for-linux

Shell-based runner for Clash / Mihomo proxy kernels on Linux, with subscription management, node selection, Tun mode and a built-in doctor command.

Stars
6,191
Forks
1,231
Open issues
28
Last commit
28 days ago

What is it?

Clash for Linux is a set of shell scripts that install, configure and run a Clash or Mihomo proxy kernel on Linux. It detects the system architecture and downloads the matching kernel, then manages the runtime through short commands such as clashon, clashoff, clash select and clash use.

The project supports saving multiple subscriptions and switching the active one, importing local YAML, Base64 or share-link configs, and adjusting routing modes (rule, global, direct). Ports are auto-detected to avoid conflicts, and a Mixin file lets users patch the generated config. Tun mode, LAN proxy sharing, IPv6 handling, relay (multi-hop) nodes and boot-time takeover are available, with root and normal-user installs both supported.

It runs on Ubuntu, Debian, WSL, OpenWrt scripts mode and similar environments on amd64, arm64 and armv7. An offline install path exists for hosts without reliable GitHub access, and a clash doctor command reports common problems.

Key features

  • 01Automatically downloads the Clash or Mihomo kernel matching the system architecture.
  • 02Stores multiple subscriptions and switches the active one with clash use.
  • 03Interactive node and policy-group selection by number.
  • 04Tun mode for transparent proxying, with root install required.
  • 05Mixin file to override, prepend or append generated config entries.
  • 06Built-in doctor command and web dashboard for troubleshooting and control.

Use cases

  • Running a proxy on a Linux VPS or remote development server to reach GitHub, Docker and package registries.
  • Setting up a proxy on Ubuntu, Debian or WSL without manually maintaining Clash runtime state.
  • Sharing a proxy with other devices on the LAN from a router, NAS or small x86/ARM box.
  • Keeping several subscriptions and switching between them from the terminal.

Quick start

  1. 1

    Clone the project from the accelerated mirror

    git clone --branch master --depth 1 https://ghfast.top/https://github.com/wnlen/clash-for-linux.git
  2. 2

    Enter the project directory

    cd clash-for-linux
  3. 3

    Run the installer

    bash install.sh

Things to know

  • Targets Linux only; the README does not describe macOS or Windows support.
  • Tun mode requires a root installation.
  • Officially supports only amd64, arm64 and armv7 architectures.
  • Scripted mode on OpenWrt does not register autostart, so clashon must be rerun after reboot.

Topics

FAQ

What is clash-for-linux?
Shell-based runner for Clash / Mihomo proxy kernels on Linux, with subscription management, node selection, Tun mode and a built-in doctor command. Clash for Linux is a set of shell scripts that install, configure and run a Clash or Mihomo proxy kernel on Linux. It detects the system architecture and downloads the matching kernel, then manages the runtime through short commands such as clashon, clashoff, clash select and clash use.
Is clash-for-linux free to use? What license does it have?
clash-for-linux is open source under the MIT license. Check the license terms before using it in commercial products.
Is clash-for-linux still maintained?
Actively maintained. The last commit to clash-for-linux was on Sep 24, 2026.
What can I use clash-for-linux for?
Running a proxy on a Linux VPS or remote development server to reach GitHub, Docker and package registries. Setting up a proxy on Ubuntu, Debian or WSL without manually maintaining Clash runtime state. Sharing a proxy with other devices on the LAN from a router, NAS or small x86/ARM box. Keeping several subscriptions and switching between them from the terminal.
How do I install clash-for-linux?
Clone the project from the accelerated mirror: git clone --branch master --depth 1 https://ghfast.top/https://github.com/wnlen/clash-for-linux.git Enter the project directory: cd clash-for-linux Run the installer: bash install.sh
Where can I get clash-for-linux?
The source code and installation instructions are on GitHub: https://github.com/wnlen/clash-for-linux

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects