/OpenClash

Primary LanguageJavaScriptMIT LicenseMIT

Clash
OpenClash

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

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

- 感谢 frainzy1477 ,本插件基于 Luci For Clash 进行二次开发 -

NOTICE

This is a modification of OpenClash by luvletter2333 because of my preferences and requirements.

You are welcome to use this version, but you should also know there is no DaaS and I have no responsibility to help you debug.

I will try my best to list all changes and its commits here.

Change logs

  • Remove Credit and Dler : 6f7e191 & b47a2de
  • Enable Core IPv6 by default : 6d02e257

使用手册

下载地址

依赖

  • luci
  • luci-base
  • iptables
  • dnsmasq-full
  • coreutils
  • coreutils-nohup
  • bash
  • curl
  • ca-certificates
  • ipset
  • ip-full
  • iptables-mod-tproxy
  • iptables-mod-extra
  • libcap
  • libcap-bin
  • ruby
  • ruby-yaml
  • kmod-tun(TUN模式)
  • luci-compat(Luci-19.07)
  • ip6tables-mod-nat(ipv6)
opkg update
opkg install luci luci-base iptables coreutils coreutils-nohup bash curl ca-certificates ipset ip-full iptables-mod-tproxy iptables-mod-extra libcap libcap-bin ruby ruby-yaml 
opkg install dnsmasq-full --force-overwrite
opkg install kmod-tun luci-compat ip6tables-mod-nat 

编译

从 OpenWrt 的 SDK 编译

# 解压下载好的 SDK
tar xjf OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2
cd OpenWrt-SDK-ar71xx-*

# Clone 项目
mkdir package/luci-app-openclash
cd package/luci-app-openclash
git init
git remote add -f origin https://github.com/luvletter2333/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

# 开始编译

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

# IPK文件位置
./bin/ar71xx/packages/base/luci-app-openclash_0.39.7-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

许可