Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
6 tasks done
andyfanybo opened this issue Jun 27, 2024 · 3 comments
Closed
6 tasks done

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

andyfanybo opened this issue Jun 27, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@andyfanybo
Copy link

andyfanybo commented Jun 27, 2024

Verify Steps

  • Tracker 我已经在 Issue Tracker 中找过我要提出的问题
  • Latest 我已经使用最新 Dev 版本查看过,并不包含该功能特性或者还不完善
  • Relevant 我知道 OpenClash 与 内核(Core)、控制面板(Dashboard)、在线订阅转换(Subconverter)等项目之间无直接关系,仅相互调用
  • Definite 这确实是 OpenClash 应包含的特性
  • Contributors 我有能力协助 OpenClash 开发或完善此功能特性
  • Meaningless 我提交的是无意义的催促更新或修复请求

Describe the Feature

#399 之前有人问过,但最新源码好像不行了,我的想法是在openclash编译的根目录把meta内核文件放进去:
image
接着在OpenClash的Makefile文件中把文件复制到固件中,但这样编译会出错,不知道是不是操作不对,恳请大佬解答,谢谢。
OpenClash

Describe Alternatives

No response

@andyfanybo andyfanybo added the enhancement New feature or request label Jun 27, 2024
@andyfanybo
Copy link
Author

image

@vi-si
Copy link

vi-si commented Jun 27, 2024

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

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

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
Copy link

@vi-si 谢谢大佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants