vernesong /OpenClash

A Clash Client For OpenWrt

★ 28,227⑂ 4,071👁 195⑃ 363● 4,213▤ 198
JavaScriptMITCreated 2019-05-29
下载:v0.48.002v0.48.002 ↓0.48.0022026-10-12
28,227
stars
4,071
forks
195
watchers
363
prs
4,213
issues
198
releases

README

OpenClash

一个可运行在 OpenWrt 上的 Mihomo (Clash Meta) 客户端









 简介

OpenClash 是一个面向 OpenWrt 的 LuCI 插件,用于管理 Mihomo(原 Clash Meta)内核,兼容 Shadowsocks、ShadowsocksR、VMess、VLESS、Trojan、Snell、TUIC、Hysteria 等主流协议,通过灵活的规则配置实现按需分流与透明代理。

 功能特性

| 模块 | 说明 |
|------|------|
| 内核 | 内置 Mihomo(Meta)与 Smart 智能内核,支持在线更新与切换 |
| 运行模式 | redir-host / fake-ip 与混合模式、TUN 模式,兼容 iptables 与 nftables |
| 订阅管理 | 多订阅并存,支持 Subconverter 在线转换、自定义 User-Agent 与请求头 |
| 配置管理 | 多配置文件一键切换、在线编辑、备份/恢复、Age 加密 |
| 访问控制 | 黑白名单、自定义防火墙规则 |
| 流媒体 | Netflix / Disney+ / HBO 等自动选线 |
| 覆写设置 | 模块化覆写 YAML,方便配置文件定制 |

 目录

- 简介
- 功能特性
- 快速开始
- 使用手册
- 下载
- 依赖
- 源码编译
- 致谢
- 请作者喝杯咖啡
- 许可证

 快速开始

 网页安装

1. 从 Release 页面 下载对应架构的安装包(.ipk 或 .apk);
2. 登录 OpenWrt 的 LuCI 后台,前往 系统 → 软件包 上传并安装;
3. 刷新或者重新登录页面,在 服务 → OpenClash 中导入订阅或上传配置文件并启动。

 命令行安装

安装依赖并下载最新版(iptables 防火墙):

shell
 opkg 系统(ipk)
opkg update
opkg install bash iptables dnsmasq-full curl ca-bundle ipset ip-full iptables-mod-tproxy iptables-mod-extra ruby ruby-yaml kmod-tun kmod-inet-diag unzip luci-compat luci luci-base
curl -L --retry 2 https://api.github.com/repos/vernesong/OpenClash/releases/latest -o /tmp/openclash_version
[ -f "/tmp/openclash_version" ] && download_url=$(cat /tmp/openclash_version | jsonfilter -e '@.assets[].browser_download_url' | grep '\.ipk$') && curl -L --retry 2 "$download_url" -o /tmp/openclash.ipk || echo "OpenClash last version get failed"
[ -f "/tmp/openclash.ipk" ] && opkg install /tmp/openclash.ipk || echo "OpenClash download failed"

 apk 系统(apk)
apk update
apk add bash iptables dnsmasq-full curl ca-bundle ipset ip-full iptables-mod-tproxy iptables-mod-extra ruby ruby-yaml kmod-tun kmod-inet-diag unzip luci-compat luci luci-base
curl -L --retry 2 https://api.github.com/repos/vernesong/OpenClash/releases/latest -o /tmp/openclash_version
[ -f "/tmp/openclash_version" ] && download_url=$(cat /tmp/openclash_version | jsonfilter -e '@.assets[].browser_download_url' | grep '\.apk$') && curl -L --retry 2 "$download_url" -o /tmp/openclash.apk || echo "OpenClash last version get failed"
[ -f "/tmp/openclash.apk" ] && apk add -q --force-overwrite --clean-protected --allow-untrusted /tmp/openclash.apk || echo "OpenClash download failed"


安装依赖并下载最新版(nftables 防火墙,Firewall4):

shell
 opkg 系统(ipk)
opkg update
opkg install bash dnsmasq-full curl ca-bundle ip-full ruby ruby-yaml kmod-tun kmod-inet-diag unzip kmod-nft-tproxy luci-compat luci luci-base
curl -L --retry 2 https://api.github.com/repos/vernesong/OpenClash/releases/latest -o /tmp/openclash_version
[ -f "/tmp/openclash_version" ] && download_url=$(cat /tmp/openclash_version | jsonfilter -e '@.assets[].browser_download_url' | grep '\.ipk$') && curl -L --retry 2 "$download_url" -o /tmp/openclash.ipk || echo "OpenClash last version get failed"
[ -f "/tmp/openclash.ipk" ] && opkg install /tmp/openclash.ipk || echo "OpenClash download failed"

 apk 系统(apk)
apk update
apk add bash dnsmasq-full curl ca-bundle ip-full ruby ruby-yaml kmod-tun kmod-inet-diag unzip kmod-nft-tproxy lu

Top issues

Discussions

Latest release

v0.48.002 v0.48.002 2026-10-12
发布时间
 2026-10-12 11:40 GMT+0800

 使用手册
 WIKI & SKILL

 安装命令

在路由器上以 root 身份执行(需要 curl 与 ca-bundle):

shell
(curl -fsSL -o /tmp/install.sh https://raw.githubusercontent.com/vernesong/OpenClash/dev/install.sh || curl -fsSL -o /tmp/install.sh https://cdn.jsdelivr.net/gh/vernesong/OpenClash@dev/install.sh) && sh /tmp/install.sh



手动安装(不使用脚本时)

安装依赖并下载最新版(iptables 防火墙):

shell
 opkg 系统(ipk)
opkg update
opkg install bash iptables dnsmasq-full curl ca-bundle ipset ip-full iptables-mod-tproxy iptables-mod-extra ruby ruby-yaml kmod-tun kmod-inet-diag unzip luci-compat luci luci-b

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON