OpenClash README

The project's README from github.com/vernesong/OpenClash. As one markdown file: README.md.

Clash
OpenClash

本插件是一个可运行在 OpenWrt 上的 Mihomo(Clash) 客户端

兼容 Shadowsocks、ShadowsocksR、Vmess、Trojan、Snell 等协议,根据灵活的规则配置实现策略代理

使用手册

下载地址

依赖

编译

从 OpenWrt 的 SDK 编译

# 解压下载好的 SDK
curl -SLk --connect-timeout 30 --retry 2 "https://archive.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/OpenWrt-SDK-15.05.1-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2" -o "/tmp/SDK.tar.bz2"
cd \tmp
tar xjf SDK.tar.bz2
cd OpenWrt-SDK-15.05.1-*

# Clone 项目
mkdir package/luci-app-openclash
cd package/luci-app-openclash
git init
git remote add -f origin https://github.com/vernesong/OpenClash.git
git config core.sparsecheckout true
echo "luci-app-openclash" >> .git/info/sparse-checkout
git pull --depth 1 origin master
git branch --set-upstream-to=origin/master master

# 编译 po2lmo (如果有po2lmo可跳过)
pushd luci-app-openclash/tools/po2lmo
make && sudo make install
popd

# 编译最新 CodeMirror 6 (插件内置,可跳过)
pushd luci-app-openclash/tools/codemirror
npm install
npx esbuild entry.js --bundle --format=iife --global-name=CM6 --minify --target=es2019 --outfile=../../root/www/luci-static/resources/openclash/js/cm6.min.js --legal-comments=none --loader:.css=text
rm -rf node_modules
popd

# 开始编译

# 先回退到SDK主目录
cd ../..
make package/luci-app-openclash/luci-app-openclash/compile V=99

# IPK文件位置
./bin/ar71xx/packages/base/luci-app-openclash_*-beta_all.ipk
# 同步源码
cd package/luci-app-openclash/luci-app-openclash
git pull

# 您也可以直接拷贝 `luci-app-openclash` 文件夹至其他 `OpenWrt` 项目的 `Package` 目录下随固件编译

make menuconfig
# 选择要编译的包 LuCI -> Applications -> luci-app-openclash

许可

请作者喝杯咖啡

Buy Me a Coffee at ko-fi.com

OpenClash (vernesong/OpenClash)

censorship-circumvention
Searching Database…

27.8K ·GitHub
What is this?OpenClash is a Mihomo (Clash) client plugin for OpenWrt routers: it runs a policy-based proxy on the router, routing traffic through flexible rule configurations.
Is this a desktop app, or does it live on my router?It lives on the router — OpenClash installs on OpenWrt as an IPK/APK package and plugs into LuCI, the router's web admin interface.
How do I get it onto my router?Download the IPK or APK package from the project's download page and install it on OpenWrt; the full usage manual is in the Wiki.
What does the router need to have installed first?Quite a few OpenWrt packages: luci, dnsmasq-full, bash, curl, ipset, ip-full, ruby with ruby-yaml, unzip, plus a set of iptables/nftables kernel modules.
Any install gotchas I should know about?Yes — several features need extra modules: TUN mode requires kmod-tun, PROCESS-NAME rules need kmod-inet-diag, firewall4 devices need kmod-nft-tproxy, and Luci >= 19.07 needs luci-compat.
Will it run on any Linux box, or strictly on OpenWrt?Strictly OpenWrt — it is a LuCI plugin built from the OpenWrt SDK, so it targets OpenWrt routers rather than desktop Linux or other systems.
Which proxy protocols does it support?Shadowsocks, ShadowsocksR, VMess, Trojan and Snell, among others — the bundled Mihomo core handles the protocols while OpenClash supplies the rules and routing policy.
What proxy core does it run under the hood?Mihomo by MetaCubeX is the core engine; OpenClash itself is a LuCI plugin whose code is based on frainzy1477's Luci For Clash.
Can I watch what the proxy is doing in real time?Yes — the project uses the zashboard and yacd control panels, and also credits SukkaW's IP check and lmc999's streaming-unlock detection as companion tools.
Creator
vernesong
Size
42.5 GB
Stars
27.8K
Age
7y
Commits · 90 Days