vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
15.77k stars 2.94k forks source link

如何在编译OpenClash时把meta内核打包进去? #3938

Closed andyfanybo closed 4 days ago

andyfanybo commented 6 days ago

Verify Steps

Describe the Feature

399 之前有人问过,但最新源码好像不行了,我的想法是在openclash编译的根目录把meta内核文件放进去:

image 接着在OpenClash的Makefile文件中把文件复制到固件中,但这样编译会出错,不知道是不是操作不对,恳请大佬解答,谢谢。 OpenClash

Describe Alternatives

No response

andyfanybo commented 6 days ago

image

vi-si commented 6 days ago

要对应位置 !!! 要对应位置 !!! 要对应位置 !!!

---------------------------------------------------------------

OpenClash

git clone -b v0.45.141-beta --depth=1 https://github.com/vernesong/openclash.git OpenClash

git clone --depth 1 https://github.com/vernesong/openclash.git OpenClash rm -rf feeds/luci/applications/luci-app-openclash mv OpenClash/luci-app-openclash feeds/luci/applications/luci-app-openclash

---------------------------------------------------------------

---------------- dev core ----------------------------

curl -sL -m 30 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/master/dev/clash-linux-arm64.tar.gz -o /tmp/clash.tar.gz tar zxvf /tmp/clash.tar.gz -C /tmp >/dev/null 2>&1 chmod +x /tmp/clash >/dev/null 2>&1 mkdir -p feeds/luci/applications/luci-app-openclash/root/etc/openclash/core mv /tmp/clash feeds/luci/applications/luci-app-openclash/root/etc/openclash/core/clash >/dev/null 2>&1 rm -rf /tmp/clash.tar.gz >/dev/null 2>&1

---------------------------------------------------------

------------- tun core --------------------------------

curl -sL -m 30 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/master/premium/clash-linux-arm64-2023.08.17-13-gdcc8d87.gz -o /tmp/clash.gz gzip -d /tmp/clash.gz /tmp >/dev/null 2>&1 chmod +x /tmp/clash >/dev/null 2>&1 mv /tmp/clash feeds/luci/applications/luci-app-openclash/root/etc/openclash/core/clash_tun >/dev/null 2>&1

---------------------------------------------------------

------------- meta core ---------------------------------

curl -sL -m 30 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/master/meta/clash-linux-arm64.tar.gz -o /tmp/clash.tar.gz tar zxvf /tmp/clash.tar.gz -C /tmp >/dev/null 2>&1 chmod +x /tmp/clash >/dev/null 2>&1 mv /tmp/clash feeds/luci/applications/luci-app-openclash/root/etc/openclash/core/clash_meta >/dev/null 2>&1 rm -rf /tmp/clash.tar.gz >/dev/null 2>&1

---------------------------------------------------------

-------------- GeoIP 数据库 -----------------------------

curl -sL -m 30 --retry 2 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat -o /tmp/GeoIP.dat mv /tmp/GeoIP.dat feeds/luci/applications/luci-app-openclash/root/etc/openclash/GeoIP.dat >/dev/null 2>&1

---------------------------------------------------------

-------------- GeoSite 数据库 ---------------------------

curl -sL -m 30 --retry 2 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -o /tmp/GeoSite.dat mv /tmp/GeoSite.dat feeds/luci/applications/luci-app-openclash/root/etc/openclash/GeoSite.dat >/dev/null 2>&1

---------------------------------------------------------

Hashcoel commented 4 days ago

@vi-si 谢谢大佬