gitmyhub

clash-for-linux-install

Shell ★ 14k updated 10d ago

😼 优雅地使用基于 clash/mihomo 的代理环境

One-command installer that sets up the Clash or Mihomo proxy client on Linux, creating a clashctl tool to manage proxy servers, subscriptions, and routing modes.

ShellClashMihomosetup: easycomplexity 2/5

This repository is a one-command installer for running Clash or Mihomo proxy software on Linux. Clash and Mihomo are proxy client kernels that route network traffic through proxy servers, commonly used to manage how internet traffic flows through a machine. The project wraps the setup process into a shell script so that users do not have to configure the software manually.

Running the provided install command downloads the appropriate kernel version for your system architecture, sets up service management files, and creates a command-line tool called clashctl. The installer works for both root and regular users, and is compatible with containerized environments like AutoDL in addition to standard Linux distributions.

Once installed, you manage the proxy through clashctl subcommands: turning the proxy on or off, checking its status, managing subscriptions, upgrading the kernel, and switching between routing modes. A web-based control panel is also available in a browser for switching nodes, viewing logs, and monitoring connections. The panel runs locally but can also be exposed on a public address if needed, with the README recommending that you set an access password if you do that.

Subscriptions are how Clash-based tools receive lists of proxy servers to use. This installer lets you add, remove, and update subscription URLs, with optional automatic updates via cron. It also integrates with a local subscription converter tool for transforming subscription formats.

The project includes a Tun mode, which routes all traffic on the machine, including from containers, through the proxy. A Mixin configuration system allows you to merge custom settings on top of the raw subscription config without modifying the subscription file directly.

The author states in the repository disclaimer that the project was created for the purpose of learning Shell scripting.

Where it fits