Skip to content

Commit

Permalink
Merge branch 'draco-china:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
s71557 authored Oct 9, 2023
2 parents 9733019 + 3723e62 commit 84400c2
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@

## 功能特性

- x86 支持 VMDK
- 移除 ddns 和 ddnsto
- 移除 bootstrap 主题
- 添加 关机
- 添加 OpenClash
- 添加 ADGuardHome
- ~~添加 Mosdns~~
- 添加 Mosdns
- 添加 Rclone
- 支持 VMDK


## 默认配置

Expand Down
21 changes: 17 additions & 4 deletions diy-part2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ sed -i 's/192.168.1.1/192.168.11.252/g' package/base-files/files/bin/config_gene
# openclash
svn export https://github.com/kenzok8/openwrt-packages/trunk/luci-app-openclash package/luci-app-openclash
# svn export https://github.com/kiddin9/openwrt-packages/trunk/luci-app-openclash package/luci-app-openclash
# 加入OpenClash核心
chmod -R a+x $GITHUB_WORKSPACE/preset-clash-core.sh
if [ "$1" = "rk33xx" ]; then
$GITHUB_WORKSPACE/preset-clash-core.sh arm64
elif [ "$1" = "rk35xx" ]; then
$GITHUB_WORKSPACE/preset-clash-core.sh arm64
elif [ "$1" = "x86" ]; then
$GITHUB_WORKSPACE/preset-clash-core.sh amd64
fi

# adguardhome
svn export https://github.com/kenzok8/openwrt-packages/trunk/luci-app-adguardhome package/luci-app-adguardhome
Expand All @@ -38,9 +47,9 @@ svn export https://github.com/kenzok8/openwrt-packages/trunk/adguardhome package
# svn export https://github.com/kiddin9/openwrt-packages/trunk/adguardhome package/adguardhome

# mosdns
# svn export https://github.com/kenzok8/openwrt-packages/trunk/luci-app-mosdns package/luci-app-mosdns
# svn export https://github.com/kenzok8/openwrt-packages/trunk/mosdns package/mosdns
# svn export https://github.com/kenzok8/openwrt-packages/trunk/v2dat package/v2dat
svn export https://github.com/kenzok8/openwrt-packages/trunk/luci-app-mosdns package/luci-app-mosdns
svn export https://github.com/kenzok8/openwrt-packages/trunk/mosdns package/mosdns
svn export https://github.com/kenzok8/openwrt-packages/trunk/v2dat package/v2dat
# svn export https://github.com/kiddin9/openwrt-packages/trunk/luci-app-mosdns package/luci-app-mosdns
# svn export https://github.com/kiddin9/openwrt-packages/trunk/mosdns package/mosdns
# svn export https://github.com/kiddin9/openwrt-packages/trunk/v2dat package/v2dat
Expand All @@ -52,15 +61,19 @@ CONFIG_VMDK_IMAGES=y
# 关机
CONFIG_PACKAGE_luci-app-poweroff=y
CONFIG_PACKAGE_luci-i18n-poweroff-zh-cn=y
# openclash
CONFIG_PACKAGE_luci-app-openclash=y
CONFIG_PACKAGE_luci-i18n-openclash-zh-cn=y
# adguardhome
CONFIG_PACKAGE_luci-app-adguardhome=y
CONFIG_PACKAGE_luci-i18n-adguardhome-zh-cn=y
# mosdns
# CONFIG_PACKAGE_luci-app-mosdns=y
CONFIG_PACKAGE_luci-app-mosdns=y
CONFIG_PACKAGE_luci-i18n-mosdns-zh-cn=y
# rclone
CONFIG_PACKAGE_rclone=y
Expand Down
28 changes: 28 additions & 0 deletions preset-clash-core.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
#=================================================
# File name: perest-clash-core.sh
# System Required: Linux
# Version: 1.0
# Lisence: MIT
# Author: SuLingGG
# Blog: https://mlapp.cn
#=================================================

echo -e "预置Clash内核"
mkdir -p luci-app-openclash/root/etc/openclash/core
core_path="luci-app-openclash/root/etc/openclash/core"
goe_path="luci-app-openclash/root/etc/openclash"

CLASH_DEV_URL="https://raw.githubusercontent.com/vernesong/OpenClash/core/master/dev/clash-linux-${1}.tar.gz"
CLASH_TUN_URL=$(curl -fsSL https://api.github.com/repos/vernesong/OpenClash/contents/master/premium\?ref\=core | grep download_url | grep $1 | awk -F '"' '{print $4}' | grep "v3" )
CLASH_META_URL="https://raw.githubusercontent.com/vernesong/OpenClash/core/master/meta/clash-linux-${1}.tar.gz"
GEOIP_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat"
GEOSITE_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat"

wget -qO- $CLASH_DEV_URL | tar xOvz > $core_path/clash
wget -qO- $CLASH_TUN_URL | gunzip -c > $core_path/clash_tun
wget -qO- $CLASH_META_URL | tar xOvz > $core_path/clash_meta
wget -qO- $GEOIP_URL > $goe_path/GeoIP.dat
wget -qO- $GEOSITE_URL > $goe_path/GeoSite.dat

chmod +x $core_path/clash*

0 comments on commit 84400c2

Please sign in to comment.