├── .github
└── workflows
│ ├── ARMv8-ImmortalWrt.yml
│ ├── ARMv8-Lede.yml
│ ├── ARMv8_ROOTFS-ImmortalWrt.yml
│ ├── ARMv8_ROOTFS-Lede.yml
│ ├── Build-immo-toolchain.yml
│ ├── Build-lede-toolchain.yml
│ ├── Build-openwrt-toolchain.yml
│ ├── Build_ARMv8-Lede_1806.yml
│ ├── Build_X86_64-ImmortalWrt.yml
│ ├── Build_X86_64-Lede_1806.yml
│ ├── Build_X86_64-Lede_2305.yml
│ ├── Build_X86_64-Lede_Docker.yml
│ ├── Build_X86_64-Lede个人双开版.yml
│ ├── Build_X86_64-OpenWrt.yml
│ ├── Multiple Source Check.yml
│ ├── Update synchronization checker.yml
│ ├── immo-config.yml
│ ├── lede-config.yml
│ └── openwrt-config.yml
├── README.md
├── backup
├── README_backup.md
├── Semi_automatic_update.sh
└── Upgrade.sh
├── config
├── immo_config
│ ├── armv8.config
│ ├── x86-docker.config
│ └── x86.config
├── lede_config
│ ├── armv8.config
│ ├── x86-2305-docker.config
│ ├── x86-2305.config
│ ├── x86-docker.config
│ └── x86.config
└── openwrt_config
│ ├── x86-docker.config
│ └── x86.config
├── depends-ubuntu-2204
├── diy_script
├── function.sh
├── immo_diy
│ ├── armv8
│ │ ├── diy-part1.sh
│ │ └── diy-part2.sh
│ └── x86
│ │ ├── 99-default-settings
│ │ ├── diy-part1.sh
│ │ └── diy-part2.sh
├── lede_diy
│ ├── armv8
│ │ ├── diy-part1.sh
│ │ └── diy-part2.sh
│ └── x86
│ │ ├── 5gMK.sh
│ │ ├── diy-part1.sh
│ │ ├── diy-part2.sh
│ │ ├── diy2305-part2.sh
│ │ └── docker.sh
├── openwrt_diy
│ └── x86
│ │ ├── diy-part1.sh
│ │ └── diy-part2.sh
├── preset-JejzWrt.sh
├── preset-adguard-core.sh
├── preset-clash-core.sh
└── preset-mihomo-core.sh
├── feeds_config
├── immo.feeds.conf.default
├── lede.feeds.conf.default
├── lede2305.feeds.conf.default
└── openwrt.feeds.conf.default
└── personal
├── AdGuardHome
└── base.lua
├── banner
├── banner-immo
├── banner-op
├── banner2
├── bg1.jpg
├── bg2.jpg
├── bg3.jpg
├── bg4.jpg
├── bg5.jpg
├── bg6.jpg
├── bg7.jpg
├── chinadns-ng
└── Makefile
├── curl
├── Config.in
├── Makefile
└── patches
│ └── 200-no_docs_tests.patch
├── ddnsto
├── Makefile
└── ddnsto-binary-3.0.4.tar.gz
├── files
├── aarch64
├── arm
└── x86_64
├── hysteria
└── Makefile
└── softethervpn5
├── Makefile
├── files
├── dummy
├── launcher.sh
├── vpnbridge.init
├── vpnclient.init
└── vpnserver.init
└── patches
├── 001-iconv-defines-fix.patch
├── 002-iconv-cmake-fix.patch
├── 100-increase-cfg-save-intervall.patch
├── 101-add-config-write-syslog.patch
├── 150_remove-restriction.patch
└── 151-fix-openvpn-static-route-push.patch
/.github/workflows/ARMv8-ImmortalWrt.yml:
--------------------------------------------------------------------------------
1 | #===============================================
2 | # Description: ARMv8[ImmortalWrt]
3 | # Lisence: MIT
4 | # By:Jejz
5 | #===============================================
6 |
7 | name: ARMv8[ImmortalWrt]快速打包
8 |
9 | on:
10 | repository_dispatch:
11 | workflow_dispatch:
12 | inputs:
13 | openwrt_soc:
14 | description: "Select 0penwrt SoC"
15 | required: false
16 | default: "s905x3_s905d"
17 | type: choice
18 | options:
19 | - s905x3_s905d
20 | - all
21 | - a311d
22 | - s922x
23 | - s922x-n2
24 | - s922x-reva
25 | - s905x3
26 | - s905x2
27 | - s905x2-km3
28 | - s912
29 | - s912-m8s
30 | - s905d
31 | - s905d-ki
32 | - s905x
33 | - s905w
34 | - s905
35 | - s905l3a
36 | kernel_download:
37 | description: "Select kernel download"
38 | required: false
39 | default: "breakingbadboy/OpenWrt"
40 | type: choice
41 | options:
42 | - breakingbadboy/OpenWrt
43 | - ophub/kernel
44 | - Jejz168/compile-kernel
45 | kernel_version:
46 | description: "Select kernel version"
47 | required: false
48 | default: "5.4.228_5.10.161_5.15.100_6.1.8_6.6.18"
49 | type: choice
50 | options:
51 | - 5.4.228_5.10.161_5.15.100_6.1.8_6.6.18
52 | - 5.4.228_5.10.161
53 | - 5.4.228_5.15.100
54 | - 5.10.161_5.15.100
55 | - 5.15.100_6.1.8
56 | - 6.1.8_6.6.18
57 | - 5.4.228
58 | - 5.10.161
59 | - 5.15.100
60 | - 6.1.8
61 | - 6.6.18
62 | #schedule:
63 | #- cron: '45 22 * * *'
64 |
65 | env:
66 | REPO_URL: https://github.com/immortalwrt/immortalwrt
67 | REPO_BRANCH: master
68 | FEEDS_CONF: feeds_config/immo.feeds.conf.default
69 | CONFIG_FILE: config/immo_config/armv8.config
70 | DIY_P1_SH: diy_script/immo_diy/armv8/diy-part1.sh
71 | DIY_P2_SH: diy_script/immo_diy/armv8/diy-part2.sh
72 | UPLOAD_FIRMWARE: false
73 | UPLOAD_RELEASE: true
74 | TZ: Asia/Shanghai
75 | FILE_NAME: ARMv8
76 | PRODUCT_NAME: ARMv8
77 |
78 | jobs:
79 | build:
80 | runs-on: ubuntu-22.04
81 |
82 | steps:
83 | - name: Checkout
84 | uses: actions/checkout@main
85 |
86 | - name: Initialization environment
87 | env:
88 | DEBIAN_FRONTEND: noninteractive
89 | run: |
90 | sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android
91 | sudo -E apt-get update
92 | sudo -E apt-get -y install $(cat $GITHUB_WORKSPACE/depends-ubuntu-2204)
93 | sudo -E apt-get -y autoremove --purge
94 | sudo -E apt-get clean
95 | sudo timedatectl set-timezone "$TZ"
96 | sudo mkdir -p /workdir
97 | sudo chown $USER:$GROUPS /workdir
98 |
99 | - name: Clone source code
100 | working-directory: /workdir
101 | run: |
102 | df -hT $PWD
103 | git clone $REPO_URL -b $REPO_BRANCH openwrt
104 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
105 | cd openwrt
106 | Author=$(git show -s --date=short --format="Author: %an")
107 | Date=$(git show -s --date=short --format="date: %ci")
108 | Commit=$(git show -s --date=short --format="commit: %s")
109 | Hash=$(git show -s --date=short --format="commit hash: %h")
110 | echo "author=$Author" >> $GITHUB_ENV
111 | echo "date=$Date" >> $GITHUB_ENV
112 | echo "commit=$Commit" >> $GITHUB_ENV
113 | echo "hash=$Hash" >> $GITHUB_ENV
114 | echo "DATE=$(date "+%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
115 | echo "TAG=$(date "+%Y%m%d")" >> $GITHUB_ENV
116 | echo "TAG=$(date "+%Y%m%d")" >> $GITHUB_ENV
117 | echo "start=$(date +%s)" >> $GITHUB_ENV
118 |
119 | - name: Package Armvirt as OpenWrt
120 | if: (!cancelled())
121 | uses: ophub/flippy-openwrt-actions@main
122 | env:
123 | OPENWRT_ARMVIRT: https://github.com/Jejz168/OpenWrt/releases/download/ARMv8-ROOTFS-IMMO/immortalwrt-armsr-armv8-generic-rootfs.tar.gz
124 | PACKAGE_SOC: ${{ github.event.inputs.openwrt_soc }}
125 | WHOAMI: Jejz
126 | OPENWRT_VER: R$(TZ=UTC-8 date +'%y.%-m.%-d')
127 | DISTRIB_REVISION: R$(TZ=UTC-8 date +'%y.%-m.%-d') (By @Jejz build $(TZ=UTC-8 date "+%Y-%m-%d %H:%M"))
128 | DISTRIB_DESCRIPTION: ImmortalWrt
129 | KERNEL_REPO_URL: https://github.com/${{ github.event.inputs.kernel_download }}/releases/tag/kernel_stable
130 | KERNEL_VERSION_NAME: ${{ github.event.inputs.kernel_version }}
131 | KERNEL_AUTO_LATEST: true
132 | GZIP_IMGS: .gz
133 | GH_TOKEN: ${{ secrets.GH_TOKEN }}
134 |
135 | - name: Upload artifact to Actions
136 | uses: kittaakos/upload-artifact-as-is@master
137 | if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_FIRMWARE == 'true' && !cancelled()
138 | with:
139 | path: ${{ env.PACKAGED_OUTPUTPATH }}/
140 |
141 | - name: Upload OpenWrt Firmware to Release
142 | id: release
143 | uses: ncipollo/release-action@v1
144 | if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
145 | with:
146 | name: ${{ env.DATE }} 「 ${{ env.FILE_NAME }} 」[ImmortalWrt]固件
147 | allowUpdates: true
148 | removeArtifacts: true
149 | tag: ${{ env.PRODUCT_NAME }}-IMMO
150 | token: ${{ secrets.GH_TOKEN }}
151 | body: |
152 | **This is ImmortalWrt Firmware for ${{ env.FILE_NAME }}**
153 | ### 📒 固件信息
154 | - 🔥 此为 ARMv8-Docker[ImmortalWrt] 固件,集成一些日常常用插件
155 | - 💻 平台架构: ${{ env.FILE_NAME }}
156 | - ⚽ 固件源码: ${{ env.REPO_URL }}
157 | - 💝 源码分支: ${{ env.REPO_BRANCH }}
158 | - 🌐 默认地址:192.168.8.8
159 | - 🔑 默认密码:password
160 | - 🔴 WiFi默认密码:password
161 | ### 🧊 固件版本
162 | - 安装到 EMMC:系统 → 晶晨宝盒 → 安装 OpenWrt → 选择型号 → 安装
163 | - 升级 OpenWrt:系统 → 晶晨宝盒 → 手动上传更新 或者 在线下载更新
164 | - 常见问题及注意事项请参考恩山F大➦[最新帖](https://www.right.com.cn/forum/thread-4076037-1-1.html)
165 | - 当前使用版本:【编译前的最后一次➦[主源码](https://github.com/coolsnowwolf/lede)更新记录】
166 | - ★ 感谢源码作者无私分享!
167 | - 🎈🎈🎈 更新信息 🎈🎈🎈
168 | - 作者: ${{ env.author }}
169 | - 时间: ${{ env.date }}
170 | - 内容: ${{ env.commit }}
171 | - hash: ${{ env.hash }}
172 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*
173 |
174 | - name: Completion time
175 | run: |
176 | echo "DATE1=$(date "+%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
177 | end=$(date +%s)
178 | seconds=$(( end - start ))
179 | hour=$(( $seconds/3600 ))
180 | min=$(( ($seconds-${hour}*3600)/60 ))
181 | sec=$(( $seconds-${hour}*3600-${min}*60 ))
182 | HMS=`echo ${hour}:${min}:${sec}`
183 | echo "time=$HMS" >> $GITHUB_ENV
184 |
185 | - name: Telegram notification upload success
186 | uses: appleboy/telegram-action@master
187 | with:
188 | to: ${{ secrets.TELEGRAM_TO }}
189 | token: ${{ secrets.TELEGRAM_TOKEN }}
190 | message: |
191 | 💥${{ env.PRODUCT_NAME }}[immortalwrt]打包完成
192 | 开始时间:${{ env.DATE }}
193 | 完成时间:${{ env.DATE1 }}
194 | 编译耗时:${{ env.time }}
195 | 🎈🎈🎈 更新信息 🎈🎈🎈
196 | 作者: ${{ env.author }}
197 | 时间: ${{ env.date }}
198 | 内容: ${{ env.commit }}
199 | hash: ${{ env.hash }}
200 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
201 | 📍: https://github.com/Jejz168/OpenWrt/releases/tag/${{ env.PRODUCT_NAME }}-IMMO
202 |
203 | - name: Push notification
204 | uses: xhnmt/pushplus-action@main
205 | with:
206 | token: ${{ secrets.PUSH_PLUS_TOKEN }}
207 | title: "💥[immortalwrt]${{ env.PRODUCT_NAME }}打包完成"
208 | content: |
209 | 💥${{ env.PRODUCT_NAME }}[immortalwrt]打包完成
210 | 开始时间:${{ env.DATE }}
211 | 完成时间:${{ env.DATE1 }}
212 | 编译耗时:${{ env.time }}
213 | 🎈🎈🎈 更新信息 🎈🎈🎈
214 | 作者: ${{ env.author }}
215 | 时间: ${{ env.date }}
216 | 内容: ${{ env.commit }}
217 | hash: ${{ env.hash }}
218 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
219 | 📍: https://github.com/Jejz168/OpenWrt/releases/tag/${{ env.PRODUCT_NAME }}-IMMO
220 |
--------------------------------------------------------------------------------
/.github/workflows/ARMv8-Lede.yml:
--------------------------------------------------------------------------------
1 | #===============================================
2 | # Description: ARMv8[Lede]
3 | # Lisence: MIT
4 | # By:Jejz
5 | #===============================================
6 |
7 | name: ARMv8[Lede]快速打包
8 |
9 | on:
10 | repository_dispatch:
11 | workflow_dispatch:
12 | inputs:
13 | openwrt_soc:
14 | description: "Select 0penwrt SoC"
15 | required: false
16 | default: "s905x3_s905d"
17 | type: choice
18 | options:
19 | - s905x3_s905d
20 | - all
21 | - a311d
22 | - s922x
23 | - s922x-n2
24 | - s922x-reva
25 | - s905x3
26 | - s905x2
27 | - s905x2-km3
28 | - s912
29 | - s912-m8s
30 | - s905d
31 | - s905d-ki
32 | - s905x
33 | - s905w
34 | - s905
35 | - s905l3a
36 | kernel_download:
37 | description: "Select kernel download"
38 | required: false
39 | default: "breakingbadboy/OpenWrt"
40 | type: choice
41 | options:
42 | - breakingbadboy/OpenWrt
43 | - ophub/kernel
44 | - Jejz168/compile-kernel
45 | kernel_version:
46 | description: "Select kernel version"
47 | required: false
48 | default: "5.4.228_5.10.161_5.15.100_6.1.8_6.6.18"
49 | type: choice
50 | options:
51 | - 5.4.228_5.10.161_5.15.100_6.1.8_6.6.18
52 | - 5.4.228_5.10.161
53 | - 5.4.228_5.15.100
54 | - 5.10.161_5.15.100
55 | - 5.15.100_6.1.8
56 | - 6.1.8_6.6.18
57 | - 5.4.228
58 | - 5.10.161
59 | - 5.15.100
60 | - 6.1.8
61 | - 6.6.18
62 | #schedule:
63 | #- cron: '45 22 * * *'
64 |
65 | env:
66 | REPO_URL: https://github.com/coolsnowwolf/lede
67 | REPO_BRANCH: master
68 | FEEDS_CONF: feeds_config/lede.feeds.conf.default
69 | CONFIG_FILE: config/lede_config/armv8.config
70 | DIY_P1_SH: diy_script/lede_diy/armv8/diy-part1.sh
71 | DIY_P2_SH: diy_script/lede_diy/armv8/diy-part2.sh
72 | UPLOAD_FIRMWARE: false
73 | UPLOAD_RELEASE: true
74 | TZ: Asia/Shanghai
75 | FILE_NAME: ARMv8
76 | PRODUCT_NAME: ARMv8
77 |
78 | jobs:
79 | build:
80 | runs-on: ubuntu-22.04
81 |
82 | steps:
83 | - name: Checkout
84 | uses: actions/checkout@main
85 |
86 | - name: Initialization environment
87 | env:
88 | DEBIAN_FRONTEND: noninteractive
89 | run: |
90 | sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android
91 | sudo -E apt-get update
92 | sudo -E apt-get -y install $(cat $GITHUB_WORKSPACE/depends-ubuntu-2204)
93 | sudo -E apt-get -y autoremove --purge
94 | sudo -E apt-get clean
95 | sudo timedatectl set-timezone "$TZ"
96 | sudo mkdir -p /workdir
97 | sudo chown $USER:$GROUPS /workdir
98 |
99 | - name: Clone source code
100 | working-directory: /workdir
101 | run: |
102 | df -hT $PWD
103 | git clone $REPO_URL -b $REPO_BRANCH openwrt
104 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
105 | cd openwrt
106 | Revision=$(grep "DISTRIB_REVISION=" package/lean/default-settings/files/zzz-default-settings | awk -F"'" '{print $2}')
107 | Author=$(git show -s --date=short --format="Author: %an")
108 | Date=$(git show -s --date=short --format="date: %ci")
109 | Commit=$(git show -s --date=short --format="commit: %s")
110 | Hash=$(git show -s --date=short --format="commit hash: %h")
111 | echo "author=$Author" >> $GITHUB_ENV
112 | echo "date=$Date" >> $GITHUB_ENV
113 | echo "commit=$Commit" >> $GITHUB_ENV
114 | echo "hash=$Hash" >> $GITHUB_ENV
115 | echo "DATE=$(date "+%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
116 | echo "TAG=$(date "+%Y%m%d")" >> $GITHUB_ENV
117 | echo "TAG=$(date "+%Y%m%d")" >> $GITHUB_ENV
118 | echo "start=$(date +%s)" >> $GITHUB_ENV
119 | echo "revision=$Revision" >> $GITHUB_ENV
120 |
121 | - name: Package Armvirt as OpenWrt
122 | if: (!cancelled())
123 | uses: ophub/flippy-openwrt-actions@main
124 | env:
125 | OPENWRT_ARMVIRT: https://github.com/Jejz168/OpenWrt/releases/download/ARMv8-ROOTFS/openwrt-armvirt-64-generic-rootfs.tar.gz
126 | PACKAGE_SOC: ${{ github.event.inputs.openwrt_soc }}
127 | WHOAMI: Jejz
128 | OPENWRT_VER: ${{ env.revision }}
129 | DISTRIB_REVISION: ${{ env.revision }} (By @Jejz build $(TZ=UTC-8 date "+%Y-%m-%d %H:%M"))
130 | KERNEL_REPO_URL: https://github.com/${{ github.event.inputs.kernel_download }}/releases/tag/kernel_stable
131 | KERNEL_VERSION_NAME: ${{ github.event.inputs.kernel_version }}
132 | KERNEL_AUTO_LATEST: true
133 | GZIP_IMGS: .gz
134 | GH_TOKEN: ${{ secrets.GH_TOKEN }}
135 |
136 | - name: Upload artifact to Actions
137 | uses: kittaakos/upload-artifact-as-is@master
138 | if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_FIRMWARE == 'true' && !cancelled()
139 | with:
140 | path: ${{ env.PACKAGED_OUTPUTPATH }}/
141 |
142 | - name: Upload OpenWrt Firmware to Release
143 | id: release
144 | uses: ncipollo/release-action@v1
145 | if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
146 | with:
147 | name: ${{ env.DATE }} 「 ${{ env.FILE_NAME }} 」固件
148 | allowUpdates: true
149 | removeArtifacts: true
150 | tag: ${{ env.PRODUCT_NAME }}
151 | token: ${{ secrets.GH_TOKEN }}
152 | body: |
153 | **This is LEDE Firmware for ${{ env.FILE_NAME }}**
154 | ### 📒 固件信息
155 | - 🔥 此为 ARMv8-Docker 固件,集成一些日常常用插件
156 | - 💻 平台架构: ${{ env.FILE_NAME }}
157 | - ⚽ 固件源码: ${{ env.REPO_URL }}
158 | - 💝 源码分支: ${{ env.REPO_BRANCH }}
159 | - 🌐 默认地址:192.168.8.8
160 | - 🔑 默认密码:password
161 | - 🔴 WiFi默认密码:password
162 | ### 🧊 固件版本
163 | - 安装到 EMMC:系统 → 晶晨宝盒 → 安装 OpenWrt → 选择型号 → 安装
164 | - 升级 OpenWrt:系统 → 晶晨宝盒 → 手动上传更新 或者 在线下载更新
165 | - 常见问题及注意事项请参考恩山F大➦[最新帖](https://www.right.com.cn/forum/thread-4076037-1-1.html)
166 | - 当前使用版本:【编译前的最后一次➦[主源码](https://github.com/coolsnowwolf/lede)更新记录】
167 | - ★ 感谢源码作者无私分享!
168 | - 🎈🎈🎈 更新信息 🎈🎈🎈
169 | - 作者: ${{ env.author }}
170 | - 时间: ${{ env.date }}
171 | - 内容: ${{ env.commit }}
172 | - hash: ${{ env.hash }}
173 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*
174 |
175 | - name: Completion time
176 | run: |
177 | echo "DATE1=$(date "+%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
178 | end=$(date +%s)
179 | seconds=$(( end - start ))
180 | hour=$(( $seconds/3600 ))
181 | min=$(( ($seconds-${hour}*3600)/60 ))
182 | sec=$(( $seconds-${hour}*3600-${min}*60 ))
183 | HMS=`echo ${hour}:${min}:${sec}`
184 | echo "time=$HMS" >> $GITHUB_ENV
185 |
186 | - name: Telegram notification upload success
187 | uses: appleboy/telegram-action@master
188 | with:
189 | to: ${{ secrets.TELEGRAM_TO }}
190 | token: ${{ secrets.TELEGRAM_TOKEN }}
191 | message: |
192 | 💥${{ env.PRODUCT_NAME }}打包完成
193 | 开始时间:${{ env.DATE }}
194 | 完成时间:${{ env.DATE1 }}
195 | 编译耗时:${{ env.time }}
196 | 🎈🎈🎈 更新信息 🎈🎈🎈
197 | 作者: ${{ env.author }}
198 | 时间: ${{ env.date }}
199 | 内容: ${{ env.commit }}
200 | hash: ${{ env.hash }}
201 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
202 | 📍: https://github.com/Jejz168/OpenWrt/releases/tag/${{ env.PRODUCT_NAME }}
203 |
204 | - name: Push notification
205 | uses: xhnmt/pushplus-action@main
206 | with:
207 | token: ${{ secrets.PUSH_PLUS_TOKEN }}
208 | title: "💥${{ env.PRODUCT_NAME }}打包完成"
209 | content: |
210 | 💥${{ env.PRODUCT_NAME }}打包完成
211 | 开始时间:${{ env.DATE }}
212 | 完成时间:${{ env.DATE1 }}
213 | 编译耗时:${{ env.time }}
214 | 🎈🎈🎈 更新信息 🎈🎈🎈
215 | 作者: ${{ env.author }}
216 | 时间: ${{ env.date }}
217 | 内容: ${{ env.commit }}
218 | hash: ${{ env.hash }}
219 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
220 | 📍: https://github.com/Jejz168/OpenWrt/releases/tag/${{ env.PRODUCT_NAME }}
221 |
--------------------------------------------------------------------------------
/.github/workflows/Build-immo-toolchain.yml:
--------------------------------------------------------------------------------
1 | name: Build immo toolchain
2 |
3 | on:
4 | repository_dispatch:
5 | types: update immortalwrt toolchain
6 |
7 | workflow_dispatch:
8 | inputs:
9 | checkupdates:
10 | description: 'Checkupdates connection to Actions'
11 | required: false
12 | default: 'false'
13 | schedule:
14 | - cron: 16 17 * * *
15 |
16 | jobs:
17 | Checka:
18 | runs-on: ubuntu-22.04
19 | name: check ${{ matrix.repo }} ${{ matrix.branch }}
20 | strategy:
21 | fail-fast: false
22 | matrix:
23 | repo: [immortalwrt]
24 | branch: [master, openwrt-23.05, openwrt-24.10]
25 |
26 | env:
27 | REPO_URL: https://github.com/${{ matrix.repo }}/${{ matrix.repo }}
28 | REPO_BRANCH: ${{ matrix.branch }}
29 |
30 | steps:
31 | - name: Get Commit Hash
32 | id: getHash
33 | run: |
34 | git clone $REPO_URL -b $REPO_BRANCH .
35 | echo "commitHash=$(git log --pretty=tformat:"%h" -n1 tools toolchain)" >>$GITHUB_OUTPUT
36 | echo "LITE_BRANCH=${REPO_BRANCH#*-}" >>$GITHUB_ENV
37 |
38 | - name: Compare Commit Hash
39 | id: cacheHash
40 | uses: actions/cache@v4
41 | with:
42 | path: .commitHash
43 | key: ${{ matrix.repo }}-${{ env.LITE_BRANCH }}-commitHash-${{ steps.getHash.outputs.commitHash }}
44 |
45 | - name: Set output for next job
46 | id: outputunifreq
47 | if: steps.cacheHash.outputs.cache-hit == 'true'
48 | run: |
49 | echo "unifreq=hello" >> $GITHUB_OUTPUT
50 |
51 | - name: Save New Commit Hash
52 | if: steps.cacheHash.outputs.cache-hit != 'true'
53 | run: |
54 | echo ${{ steps.getHash.outputs.commitHash }} | tee .commitHash
55 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
56 | Build:
57 | runs-on: ubuntu-22.04
58 | needs: [Checka]
59 | if: ${{ needs.Checka.outputs.output != 'hello' || github.event.inputs.checkupdates == 'true'}}
60 | name: build ${{ matrix.branch }} ${{ matrix.target }}
61 | strategy:
62 | fail-fast: false
63 | matrix:
64 | repo: [immortalwrt]
65 | branch: [master, openwrt-23.05, openwrt-24.10]
66 | target: [x86_64, armsr_armv8]
67 |
68 | env:
69 | REPO_URL: https://github.com/${{ matrix.repo }}/${{ matrix.repo }}
70 | REPO_BRANCH: ${{ matrix.branch }}
71 | TARGET_DEVICE: ${{ matrix.target }}
72 | TOOLCHAIN_TAG: toolchain-cache
73 | TZ: Asia/Shanghai
74 |
75 | steps:
76 | - name: Checkout
77 | uses: actions/checkout@v4
78 |
79 | - name: Initialization Environment
80 | env:
81 | DEBIAN_FRONTEND: noninteractive
82 | run: |
83 | (sudo -E apt-get -y update
84 | sudo -E apt-get -y install $(cat $GITHUB_WORKSPACE/depends-ubuntu-2204)
85 | sudo -E apt-get -y autoremove --purge
86 | sudo -E apt-get -y clean) &
87 | sudo timedatectl set-timezone "$TZ"
88 |
89 | - name: Clone Source Code
90 | run: |
91 | git clone $REPO_URL -b $REPO_BRANCH openwrt
92 | cd openwrt
93 | echo "OPENWRT_PATH=$PWD" >>$GITHUB_ENV
94 | if [[ $TARGET_DEVICE = armsr_armv8 && $REPO_BRANCH =~ 21.02|18.06 ]]; then
95 | echo -e "CONFIG_TARGET_armvirt=y\nCONFIG_TARGET_armvirt_64=y" >.config
96 | elif [[ $TARGET_DEVICE = bcm47xx_mips74k && ${REPO_BRANCH#*-} = 18.06 ]]; then
97 | echo -e "CONFIG_TARGET_brcm47xx=y\nCONFIG_TARGET_brcm47xx_mips74k=y" >.config
98 | else
99 | echo -e "CONFIG_TARGET_${TARGET_DEVICE%_*}=y\nCONFIG_TARGET_$TARGET_DEVICE=y" >.config
100 | fi
101 |
102 | - name: Generate Variables
103 | run: |
104 | cd $OPENWRT_PATH
105 | make defconfig >/dev/null 2>&1
106 | echo "SOURCE_REPO=$(basename $REPO_URL)" >>$GITHUB_ENV
107 | echo "LITE_BRANCH=${REPO_BRANCH#*-}" >>$GITHUB_ENV
108 | TARGET_NAME=$(awk -F '"' '/CONFIG_TARGET_BOARD/{print $2}' .config)
109 | SUBTARGET_NAME=$(awk -F '"' '/CONFIG_TARGET_SUBTARGET/{print $2}' .config)
110 | echo "DEVICE_TARGET=$TARGET_NAME-$SUBTARGET_NAME" >>$GITHUB_ENV
111 |
112 | - name: Compare Toolchain Hash
113 | id: hash
114 | run: |
115 | cd $OPENWRT_PATH
116 | TOOLS_HASH=$(git log --pretty=tformat:"%h" -n1 tools toolchain)
117 | CACHE_NAME="$SOURCE_REPO-$LITE_BRANCH-$DEVICE_TARGET-cache-$TOOLS_HASH"
118 | echo "CACHE_NAME=$CACHE_NAME" >>$GITHUB_ENV
119 | #CACHE_URL=$(curl -sL api.github.com/repos/$GITHUB_REPOSITORY/releases | awk -F '"' '/download_url/{print $4}' | grep $CACHE_NAME) || true
120 | CACHE_URL="https://github.com/$GITHUB_REPOSITORY/releases/download/toolchain-cache/$CACHE_NAME.tzst"
121 | curl -Isf $CACHE_URL >/dev/null 2>&1 || echo "REBUILD_TOOLCHAIN=true" >>$GITHUB_OUTPUT
122 |
123 | - name: Install Feeds
124 | if: steps.hash.outputs.REBUILD_TOOLCHAIN == 'true'
125 | run: |
126 | cd $OPENWRT_PATH
127 | ./scripts/feeds update -a
128 | ./scripts/feeds install -a
129 | make defconfig
130 |
131 | - name: Compile Toolchain
132 | if: steps.hash.outputs.REBUILD_TOOLCHAIN == 'true'
133 | id: toolchain
134 | run: |
135 | mkdir -p $GITHUB_WORKSPACE/output
136 | cd $OPENWRT_PATH
137 | make toolchain/compile -j$(nproc) || make toolchain/compile -j1 V=s
138 | echo -e "\e[1;33m开始打包toolchain目录\e[0m"
139 | [ -d ".ccache" ] && (ccache=".ccache"; ls -alh .ccache)
140 | tar -I zstdmt -cf $GITHUB_WORKSPACE/output/$CACHE_NAME.tzst staging_dir/host* staging_dir/tool* $ccache
141 | ls -lh $GITHUB_WORKSPACE/output
142 | [ -e $GITHUB_WORKSPACE/output/$CACHE_NAME.tzst ]
143 |
144 | - name: Delete Old Toolchain
145 | if: steps.toolchain.conclusion == 'success'
146 | uses: mknejp/delete-release-assets@v1
147 | with:
148 | token: ${{ secrets.GITHUB_TOKEN }}
149 | tag: ${{ env.TOOLCHAIN_TAG }}
150 | assets: '${{ env.SOURCE_REPO }}-${{ env.LITE_BRANCH }}-${{ env.DEVICE_TARGET }}*'
151 | fail-if-no-assets: false
152 | fail-if-no-release: false
153 |
154 | - name: Upload Toolchain To Release
155 | if: steps.toolchain.conclusion == 'success'
156 | uses: softprops/action-gh-release@v2
157 | with:
158 | name: toolchain-cache
159 | tag_name: ${{ env.TOOLCHAIN_TAG }}
160 | token: ${{ secrets.GITHUB_TOKEN }}
161 | files: output/*
162 | body: OpenWrt 工具链缓存
163 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
164 | Cleaning:
165 | if: ${{ always() }}
166 | needs: [Checka,Build]
167 | runs-on: ubuntu-latest
168 | steps:
169 | - name: Delete workflow runs
170 | uses: Jejz168/delete-workflow-runs@main
171 | with:
172 | token: ${{ secrets.GITHUB_TOKEN }}
173 | retain_days: 30
174 | keep_minimum_runs: 8
175 |
--------------------------------------------------------------------------------
/.github/workflows/Build-lede-toolchain.yml:
--------------------------------------------------------------------------------
1 | name: Build lede toolchain
2 |
3 | on:
4 | repository_dispatch:
5 | types: update lede toolchain
6 |
7 | workflow_dispatch:
8 | inputs:
9 | checkupdates:
10 | description: 'Checkupdates connection to Actions'
11 | required: false
12 | default: 'false'
13 | schedule:
14 | - cron: 16 17 * * *
15 |
16 | jobs:
17 | Checka:
18 | runs-on: ubuntu-22.04
19 | name: check ${{ matrix.repo }} ${{ matrix.branch }}
20 | strategy:
21 | fail-fast: false
22 | matrix:
23 | repo: [lede]
24 | branch: [master]
25 |
26 | env:
27 | REPO_URL: https://github.com/coolsnowwolf/${{ matrix.repo }}
28 | REPO_BRANCH: ${{ matrix.branch }}
29 |
30 | steps:
31 | - name: Get Commit Hash
32 | id: getHash
33 | run: |
34 | git clone $REPO_URL -b $REPO_BRANCH .
35 | echo "commitHash=$(git log --pretty=tformat:"%h" -n1 tools toolchain)" >>$GITHUB_OUTPUT
36 | echo "LITE_BRANCH=${REPO_BRANCH#*-}" >>$GITHUB_ENV
37 |
38 | - name: Compare Commit Hash
39 | id: cacheHash
40 | uses: actions/cache@v4
41 | with:
42 | path: .commitHash
43 | key: ${{ matrix.repo }}-${{ env.LITE_BRANCH }}-commitHash-${{ steps.getHash.outputs.commitHash }}
44 |
45 | - name: Set output for next job
46 | id: outputunifreq
47 | if: steps.cacheHash.outputs.cache-hit == 'true'
48 | run: |
49 | echo "unifreq=hello" >> $GITHUB_OUTPUT
50 |
51 | - name: Save New Commit Hash
52 | if: steps.cacheHash.outputs.cache-hit != 'true'
53 | run: |
54 | echo ${{ steps.getHash.outputs.commitHash }} | tee .commitHash
55 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
56 | Build:
57 | runs-on: ubuntu-22.04
58 | needs: [Checka]
59 | if: ${{ needs.Checka.outputs.output != 'hello' || github.event.inputs.checkupdates == 'true'}}
60 | name: build ${{ matrix.branch }} ${{ matrix.target }}
61 | strategy:
62 | fail-fast: false
63 | matrix:
64 | repo: [lede]
65 | branch: [master]
66 | target: [x86_64, armvirt_64]
67 |
68 | env:
69 | REPO_URL: https://github.com/coolsnowwolf/${{ matrix.repo }}
70 | REPO_BRANCH: ${{ matrix.branch }}
71 | TARGET_DEVICE: ${{ matrix.target }}
72 | TOOLCHAIN_TAG: toolchain-cache
73 | TZ: Asia/Shanghai
74 |
75 | steps:
76 | - name: Checkout
77 | uses: actions/checkout@v4
78 |
79 | - name: Initialization Environment
80 | env:
81 | DEBIAN_FRONTEND: noninteractive
82 | run: |
83 | (sudo -E apt-get -y update
84 | sudo -E apt-get -y install $(cat $GITHUB_WORKSPACE/depends-ubuntu-2204)
85 | sudo -E apt-get -y autoremove --purge
86 | sudo -E apt-get -y clean) &
87 | sudo timedatectl set-timezone "$TZ"
88 |
89 | - name: Clone Source Code
90 | run: |
91 | git clone $REPO_URL -b $REPO_BRANCH openwrt
92 | cd openwrt
93 | echo "OPENWRT_PATH=$PWD" >>$GITHUB_ENV
94 | echo -e "CONFIG_TARGET_${TARGET_DEVICE%_*}=y\nCONFIG_TARGET_$TARGET_DEVICE=y" >.config
95 |
96 | - name: Generate Variables
97 | run: |
98 | cd $OPENWRT_PATH
99 | make defconfig >/dev/null 2>&1
100 | echo "SOURCE_REPO=$(basename $REPO_URL)" >>$GITHUB_ENV
101 | echo "LITE_BRANCH=${REPO_BRANCH#*-}" >>$GITHUB_ENV
102 | TARGET_NAME=$(awk -F '"' '/CONFIG_TARGET_BOARD/{print $2}' .config)
103 | SUBTARGET_NAME=$(awk -F '"' '/CONFIG_TARGET_SUBTARGET/{print $2}' .config)
104 | echo "DEVICE_TARGET=$TARGET_NAME-$SUBTARGET_NAME" >>$GITHUB_ENV
105 |
106 | - name: Compare Toolchain Hash
107 | id: hash
108 | run: |
109 | cd $OPENWRT_PATH
110 | TOOLS_HASH=$(git log --pretty=tformat:"%h" -n1 tools toolchain)
111 | CACHE_NAME="$SOURCE_REPO-$LITE_BRANCH-$DEVICE_TARGET-cache-$TOOLS_HASH"
112 | echo "CACHE_NAME=$CACHE_NAME" >>$GITHUB_ENV
113 | #CACHE_URL=$(curl -sL api.github.com/repos/$GITHUB_REPOSITORY/releases | awk -F '"' '/download_url/{print $4}' | grep $CACHE_NAME) || true
114 | CACHE_URL="https://github.com/$GITHUB_REPOSITORY/releases/download/toolchain-cache/$CACHE_NAME.tzst"
115 | curl -Isf $CACHE_URL >/dev/null 2>&1 || echo "REBUILD_TOOLCHAIN=true" >>$GITHUB_OUTPUT
116 |
117 | - name: Install Feeds
118 | if: steps.hash.outputs.REBUILD_TOOLCHAIN == 'true'
119 | run: |
120 | cd $OPENWRT_PATH
121 | ./scripts/feeds update -a
122 | ./scripts/feeds install -a
123 | make defconfig
124 |
125 | - name: Compile Toolchain
126 | if: steps.hash.outputs.REBUILD_TOOLCHAIN == 'true'
127 | id: toolchain
128 | run: |
129 | mkdir -p $GITHUB_WORKSPACE/output
130 | cd $OPENWRT_PATH
131 | make toolchain/compile -j$(nproc) || make toolchain/compile -j1 V=s
132 | echo -e "\e[1;33m开始打包toolchain目录\e[0m"
133 | [ -d ".ccache" ] && (ccache=".ccache"; ls -alh .ccache)
134 | tar -I zstdmt -cf $GITHUB_WORKSPACE/output/$CACHE_NAME.tzst staging_dir/host* staging_dir/tool* $ccache
135 | ls -lh $GITHUB_WORKSPACE/output
136 | [ -e $GITHUB_WORKSPACE/output/$CACHE_NAME.tzst ]
137 |
138 | - name: Delete Old Toolchain
139 | if: steps.toolchain.conclusion == 'success'
140 | uses: mknejp/delete-release-assets@v1
141 | with:
142 | token: ${{ secrets.GITHUB_TOKEN }}
143 | tag: ${{ env.TOOLCHAIN_TAG }}
144 | assets: '${{ env.SOURCE_REPO }}-${{ env.LITE_BRANCH }}-${{ env.DEVICE_TARGET }}*'
145 | fail-if-no-assets: false
146 | fail-if-no-release: false
147 |
148 | - name: Upload Toolchain To Release
149 | if: steps.toolchain.conclusion == 'success'
150 | uses: softprops/action-gh-release@v2
151 | with:
152 | name: toolchain-cache
153 | tag_name: ${{ env.TOOLCHAIN_TAG }}
154 | token: ${{ secrets.GITHUB_TOKEN }}
155 | files: output/*
156 | body: OpenWrt 工具链缓存
157 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
158 | Cleaning:
159 | if: ${{ always() }}
160 | needs: [Checka,Build]
161 | runs-on: ubuntu-latest
162 | steps:
163 | - name: Delete workflow runs
164 | uses: Jejz168/delete-workflow-runs@main
165 | with:
166 | token: ${{ secrets.GITHUB_TOKEN }}
167 | retain_days: 30
168 | keep_minimum_runs: 8
169 |
--------------------------------------------------------------------------------
/.github/workflows/Build-openwrt-toolchain.yml:
--------------------------------------------------------------------------------
1 | name: Build openwrt toolchain
2 |
3 | on:
4 | repository_dispatch:
5 | types: update openwrt toolchain
6 |
7 | workflow_dispatch:
8 | inputs:
9 | checkupdates:
10 | description: 'Checkupdates connection to Actions'
11 | required: false
12 | default: 'false'
13 | schedule:
14 | - cron: 16 17 * * *
15 |
16 | jobs:
17 | Checka:
18 | runs-on: ubuntu-22.04
19 | name: check ${{ matrix.repo }} ${{ matrix.branch }}
20 | strategy:
21 | fail-fast: false
22 | matrix:
23 | repo: [openwrt]
24 | branch: [main, openwrt-23.05, openwrt-24.10]
25 |
26 | env:
27 | REPO_URL: https://github.com/${{ matrix.repo }}/${{ matrix.repo }}
28 | REPO_BRANCH: ${{ matrix.branch }}
29 |
30 | steps:
31 | - name: Get Commit Hash
32 | id: getHash
33 | run: |
34 | git clone $REPO_URL -b $REPO_BRANCH .
35 | echo "commitHash=$(git log --pretty=tformat:"%h" -n1 tools toolchain)" >>$GITHUB_OUTPUT
36 | echo "LITE_BRANCH=${REPO_BRANCH#*-}" >>$GITHUB_ENV
37 |
38 | - name: Compare Commit Hash
39 | id: cacheHash
40 | uses: actions/cache@v4
41 | with:
42 | path: .commitHash
43 | key: ${{ matrix.repo }}-${{ env.LITE_BRANCH }}-commitHash-${{ steps.getHash.outputs.commitHash }}
44 |
45 | - name: Set output for next job
46 | id: outputunifreq
47 | if: steps.cacheHash.outputs.cache-hit == 'true'
48 | run: |
49 | echo "unifreq=hello" >> $GITHUB_OUTPUT
50 |
51 | - name: Save New Commit Hash
52 | if: steps.cacheHash.outputs.cache-hit != 'true'
53 | run: |
54 | echo ${{ steps.getHash.outputs.commitHash }} | tee .commitHash
55 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
56 | Build:
57 | runs-on: ubuntu-22.04
58 | needs: [Checka]
59 | if: ${{ needs.Checka.outputs.output != 'hello' || github.event.inputs.checkupdates == 'true'}}
60 | name: build ${{ matrix.branch }} ${{ matrix.target }}
61 | strategy:
62 | fail-fast: false
63 | matrix:
64 | repo: [openwrt]
65 | branch: [main, openwrt-23.05, openwrt-24.10]
66 | target: [x86_64, armsr_armv8]
67 |
68 | env:
69 | REPO_URL: https://github.com/${{ matrix.repo }}/${{ matrix.repo }}
70 | REPO_BRANCH: ${{ matrix.branch }}
71 | TARGET_DEVICE: ${{ matrix.target }}
72 | TOOLCHAIN_TAG: toolchain-cache
73 | TZ: Asia/Shanghai
74 |
75 | steps:
76 | - name: Checkout
77 | uses: actions/checkout@v4
78 |
79 | - name: Initialization Environment
80 | env:
81 | DEBIAN_FRONTEND: noninteractive
82 | run: |
83 | (sudo -E apt-get -y update
84 | sudo -E apt-get -y install $(cat $GITHUB_WORKSPACE/depends-ubuntu-2204)
85 | sudo -E apt-get -y autoremove --purge
86 | sudo -E apt-get -y clean) &
87 | sudo timedatectl set-timezone "$TZ"
88 |
89 | - name: Clone Source Code
90 | run: |
91 | git clone $REPO_URL -b $REPO_BRANCH openwrt
92 | cd openwrt
93 | echo "OPENWRT_PATH=$PWD" >>$GITHUB_ENV
94 | if [[ $TARGET_DEVICE = armsr_armv8 && $REPO_BRANCH =~ 21.02|18.06 ]]; then
95 | echo -e "CONFIG_TARGET_armvirt=y\nCONFIG_TARGET_armvirt_64=y" >.config
96 | elif [[ $TARGET_DEVICE = bcm47xx_mips74k && ${REPO_BRANCH#*-} = 18.06 ]]; then
97 | echo -e "CONFIG_TARGET_brcm47xx=y\nCONFIG_TARGET_brcm47xx_mips74k=y" >.config
98 | else
99 | echo -e "CONFIG_TARGET_${TARGET_DEVICE%_*}=y\nCONFIG_TARGET_$TARGET_DEVICE=y" >.config
100 | fi
101 |
102 | - name: Generate Variables
103 | run: |
104 | cd $OPENWRT_PATH
105 | make defconfig >/dev/null 2>&1
106 | echo "SOURCE_REPO=$(basename $REPO_URL)" >>$GITHUB_ENV
107 | echo "LITE_BRANCH=${REPO_BRANCH#*-}" >>$GITHUB_ENV
108 | TARGET_NAME=$(awk -F '"' '/CONFIG_TARGET_BOARD/{print $2}' .config)
109 | SUBTARGET_NAME=$(awk -F '"' '/CONFIG_TARGET_SUBTARGET/{print $2}' .config)
110 | echo "DEVICE_TARGET=$TARGET_NAME-$SUBTARGET_NAME" >>$GITHUB_ENV
111 |
112 | - name: Compare Toolchain Hash
113 | id: hash
114 | run: |
115 | cd $OPENWRT_PATH
116 | TOOLS_HASH=$(git log --pretty=tformat:"%h" -n1 tools toolchain)
117 | CACHE_NAME="$SOURCE_REPO-$LITE_BRANCH-$DEVICE_TARGET-cache-$TOOLS_HASH"
118 | echo "CACHE_NAME=$CACHE_NAME" >>$GITHUB_ENV
119 | #CACHE_URL=$(curl -sL api.github.com/repos/$GITHUB_REPOSITORY/releases | awk -F '"' '/download_url/{print $4}' | grep $CACHE_NAME) || true
120 | CACHE_URL="https://github.com/$GITHUB_REPOSITORY/releases/download/toolchain-cache/$CACHE_NAME.tzst"
121 | curl -Isf $CACHE_URL >/dev/null 2>&1 || echo "REBUILD_TOOLCHAIN=true" >>$GITHUB_OUTPUT
122 |
123 | - name: Install Feeds
124 | if: steps.hash.outputs.REBUILD_TOOLCHAIN == 'true'
125 | run: |
126 | cd $OPENWRT_PATH
127 | ./scripts/feeds update -a
128 | ./scripts/feeds install -a
129 | make defconfig
130 |
131 | - name: Compile Toolchain
132 | if: steps.hash.outputs.REBUILD_TOOLCHAIN == 'true'
133 | id: toolchain
134 | run: |
135 | mkdir -p $GITHUB_WORKSPACE/output
136 | cd $OPENWRT_PATH
137 | make toolchain/compile -j$(nproc) || make toolchain/compile -j1 V=s
138 | echo -e "\e[1;33m开始打包toolchain目录\e[0m"
139 | [ -d ".ccache" ] && (ccache=".ccache"; ls -alh .ccache)
140 | tar -I zstdmt -cf $GITHUB_WORKSPACE/output/$CACHE_NAME.tzst staging_dir/host* staging_dir/tool* $ccache
141 | ls -lh $GITHUB_WORKSPACE/output
142 | [ -e $GITHUB_WORKSPACE/output/$CACHE_NAME.tzst ]
143 |
144 | - name: Delete Old Toolchain
145 | if: steps.toolchain.conclusion == 'success'
146 | uses: mknejp/delete-release-assets@v1
147 | with:
148 | token: ${{ secrets.GITHUB_TOKEN }}
149 | tag: ${{ env.TOOLCHAIN_TAG }}
150 | assets: '${{ env.SOURCE_REPO }}-${{ env.LITE_BRANCH }}-${{ env.DEVICE_TARGET }}*'
151 | fail-if-no-assets: false
152 | fail-if-no-release: false
153 |
154 | - name: Upload Toolchain To Release
155 | if: steps.toolchain.conclusion == 'success'
156 | uses: softprops/action-gh-release@v2
157 | with:
158 | name: toolchain-cache
159 | tag_name: ${{ env.TOOLCHAIN_TAG }}
160 | token: ${{ secrets.GITHUB_TOKEN }}
161 | files: output/*
162 | body: OpenWrt 工具链缓存
163 |
--------------------------------------------------------------------------------
/.github/workflows/Multiple Source Check.yml:
--------------------------------------------------------------------------------
1 | #===============================================
2 | # Description: Multiple Source Check
3 | # Lisence: MIT
4 | # By:Jejz
5 | #===============================================
6 |
7 | name: Multiple Source Check
8 |
9 | on:
10 | workflow_dispatch:
11 | schedule:
12 | - cron: 6 */2 * * *
13 |
14 | env:
15 | TZ: Asia/Shanghai
16 |
17 | jobs:
18 | Checka:
19 | runs-on: ubuntu-latest
20 | env:
21 | REPO_URL_Lede: https://github.com/coolsnowwolf/lede
22 | REPO_BRANCH_Lede: master
23 | REPO_PATH_Lede: "lede"
24 | steps:
25 | - name: Get Commit Hash
26 | id: getHash
27 | run: |
28 | git clone --depth 1 $REPO_URL_Lede -b $REPO_BRANCH_Lede $REPO_PATH_Lede
29 | cd $REPO_PATH_Lede
30 | echo "commitHash_Lede=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
31 | cd
32 | - name: Show Commit Head and Combination Heads
33 | id: combHeader
34 | run: |
35 | echo "commitHash_Lede: ${{ steps.getHash.outputs.commitHash_Lede }}"
36 | - name: Compare Commit Hash
37 | id: cacheHash
38 | uses: actions/cache@main
39 | with:
40 | path: .commitHash_Lede
41 | key: HEAD-${{ steps.getHash.outputs.commitHash_Lede }}
42 | - name: Save New Commit Hash
43 | if: steps.cacheHash.outputs.cache-hit != 'true'
44 | run: |
45 | echo ${{ steps.getHash.outputs.commitHash_Lede }} | tee .commitHash_Lede
46 | - name: Telegram notification upload success
47 | if: steps.cacheHash.outputs.cache-hit != 'true'
48 | uses: appleboy/telegram-action@master
49 | with:
50 | to: ${{ secrets.TELEGRAM_TO }}
51 | token: ${{ secrets.TELEGRAM_TOKENS }}
52 | message: |
53 | ✨༺Lede༻✨
54 | ● 源码更新了
55 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
56 | 📍:https://github.com/coolsnowwolf/lede
57 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
58 | Checkb:
59 | runs-on: ubuntu-latest
60 | env:
61 | REPO_URL_HelloWorld: https://github.com/fw876/helloworld
62 | REPO_BRANCH_HelloWorld: master
63 | REPO_PATH_HelloWorld: "helloworld"
64 | steps:
65 | - name: Get Commit Hash
66 | id: getHash
67 | run: |
68 | git clone --depth 1 $REPO_URL_HelloWorld -b $REPO_BRANCH_HelloWorld $REPO_PATH_HelloWorld
69 | cd $REPO_PATH_HelloWorld
70 | echo "commitHash_HelloWorld=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
71 | cd
72 | - name: Show Commit Head and Combination Heads
73 | id: combHeader
74 | run: |
75 | echo "commitHash_HelloWorld: ${{ steps.getHash.outputs.commitHash_HelloWorld }}"
76 | - name: Compare Commit Hash
77 | id: cacheHash
78 | uses: actions/cache@main
79 | with:
80 | path: .commitHash_HelloWorld
81 | key: HEAD-${{ steps.getHash.outputs.commitHash_HelloWorld }}
82 | - name: Save New Commit Hash
83 | if: steps.cacheHash.outputs.cache-hit != 'true'
84 | run: |
85 | echo ${{ steps.getHash.outputs.commitHash_HelloWorld }} | tee .commitHash_HelloWorld
86 | - name: Telegram notification upload success
87 | if: steps.cacheHash.outputs.cache-hit != 'true'
88 | uses: appleboy/telegram-action@master
89 | with:
90 | to: ${{ secrets.TELEGRAM_TO }}
91 | token: ${{ secrets.TELEGRAM_TOKENS }}
92 | message: |
93 | 🚀 HelloWorld
94 | ● 源码更新了
95 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
96 | 📍:https://github.com/fw876/helloworld/tree/${{ env.REPO_BRANCH_HelloWorld }}
97 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
98 | Checkc:
99 | runs-on: ubuntu-latest
100 | env:
101 | REPO_URL_OpenClash: https://github.com/vernesong/OpenClash
102 | REPO_BRANCH_OpenClash: master
103 | REPO_PATH_OpenClash: "OpenClash"
104 | steps:
105 | - name: Get Commit Hash
106 | id: getHash
107 | run: |
108 | git clone --depth 1 $REPO_URL_OpenClash -b $REPO_BRANCH_OpenClash $REPO_PATH_OpenClash
109 | cd $REPO_PATH_OpenClash
110 | echo "commitHash_OpenClash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
111 | cd
112 | - name: Show Commit Head and Combination Heads
113 | id: combHeader
114 | run: |
115 | echo "commitHash_OpenClash: ${{ steps.getHash.outputs.commitHash_OpenClash }}"
116 | - name: Compare Commit Hash
117 | id: cacheHash
118 | uses: actions/cache@main
119 | with:
120 | path: .commitHash_OpenClash
121 | key: HEAD-${{ steps.getHash.outputs.commitHash_OpenClash }}
122 | - name: Save New Commit Hash
123 | if: steps.cacheHash.outputs.cache-hit != 'true'
124 | run: |
125 | echo ${{ steps.getHash.outputs.commitHash_OpenClash }} | tee .commitHash_OpenClash
126 | - name: Telegram notification upload success
127 | if: steps.cacheHash.outputs.cache-hit != 'true'
128 | uses: appleboy/telegram-action@master
129 | with:
130 | to: ${{ secrets.TELEGRAM_TO }}
131 | token: ${{ secrets.TELEGRAM_TOKENS }}
132 | message: |
133 | 🚀 OpenClash
134 | ● 源码更新了
135 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
136 | 📍:https://github.com/vernesong/OpenClash
137 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
138 | Checkd:
139 | runs-on: ubuntu-latest
140 | env:
141 | REPO_URL_PassWall: https://github.com/xiaorouji/openwrt-passwall
142 | REPO_BRANCH_PassWall: main
143 | REPO_PATH_PassWall: "PassWall"
144 | steps:
145 | - name: Get Commit Hash
146 | id: getHash
147 | run: |
148 | git clone --depth 1 $REPO_URL_PassWall -b $REPO_BRANCH_PassWall $REPO_PATH_PassWall
149 | cd $REPO_PATH_PassWall
150 | echo "commitHash_PassWall=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
151 | cd
152 | - name: Show Commit Head and Combination Heads
153 | id: combHeader
154 | run: |
155 | echo "commitHash_PassWall: ${{ steps.getHash.outputs.commitHash_PassWall }}"
156 | - name: Compare Commit Hash
157 | id: cacheHash
158 | uses: actions/cache@main
159 | with:
160 | path: .commitHash_PassWall
161 | key: HEAD-${{ steps.getHash.outputs.commitHash_PassWall }}
162 | - name: Save New Commit Hash
163 | if: steps.cacheHash.outputs.cache-hit != 'true'
164 | run: |
165 | echo ${{ steps.getHash.outputs.commitHash_PassWall }} | tee .commitHash_PassWall
166 | - name: Telegram notification upload success
167 | if: steps.cacheHash.outputs.cache-hit != 'true'
168 | uses: appleboy/telegram-action@master
169 | with:
170 | to: ${{ secrets.TELEGRAM_TO }}
171 | token: ${{ secrets.TELEGRAM_TOKENS }}
172 | message: |
173 | 🚀 PassWall
174 | ● 源码更新了
175 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
176 | 📍:https://github.com/xiaorouji/openwrt-passwall
177 | 📍:https://github.com/xiaorouji/openwrt-passwall-packages
178 | # //////////////////////////////////////////////////////////////////////////////////////////////
179 | Checke:
180 | runs-on: ubuntu-latest
181 | env:
182 | REPO_URL_Immo: https://github.com/immortalwrt/immortalwrt
183 | REPO_BRANCH_Immo: master
184 | REPO_PATH_Immo: "Immo"
185 | steps:
186 | - name: Get Commit Hash
187 | id: getHash
188 | run: |
189 | git clone --depth 1 $REPO_URL_Immo -b $REPO_BRANCH_Immo $REPO_PATH_Immo
190 | cd $REPO_PATH_Immo
191 | echo "commitHash_Immo=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
192 | cd
193 | - name: Show Commit Head and Combination Heads
194 | id: combHeader
195 | run: |
196 | echo "commitHash_Immo: ${{ steps.getHash.outputs.commitHash_Immo }}"
197 | - name: Compare Commit Hash
198 | id: cacheHash
199 | uses: actions/cache@main
200 | with:
201 | path: .commitHash_Immo
202 | key: HEAD-${{ steps.getHash.outputs.commitHash_Immo }}
203 | - name: Save New Commit Hash
204 | if: steps.cacheHash.outputs.cache-hit != 'true'
205 | run: |
206 | echo ${{ steps.getHash.outputs.commitHash_Immo }} | tee .commitHash_Immo
207 | - name: Telegram notification upload success
208 | if: steps.cacheHash.outputs.cache-hit != 'true'
209 | uses: appleboy/telegram-action@master
210 | with:
211 | to: ${{ secrets.TELEGRAM_TO }}
212 | token: ${{ secrets.TELEGRAM_TOKENS }}
213 | message: |
214 | ✨༺ImmortalWrt༻✨
215 | ● 源码更新了
216 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
217 | 📍:https://github.com/immortalwrt/immortalwrt
218 | # //////////////////////////////////////////////////////////////////////////////////////////////
219 | Checkf:
220 | runs-on: ubuntu-latest
221 | env:
222 | REPO_URL_op: https://github.com/openwrt/openwrt
223 | REPO_BRANCH_op: main
224 | REPO_PATH_op: "op"
225 | steps:
226 | - name: Get Commit Hash
227 | id: getHash
228 | run: |
229 | git clone --depth 1 $REPO_URL_op -b $REPO_BRANCH_op $REPO_PATH_op
230 | cd $REPO_PATH_op
231 | echo "commitHash_op=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
232 | cd
233 | - name: Show Commit Head and Combination Heads
234 | id: combHeader
235 | run: |
236 | echo "commitHash_op: ${{ steps.getHash.outputs.commitHash_op }}"
237 | - name: Compare Commit Hash
238 | id: cacheHash
239 | uses: actions/cache@main
240 | with:
241 | path: .commitHash_op
242 | key: HEAD-${{ steps.getHash.outputs.commitHash_op }}
243 | - name: Save New Commit Hash
244 | if: steps.cacheHash.outputs.cache-hit != 'true'
245 | run: |
246 | echo ${{ steps.getHash.outputs.commitHash_op }} | tee .commitHash_op
247 | - name: Telegram notification upload success
248 | if: steps.cacheHash.outputs.cache-hit != 'true'
249 | uses: appleboy/telegram-action@master
250 | with:
251 | to: ${{ secrets.TELEGRAM_TO }}
252 | token: ${{ secrets.TELEGRAM_TOKENS }}
253 | message: |
254 | ✨༺OpenWrt༻✨
255 | ● 源码更新了
256 | ✪ ✣ ✤ ✥ ✦ ❉ ❦ ❧ ❃ ❂ ❁ ❀
257 | 📍:https://github.com/openwrt/openwrt
258 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
259 | Cleaning:
260 | needs: [Checka,Checkb,Checkc,Checkd,Checke,Checkf]
261 | runs-on: ubuntu-latest
262 | steps:
263 | - name: Delete workflow runs
264 | uses: Jejz168/delete-workflow-runs@main
265 | with:
266 | token: ${{ secrets.GITHUB_TOKEN }}
267 | retain_days: 30
268 | keep_minimum_runs: 8
269 |
--------------------------------------------------------------------------------
/.github/workflows/Update synchronization checker.yml:
--------------------------------------------------------------------------------
1 |
2 | #===============================================
3 | # Description: Update synchronization checker
4 | # Lisence: MIT
5 | # By:Jejz
6 | #===============================================
7 |
8 | name: Update synchronization checker
9 |
10 | on:
11 | repository_dispatch:
12 | workflow_dispatch:
13 | #schedule:
14 | #- cron: 16 1 * * *
15 | env:
16 | TZ: Asia/Shanghai
17 |
18 | jobs:
19 | New-Update-Files:
20 | runs-on: ubuntu-20.04
21 | steps:
22 | - name: Checkout
23 | uses: actions/checkout@main
24 | with:
25 | token: ${{ secrets.GH_TOKEN }}
26 |
27 | - name: Initialization environment
28 | env:
29 | DEBIAN_FRONTEND: noninteractive
30 | run: |
31 | sudo timedatectl set-timezone "$TZ"
32 | pwd
33 | rm -rf ./backup/kernel
34 | mkdir -p ./backup/kernel
35 | #svn export https://github.com/ophub/kernel/trunk/pub/stable ./backup/kernel --force
36 | #svn export https://github.com/breakings/OpenWrt/trunk/opt/kernel ./backup/kernel --force
37 | #rm -rf ./backup/kernel/5.10.*
38 | #rm -rf ./backup/kernel/5.4.*
39 |
40 | - name: Download kernel5.4/5.15
41 | uses: robinraju/release-downloader@main
42 | with:
43 | repository: "Jejz168/compile-kernel"
44 | tag: "kernel_stable"
45 | #latest: true
46 | fileName: "*"
47 | tarBall: true
48 | out-file-path: ./backup/kernel
49 |
50 | - name: Download kernel5.15
51 | uses: robinraju/release-downloader@main
52 | with:
53 | repository: "Jejz168/compile-kernel"
54 | tag: "kernel_Stable"
55 | #latest: true
56 | fileName: "*"
57 | tarBall: true
58 | out-file-path: ./backup/kernel
59 |
60 | - name: Release tar
61 | run: |
62 | cd ./backup/kernel
63 | find ./ -name *stable*|xargs rm -rf
64 | find ./ -name *compile*|xargs rm -rf
65 | ls ./*.tar.gz |xargs -n1 tar xzvf
66 | #ls ./*.zip | xargs -n1 unzip -o
67 | rm -rf ./*gz
68 | #rm -rf ./*zip
69 |
70 | - name: Commit
71 | run: |
72 | git config --global user.email "github-actions[bot]@users.noreply.github.com"
73 | git config --global user.name "github-actions[bot]"
74 | git add .
75 | git commit -m"action:`date`"
76 | git pull --rebase
77 |
78 | - name: Push changes
79 | uses: ad-m/github-push-action@master
80 | with:
81 | github_token: ${{ secrets.GH_TOKEN }}
82 |
83 | - name: Telegram notification upload success
84 | uses: appleboy/telegram-action@master
85 | with:
86 | to: ${{ secrets.TELEGRAM_TO }}
87 | token: ${{ secrets.TELEGRAM_TOKEN }}
88 | message: |
89 | ҉ 🎡Kernel同步成功 ҉
90 |
91 |
92 | - name: Push notification
93 | run: |
94 | MSG="
95 | ҉ 🎡Kernel同步成功 ҉
96 | "
97 | curl "http://www.pushplus.plus/send?token=${{ secrets.PUSH_PLUS_TOKEN }}" -d "title=Kernel同步成功&content=${MSG}"
98 |
--------------------------------------------------------------------------------
/.github/workflows/immo-config.yml:
--------------------------------------------------------------------------------
1 | # config在线生成项目
2 |
3 | name: immo-config
4 |
5 | on:
6 | repository_dispatch:
7 | workflow_dispatch:
8 | inputs:
9 | x86:
10 | description: 'Build_x86_config connection to Actions'
11 | required: true
12 | default: false
13 | type: boolean
14 | armv8:
15 | description: 'Build_armv8_config connection to Actions'
16 | required: true
17 | default: false
18 | type: boolean
19 | ssh:
20 | description: 'SSH connection to Actions'
21 | required: false
22 | default: true
23 | type: boolean
24 |
25 | env:
26 | REPO_URL: https://github.com/immortalwrt/immortalwrt
27 | REPO_BRANCH: master
28 | FEEDS_CONF: feeds_config/immo.feeds.conf.default
29 | CONFIG_FILE: config/immo_config/x86.config
30 | CONFIG_FILE_ARM: config/immo_config/armv8.config
31 | DIY_P1_SH: diy_script/immo_diy/x86/diy-part1.sh
32 | DIY_P1_SH_ARM: diy_script/immo_diy/armv8/diy-part1.sh
33 | DIY_P2_SH: diy_script/immo_diy/x86/diy-part2.sh
34 | DIY_P2_SH_ARM: diy_script/immo_diy/armv8/diy-part2.sh
35 | UPLOAD_FIRMWARE: true
36 | UPLOAD_RELEASE: false
37 | CONFIG: x86
38 | CONFIG_ARM: armv8
39 | TZ: Asia/Shanghai
40 |
41 | jobs:
42 | Build_x86_config:
43 | if: ${{ github.event.inputs.x86 == 'true'}}
44 | runs-on: ubuntu-22.04
45 |
46 | steps:
47 | - name: 检查项目分支
48 | uses: actions/checkout@main
49 |
50 | - name: 检查服务器配置
51 | run: |
52 | echo "警告⚠"
53 | echo "若分配的服务器性能不足,务必及时取消,重新运行!"
54 | echo "已知编译成功CPU型号:8370C,8171M"
55 | echo "已知性能不足CPU型号:8272CL"
56 | echo -e "-------------- ------------CPU信息------------------------------------------\n"
57 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)"
58 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n"
59 | echo "-------------------------------内存信息-------------------------------------------"
60 | echo "已安装内存详细信息:"
61 | sudo lshw -short -C memory | grep GiB
62 | echo -e "\n"
63 | echo "-----------------------------硬盘信息---------------------------------------------"
64 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n"
65 | echo "硬盘详情:"
66 | df -Th
67 |
68 | - name: 安装编译环境
69 | env:
70 | DEBIAN_FRONTEND: noninteractive
71 | run: |
72 | sudo -E swapoff -a
73 | sudo -E rm -f /swapfile
74 | sudo -E rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android
75 | sudo -E apt-get update
76 | sudo -E apt-get -y install $(cat $GITHUB_WORKSPACE/depends-ubuntu-2204)
77 | sudo -E apt-get -y autoremove --purge
78 | sudo -E apt-get clean
79 | sudo timedatectl set-timezone "$TZ"
80 | sudo mkdir -p /workdir
81 | sudo chown $USER:$GROUPS /workdir
82 |
83 | - name: 下载固件源码
84 | working-directory: /workdir
85 | run: |
86 | df -hT $PWD
87 | git clone $REPO_URL -b $REPO_BRANCH openwrt
88 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
89 |
90 | - name: 加载自定义设置和调整配置
91 | run: |
92 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default
93 | chmod +x $DIY_P1_SH
94 | cd openwrt
95 | $GITHUB_WORKSPACE/$DIY_P1_SH
96 |
97 | - name: 更新源
98 | run: cd openwrt && ./scripts/feeds update -a
99 |
100 | - name: 安装源
101 | run: cd openwrt && ./scripts/feeds install -a
102 |
103 | - name: 加载自定义设置和调整配置
104 | run: |
105 | [ -e files ] && mv files openwrt/files
106 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config
107 | chmod +x $DIY_P2_SH
108 | cd openwrt
109 | $GITHUB_WORKSPACE/$DIY_P2_SH
110 |
111 | - name: SSH链接管理
112 | uses: P3TERX/ssh2actions@v1.0.0
113 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
114 |
115 | - name: 提取config
116 | id: organize
117 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
118 | run: |
119 | cd openwrt
120 | make defconfig
121 | ls -a
122 | sudo mkdir ${{ env.CONFIG }}config && sudo cp .config ${{ env.CONFIG }}config/${{ env.CONFIG }}.config
123 | cd ${{ env.CONFIG }}config
124 | ls
125 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV
126 | echo "status=success" >> $GITHUB_OUTPUT
127 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
128 |
129 | - name: 上传config
130 | uses: actions/upload-artifact@main
131 | if: steps.organize.outputs.status == 'success' && !cancelled()
132 | with:
133 | name: ${{ env.CONFIG }}_config${{ env.FILE_DATE }}
134 | path: ${{ env.FIRMWARE }}
135 |
136 | - name: 生成发布标签
137 | id: tag
138 | if: env.UPLOAD_RELEASE == 'true' && !cancelled()
139 | run: |
140 | echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")"
141 | touch release.txt
142 | echo "status=success" >> $GITHUB_OUTPUT
143 |
144 | - name: 上传config文件并发布
145 | uses: softprops/action-gh-release@v1
146 | if: steps.tag.outputs.status == 'success' && !cancelled()
147 | env:
148 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149 | with:
150 | tag_name: ${{ steps.tag.outputs.release_tag }}
151 | body_path: release.txt
152 | files: ${{ env.FIRMWARE }}/*
153 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
154 | Build_armv8_config:
155 | if: ${{ github.event.inputs.armv8 == 'true'}}
156 | runs-on: ubuntu-22.04
157 |
158 | steps:
159 | - name: 检查项目分支
160 | uses: actions/checkout@main
161 |
162 | - name: 检查服务器配置
163 | run: |
164 | echo "警告⚠"
165 | echo "若分配的服务器性能不足,务必及时取消,重新运行!"
166 | echo "已知编译成功CPU型号:8370C,8171M"
167 | echo "已知性能不足CPU型号:8272CL"
168 | echo -e "-------------- ------------CPU信息------------------------------------------\n"
169 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)"
170 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n"
171 | echo "-------------------------------内存信息-------------------------------------------"
172 | echo "已安装内存详细信息:"
173 | sudo lshw -short -C memory | grep GiB
174 | echo -e "\n"
175 | echo "-----------------------------硬盘信息---------------------------------------------"
176 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n"
177 | echo "硬盘详情:"
178 | df -Th
179 |
180 | - name: 安装编译环境
181 | env:
182 | DEBIAN_FRONTEND: noninteractive
183 | run: |
184 | sudo -E swapoff -a
185 | sudo -E rm -f /swapfile
186 | sudo -E rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android
187 | sudo -E apt-get update
188 | sudo -E apt-get -y install $(curl -fsSL https://is.gd/depends_ubuntu_2204)
189 | sudo -E apt-get -y autoremove --purge
190 | sudo -E apt-get clean
191 | sudo timedatectl set-timezone "$TZ"
192 | sudo mkdir -p /workdir
193 | sudo chown $USER:$GROUPS /workdir
194 |
195 | - name: 下载固件源码
196 | working-directory: /workdir
197 | run: |
198 | df -hT $PWD
199 | git clone $REPO_URL -b $REPO_BRANCH openwrt
200 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
201 |
202 | - name: 加载自定义设置和调整配置
203 | run: |
204 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default
205 | chmod +x $DIY_P1_SH_ARM
206 | cd openwrt
207 | $GITHUB_WORKSPACE/$DIY_P1_SH_ARM
208 |
209 | - name: 更新源
210 | run: cd openwrt && ./scripts/feeds update -a
211 |
212 | - name: 安装源
213 | run: cd openwrt && ./scripts/feeds install -a
214 |
215 | - name: 加载自定义设置和调整配置
216 | run: |
217 | [ -e files ] && mv files openwrt/files
218 | [ -e $CONFIG_FILE_ARM ] && mv $CONFIG_FILE_ARM openwrt/.config
219 | chmod +x $DIY_P2_SH_ARM
220 | cd openwrt
221 | $GITHUB_WORKSPACE/$DIY_P2_SH_ARM
222 |
223 | - name: SSH链接管理
224 | uses: P3TERX/ssh2actions@v1.0.0
225 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
226 |
227 | - name: 提取config
228 | id: organize
229 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
230 | run: |
231 | cd openwrt
232 | make defconfig
233 | ls -a
234 | sudo mkdir ${{ env.CONFIG_ARM }}config && sudo cp .config ${{ env.CONFIG_ARM }}config/${{ env.CONFIG_ARM }}.config
235 | cd ${{ env.CONFIG_ARM }}config
236 | ls
237 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV
238 | echo "status=success" >> $GITHUB_OUTPUT
239 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
240 |
241 | - name: 上传config
242 | uses: actions/upload-artifact@main
243 | if: steps.organize.outputs.status == 'success' && !cancelled()
244 | with:
245 | name: ${{ env.CONFIG_ARM }}_config${{ env.FILE_DATE }}
246 | path: ${{ env.FIRMWARE }}
247 |
248 | - name: 生成发布标签
249 | id: tag
250 | if: env.UPLOAD_RELEASE == 'true' && !cancelled()
251 | run: |
252 | echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")"
253 | touch release.txt
254 | echo "status=success" >> $GITHUB_OUTPUT
255 |
256 | - name: 上传config文件并发布
257 | uses: softprops/action-gh-release@v1
258 | if: steps.tag.outputs.status == 'success' && !cancelled()
259 | env:
260 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
261 | with:
262 | tag_name: ${{ steps.tag.outputs.release_tag }}
263 | body_path: release.txt
264 | files: ${{ env.FIRMWARE }}/*
265 |
--------------------------------------------------------------------------------
/.github/workflows/openwrt-config.yml:
--------------------------------------------------------------------------------
1 | # config在线生成项目
2 |
3 | name: openwrt-config
4 |
5 | on:
6 | repository_dispatch:
7 | workflow_dispatch:
8 | inputs:
9 | x86:
10 | description: 'Build_x86_config connection to Actions'
11 | required: true
12 | default: false
13 | type: boolean
14 | armv8:
15 | description: 'Build_armv8_config connection to Actions'
16 | required: true
17 | default: false
18 | type: boolean
19 | ssh:
20 | description: 'SSH connection to Actions'
21 | required: false
22 | default: true
23 | type: boolean
24 |
25 | env:
26 | REPO_URL: https://github.com/openwrt/openwrt
27 | REPO_BRANCH: main
28 | FEEDS_CONF: feeds_config/openwrt.feeds.conf.default
29 | CONFIG_FILE: config/openwrt_config/x86.config
30 | CONFIG_FILE_ARM: config/openwrt_config/armv8.config
31 | DIY_P1_SH: diy_script/openwrt_diy/x86/diy-part1.sh
32 | DIY_P1_SH_ARM: diy_script/openwrt_diy/armv8/diy-part1.sh
33 | DIY_P2_SH: diy_script/openwrt_diy/x86/diy-part2.sh
34 | DIY_P2_SH_ARM: diy_script/openwrt_diy/armv8/diy-part2.sh
35 | UPLOAD_FIRMWARE: true
36 | UPLOAD_RELEASE: false
37 | CONFIG: x86
38 | CONFIG_ARM: armv8
39 | TZ: Asia/Shanghai
40 |
41 | jobs:
42 | Build_x86_config:
43 | if: ${{ github.event.inputs.x86 == 'true'}}
44 | runs-on: ubuntu-22.04
45 |
46 | steps:
47 | - name: 检查项目分支
48 | uses: actions/checkout@main
49 |
50 | - name: 检查服务器配置
51 | run: |
52 | echo "警告⚠"
53 | echo "若分配的服务器性能不足,务必及时取消,重新运行!"
54 | echo "已知编译成功CPU型号:8370C,8171M"
55 | echo "已知性能不足CPU型号:8272CL"
56 | echo -e "-------------- ------------CPU信息------------------------------------------\n"
57 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)"
58 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n"
59 | echo "-------------------------------内存信息-------------------------------------------"
60 | echo "已安装内存详细信息:"
61 | sudo lshw -short -C memory | grep GiB
62 | echo -e "\n"
63 | echo "-----------------------------硬盘信息---------------------------------------------"
64 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n"
65 | echo "硬盘详情:"
66 | df -Th
67 |
68 | - name: 安装编译环境
69 | env:
70 | DEBIAN_FRONTEND: noninteractive
71 | run: |
72 | sudo -E swapoff -a
73 | sudo -E rm -f /swapfile
74 | sudo -E rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android
75 | sudo -E apt-get update
76 | sudo -E apt-get -y install $(cat $GITHUB_WORKSPACE/depends-ubuntu-2204)
77 | sudo -E apt-get -y autoremove --purge
78 | sudo -E apt-get clean
79 | sudo timedatectl set-timezone "$TZ"
80 | sudo mkdir -p /workdir
81 | sudo chown $USER:$GROUPS /workdir
82 |
83 | - name: 下载固件源码
84 | working-directory: /workdir
85 | run: |
86 | df -hT $PWD
87 | git clone $REPO_URL -b $REPO_BRANCH openwrt
88 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
89 |
90 | - name: 加载自定义设置和调整配置
91 | run: |
92 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default
93 | chmod +x $DIY_P1_SH
94 | cd openwrt
95 | $GITHUB_WORKSPACE/$DIY_P1_SH
96 |
97 | - name: 更新源
98 | run: cd openwrt && ./scripts/feeds update -a
99 |
100 | - name: 安装源
101 | run: cd openwrt && ./scripts/feeds install -a
102 |
103 | - name: 加载自定义设置和调整配置
104 | run: |
105 | [ -e files ] && mv files openwrt/files
106 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config
107 | chmod +x $DIY_P2_SH
108 | cd openwrt
109 | $GITHUB_WORKSPACE/$DIY_P2_SH
110 |
111 | - name: SSH链接管理
112 | uses: P3TERX/ssh2actions@v1.0.0
113 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
114 |
115 | - name: 提取config
116 | id: organize
117 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
118 | run: |
119 | cd openwrt
120 | make defconfig
121 | ls -a
122 | sudo mkdir ${{ env.CONFIG }}config && sudo cp .config ${{ env.CONFIG }}config/${{ env.CONFIG }}.config
123 | cd ${{ env.CONFIG }}config
124 | ls
125 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV
126 | echo "status=success" >> $GITHUB_OUTPUT
127 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
128 |
129 | - name: 上传config
130 | uses: actions/upload-artifact@main
131 | if: steps.organize.outputs.status == 'success' && !cancelled()
132 | with:
133 | name: ${{ env.CONFIG }}_config${{ env.FILE_DATE }}
134 | path: ${{ env.FIRMWARE }}
135 |
136 | - name: 生成发布标签
137 | id: tag
138 | if: env.UPLOAD_RELEASE == 'true' && !cancelled()
139 | run: |
140 | echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")"
141 | touch release.txt
142 | echo "status=success" >> $GITHUB_OUTPUT
143 |
144 | - name: 上传config文件并发布
145 | uses: softprops/action-gh-release@v1
146 | if: steps.tag.outputs.status == 'success' && !cancelled()
147 | env:
148 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149 | with:
150 | tag_name: ${{ steps.tag.outputs.release_tag }}
151 | body_path: release.txt
152 | files: ${{ env.FIRMWARE }}/*
153 | # /////////////////////////////////////////////////////////////////////////////////////////////////////////
154 | Build_armv8_config:
155 | if: ${{ github.event.inputs.armv8 == 'true'}}
156 | runs-on: ubuntu-22.04
157 |
158 | steps:
159 | - name: 检查项目分支
160 | uses: actions/checkout@main
161 |
162 | - name: 检查服务器配置
163 | run: |
164 | echo "警告⚠"
165 | echo "若分配的服务器性能不足,务必及时取消,重新运行!"
166 | echo "已知编译成功CPU型号:8370C,8171M"
167 | echo "已知性能不足CPU型号:8272CL"
168 | echo -e "-------------- ------------CPU信息------------------------------------------\n"
169 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)"
170 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n"
171 | echo "-------------------------------内存信息-------------------------------------------"
172 | echo "已安装内存详细信息:"
173 | sudo lshw -short -C memory | grep GiB
174 | echo -e "\n"
175 | echo "-----------------------------硬盘信息---------------------------------------------"
176 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n"
177 | echo "硬盘详情:"
178 | df -Th
179 |
180 | - name: 安装编译环境
181 | env:
182 | DEBIAN_FRONTEND: noninteractive
183 | run: |
184 | sudo -E swapoff -a
185 | sudo -E rm -f /swapfile
186 | sudo -E rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android
187 | sudo -E apt-get update
188 | sudo -E apt-get -y install $(curl -fsSL https://is.gd/depends_ubuntu_2204)
189 | sudo -E apt-get -y autoremove --purge
190 | sudo -E apt-get clean
191 | sudo timedatectl set-timezone "$TZ"
192 | sudo mkdir -p /workdir
193 | sudo chown $USER:$GROUPS /workdir
194 |
195 | - name: 下载固件源码
196 | working-directory: /workdir
197 | run: |
198 | df -hT $PWD
199 | git clone $REPO_URL -b $REPO_BRANCH openwrt
200 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
201 |
202 | - name: 加载自定义设置和调整配置
203 | run: |
204 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default
205 | chmod +x $DIY_P1_SH_ARM
206 | cd openwrt
207 | $GITHUB_WORKSPACE/$DIY_P1_SH_ARM
208 |
209 | - name: 更新源
210 | run: cd openwrt && ./scripts/feeds update -a
211 |
212 | - name: 安装源
213 | run: cd openwrt && ./scripts/feeds install -a
214 |
215 | - name: 加载自定义设置和调整配置
216 | run: |
217 | [ -e files ] && mv files openwrt/files
218 | [ -e $CONFIG_FILE_ARM ] && mv $CONFIG_FILE_ARM openwrt/.config
219 | chmod +x $DIY_P2_SH_ARM
220 | cd openwrt
221 | $GITHUB_WORKSPACE/$DIY_P2_SH_ARM
222 |
223 | - name: SSH链接管理
224 | uses: P3TERX/ssh2actions@v1.0.0
225 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
226 |
227 | - name: 提取config
228 | id: organize
229 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
230 | run: |
231 | cd openwrt
232 | make defconfig
233 | ls -a
234 | sudo mkdir ${{ env.CONFIG_ARM }}config && sudo cp .config ${{ env.CONFIG_ARM }}config/${{ env.CONFIG_ARM }}.config
235 | cd ${{ env.CONFIG_ARM }}config
236 | ls
237 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV
238 | echo "status=success" >> $GITHUB_OUTPUT
239 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
240 |
241 | - name: 上传config
242 | uses: actions/upload-artifact@main
243 | if: steps.organize.outputs.status == 'success' && !cancelled()
244 | with:
245 | name: ${{ env.CONFIG_ARM }}_config${{ env.FILE_DATE }}
246 | path: ${{ env.FIRMWARE }}
247 |
248 | - name: 生成发布标签
249 | id: tag
250 | if: env.UPLOAD_RELEASE == 'true' && !cancelled()
251 | run: |
252 | echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")"
253 | touch release.txt
254 | echo "status=success" >> $GITHUB_OUTPUT
255 |
256 | - name: 上传config文件并发布
257 | uses: softprops/action-gh-release@v1
258 | if: steps.tag.outputs.status == 'success' && !cancelled()
259 | env:
260 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
261 | with:
262 | tag_name: ${{ steps.tag.outputs.release_tag }}
263 | body_path: release.txt
264 | files: ${{ env.FIRMWARE }}/*
265 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
OpenWrt — Actions
4 |
5 |
6 | - [**群组**](https://t.me/Jejz_168)
7 | - 🛑******最好全新刷机(加入快捷改IP的ssh命令:JejzWrt)******
8 | - ♨️【x86】Docker版(Kernel=32M,rootfs=5120M)和 无Docker版(Kernel=32M,rootfs=1668M)不通刷
9 | - 本库x86为squashfs格式。
10 | - ext4 与squashfs 格式的区别: ext4 格式的rootfs 可以扩展磁盘空间大小,而squashfs 不能。 squashfs 格式的rootfs 可以使用重置功能(恢复出厂设置),而ext4 不能。
11 | - *必须要是本库最新才能使用。不然就会死翘翘。
12 | - 升级方法:下载好对应的版本(.img.gz),然后(openwrt-系统-备份/升级) *直接选择,不用解压
13 | # ==============================
14 | ## 项目说明 [](#项目说明-)
15 | - 固件来源:[](https://github.com/coolsnowwolf/lede)
16 | - 项目使用 Github Actions 拉取 [Lean](https://github.com/coolsnowwolf/lede) [immortalwrt](https://github.com/immortalwrt/immortalwrt) [openwrt](https://github.com/openwrt/openwrt) 的 `Openwrt` 源码仓库进行云编译
17 | - ♨️【x86】Docker版(Kernel=32M,rootfs=5120M)和 无Docker版(Kernel=32M,rootfs=1668M)不通刷
18 | - 🔴arm 固件默认 IP 地址:`192.168.8.8` 默认密码:`password`
19 | - 🔴x86 固件默认 IP 地址:`192.168.8.3` 默认密码:`无密码`
20 | - 🔴x86[Docker] 固件默认 IP 地址:`192.168.8.3` 默认密码:`无密码`
21 | - 🔴x86[个人版] 固件默认 IP 地址:`192.168.8.5` 默认密码:`无密码`
22 | - 仓库编译的固件插件均为最新版本,最新版意味着可能有 BUG,如果之前使用稳定,则无需追新
23 |
24 | ## 插件预览 [](#插件预览-)
25 | - ******标记arm的,只有arm有******
26 |
27 | 插件预览
28 |
29 |
30 | ├── 状态
31 | ├── 概况
32 | ├── 防火墙
33 | ├── 路由表
34 | ├── 系统日志
35 | ├── 内核日志
36 | ├── 系统进程
37 | ├── 实时信息
38 | ├── 实时监控
39 | ├── WireGuard状态
40 | ├── 负载均衡
41 | └── 释放内存
42 |
43 |
44 | ├── 系统
45 | ├── 系统
46 | ├── Web管理
47 | ├── 管理权
48 | ├── 软件包
49 | ├── TTYD 终端
50 | ├── 启动项
51 | ├── 计划任务
52 | ├── 挂载点
53 | ├── 磁盘管理
54 | ├── 备份/升级
55 | ├── 定时设置
56 | ├── 文件传输
57 | ├── Argon 主题设置
58 | ├── Design 主题设置
59 | ├── 重启
60 | └── 关机
61 |
62 |
63 | ├── 服务
64 | ├── PassWall
65 | ├── PassWall2 (arm)
66 | ├── Hello World
67 | ├── AdGuard Home
68 | ├── ShadowSocksR Plus+
69 | ├── DDNSTO 远程控制
70 | ├── 应用过滤
71 | ├── 网站域名黑白名单配置
72 | ├── 全能推送
73 | ├── 上网时间控制
74 | ├── OpenClash
75 | ├── Lucky
76 | ├── 动态 DNS
77 | ├── SmartDNS
78 | ├── MosDNS
79 | ├── 网络唤醒
80 | ├── Frps
81 | ├── UPnP
82 | ├── Frp 内网穿透
83 | ├── KMS 服务器
84 | └── Nps 内网穿透
85 |
86 |
87 | ├── Docker (arm)
88 | ├── 概览
89 | ├── 容器
90 | ├── 镜像
91 | ├── 网络
92 | ├── 存储卷
93 | ├── 事件
94 | └── 设置
95 |
96 |
97 | ├── 网络存储
98 | ├── 文件浏览器
99 | ├── NFS 管理
100 | ├── Alist 文件列表
101 | ├── USB 打印服务器
102 | ├── 硬盘休眠
103 | ├── 打印服务器
104 | ├── 网络共享
105 | ├── Aria2 配置
106 | └── FTP 服务器
107 |
108 |
109 | ├── VPN
110 | ├── V2ray 服务器
111 | ├── N2N VPN
112 | ├── SoftEther VPN 服务器
113 | ├── OpenVPN 服务器
114 | ├── IPSec VPN 服务器
115 | ├── PPTP VPN 服务器
116 | └── ZeroTier
117 |
118 |
119 | ├── 网络
120 | ├── 接口
121 | ├── DHCP/DNS
122 | ├── 主机名
123 | ├── IP/MAC 绑定
124 | ├── 静态路由
125 | ├── 防火墙
126 | ├── 诊断
127 | ├── IP限速
128 | ├── Socat
129 | ├── Turbo ACC 网络加速
130 | ├── 多线多拨
131 | └── 负载均衡
132 |
133 |
134 | ├── 带宽监控
135 | ├── 显示
136 | ├── 配置
137 | ├── 备份
138 | └── 实时流量监测
139 |
140 | └── 退出
141 |
142 |
143 | ## 固件下载
144 | **点击跳转到该设备固件下载页面**
145 | - ♨️【x86】Docker版(Kernel=32M,rootfs=5120M)和普通(Kernel=32M,rootfs=1668M)不通刷
146 | - [**X86下载地址**](https://github.com/Jejz168/OpenWrt/releases)
147 | - [**Arm下载地址**](https://github.com/Jejz168/OpenWrt/releases/tag/ARMv8)
148 |
149 | ## 鸣谢 [](#鸣谢-)
150 | | [ImmortalWrt](https://github.com/immortalwrt) | [coolsnowwolf](https://github.com/coolsnowwolf) | [P3TERX](https://github.com/P3TERX) | [Flippy](https://github.com/unifreq) | [haiibo](https://github.com/haiibo) | [Lenyu2020](https://github.com/Lenyu2020) |
151 | | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
152 | |
|
|
|
|
|
|
153 | | [Ophub](https://github.com/ophub) | [Jerrykuku](https://github.com/jerrykuku) | [QiuSimons](https://github.com/QiuSimons) | [IvanSolis1989](https://github.com/IvanSolis1989) | [DHDAXCW](https://github.com/DHDAXCW) | [breakings](https://github.com/breakings) |
154 | |
|
|
|
|
|
|
155 |
156 |
157 | # 访问量
158 |
159 | 
160 | # ==============================
161 | # 🏖Special thanks(特别感谢)
162 | - [GitHub Actions](https://github.com/features/actions)🎉🎉Thank you very much.🎉🎉
163 |
164 |
165 |
166 |
167 |
168 |
169 |
--------------------------------------------------------------------------------
/backup/README_backup.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
OpenWrt — Actions
4 |
5 |
6 | - 群组: https://t.me/Jejz_168
7 |
8 | - [******x86手动升级说明******](https://github.com/Jejz168/OpenWrt/blob/main/Upgrade.sh)
9 | - [******x86半自动升级下载******](https://github.com/Jejz168/OpenWrt/raw/main/Semi_automatic_update.sh)
10 | - 🛑******最好全新刷机******
11 | - 本库x86为squashfs格式(Kernel=32M,rootfs=968M)
12 | - ext4 与squashfs 格式的区别: ext4 格式的rootfs 可以扩展磁盘空间大小,而squashfs 不能。 squashfs 格式的rootfs 可以使用重置功能(恢复出厂设置),而ext4 不能。
13 | - 必须要是本库最新才能使用。不然就会死翘翘。
14 | - 此Semi_automatic_update.sh文件修改好后放到openwrt的root目录中
15 | - 再进ssh输入👉 cd /root && chmod +x Semi_automatic_update.sh && ./Semi_automatic_update.sh
16 | # ==============================
17 | ## 项目说明 [](#项目说明-)
18 | - 固件来源:[](https://github.com/coolsnowwolf/lede)
19 | - 项目使用 Github Actions 拉取 [Lean](https://github.com/coolsnowwolf/lede) 的 `Openwrt` 源码仓库进行云编译
20 | - 🔴arm 固件默认 IP 地址:`192.168.8.8` 默认密码:`无密码`
21 | - 🔴x86 固件默认 IP 地址:`192.168.8.3` 默认密码:`无密码`
22 | - 仓库编译的固件插件均为最新版本,最新版意味着可能有 BUG,如果之前使用稳定,则无需追新
23 |
24 | ## 插件预览 [](#插件预览-)
25 | - ******标记arm的,只有arm有******
26 |
27 | 插件预览
28 |
29 |
30 | ├── 状态
31 | ├── 概况
32 | ├── 防火墙
33 | ├── 路由表
34 | ├── 系统日志
35 | ├── 内核日志
36 | ├── 系统进程
37 | ├── 实时信息
38 | ├── 实时监控
39 | ├── WireGuard状态
40 | ├── 负载均衡
41 | └── 释放内存
42 |
43 |
44 | ├── 系统
45 | ├── 系统
46 | ├── Web管理
47 | ├── 管理权
48 | ├── 软件包
49 | ├── TTYD 终端
50 | ├── 启动项
51 | ├── 计划任务
52 | ├── 挂载点
53 | ├── 磁盘管理
54 | ├── 备份/升级
55 | ├── 定时设置
56 | ├── 文件传输
57 | ├── Argon 主题设置
58 | ├── 重启
59 | └── 关机
60 |
61 |
62 | ├── 服务
63 | ├── PassWall
64 | ├── PassWall2 (arm)
65 | ├── Hello World
66 | ├── iKoolProxy 滤广告
67 | ├── 广告屏蔽大师 Plus+
68 | ├── AdGuard Home
69 | ├── ShadowSocksR Plus+
70 | ├── DDNSTO 远程控制
71 | ├── 应用过滤
72 | ├── 全能推送
73 | ├── 上网时间控制
74 | ├── 解锁网易云灰色歌曲
75 | ├── OpenClash
76 | ├── Lucky
77 | ├── 动态 DNS
78 | ├── MosDNS
79 | ├── 网络唤醒
80 | ├── Frps
81 | ├── UPnP
82 | ├── Frp 内网穿透
83 | ├── KMS 服务器
84 | └── Nps 内网穿透
85 |
86 |
87 | ├── Docker (arm)
88 | ├── 概览
89 | ├── 容器
90 | ├── 镜像
91 | ├── 网络
92 | ├── 存储卷
93 | ├── 事件
94 | └── 设置
95 |
96 |
97 | ├── 网络存储
98 | ├── 文件浏览器
99 | ├── NFS 管理
100 | ├── 阿里云盘 FUSE
101 | ├── 阿里云盘 WebDAV
102 | ├── USB 打印服务器
103 | ├── 硬盘休眠
104 | ├── 打印服务器
105 | ├── 网络共享
106 | └── FTP 服务器
107 |
108 |
109 | ├── VPN
110 | ├── V2ray 服务器
111 | ├── N2N VPN
112 | ├── SoftEther VPN 服务器
113 | ├── OpenVPN 服务器
114 | ├── IPSec VPN 服务器
115 | ├── PPTP VPN 服务器
116 | └── ZeroTier
117 |
118 |
119 | ├── 网络
120 | ├── 接口
121 | ├── DHCP/DNS
122 | ├── 主机名
123 | ├── IP/MAC 绑定
124 | ├── 静态路由
125 | ├── 防火墙
126 | ├── 诊断
127 | ├── 网速控制
128 | ├── Socat
129 | ├── Turbo ACC 网络加速
130 | ├── 多线多拨
131 | └── 负载均衡
132 |
133 |
134 | ├── 带宽监控
135 | ├── 显示
136 | ├── 配置
137 | ├── 备份
138 | └── 实时流量监测
139 |
140 | └── 退出
141 |
142 |
143 | ## 固件下载
144 | 点击下表中 [](https://github.com/Jejz168/OpenWrt/releases) 即可跳转到该设备固件下载页面
145 |
146 | ## 鸣谢 [](#鸣谢-)
147 | | [ImmortalWrt](https://github.com/immortalwrt) | [coolsnowwolf](https://github.com/coolsnowwolf) | [P3TERX](https://github.com/P3TERX) | [Flippy](https://github.com/unifreq) | [haiibo](https://github.com/haiibo) | [Lenyu2020](https://github.com/Lenyu2020) |
148 | | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
149 | |
|
|
|
|
|
|
150 | | [Ophub](https://github.com/ophub) | [Jerrykuku](https://github.com/jerrykuku) | [QiuSimons](https://github.com/QiuSimons) | [IvanSolis1989](https://github.com/IvanSolis1989) | [Tao173](https://github.com/Tao173) | [breakings](https://github.com/breakings) |
151 | |
|
|
|
|
|
|
152 |
153 |
154 | # 访问量
155 |
156 | 
157 | # ==============================
158 | # 🏖Special thanks(特别感谢)
159 | - [GitHub Actions](https://github.com/features/actions)🎉🎉Thank you very much.🎉🎉
160 |
161 |
162 |
163 |
164 |
165 |
166 |
--------------------------------------------------------------------------------
/backup/Semi_automatic_update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #手动填写
3 | #对应更新时间(年月日)必须要写对
4 | update_time=20230102
5 | #对应内核具体版本,必须要写对
6 | kernel_version=5.15.85
7 | #固件地址
8 | OPENWRT_URL=https://github.com/Jejz168/OpenWrt/releases/download/${update_time}_${kernel_version}/openwrt_x86-64_${kernel_version}_bios.img.gz
9 | OPENWRT_UEFI_URL=https://github.com/Jejz168/OpenWrt/releases/download/${update_time}_${kernel_version}/openwrt_x86-64_${kernel_version}_uefi.img.gz
10 | #MD5地址
11 | openwrt_md5=https://github.com/Jejz168/OpenWrt/releases/download/${update_time}_${kernel_version}/openwrt_bios.md5
12 | openwrt_md5_uefi=https://github.com/Jejz168/OpenWrt/releases/download/${update_time}_${kernel_version}/openwrt_uefi.md5
13 | #防止内存不足tmp扩容到2g,升级重启后恢复
14 | mount -t tmpfs -o remount,size=2G tmpfs /tmp
15 | #判断系统
16 | echo "对应更新时间:${update_time}"
17 | echo "对应内核具体版本:${kernel_version}"
18 | if [ ! -d /sys/firmware/efi ];then
19 | wget -P /tmp "$OPENWRT_URL" -O /tmp/openwrt_x86-64_${kernel_version}_bios.img.gz
20 | wget -P /tmp "$openwrt_md5" -O /tmp/openwrt_bios.md5
21 | cd /tmp && md5sum -c openwrt_bios.md5
22 | if [ $? != 0 ]; then
23 | echo "您下载文件失败,请检查填写和网络再重试…"
24 | sleep 4
25 | exit
26 | fi
27 | Boot_type=logic
28 | else
29 | wget -P /tmp "$OPENWRT_UEFI_URL" -O /tmp/openwrt_x86-64_${kernel_version}_uefi.img.gz
30 | wget -P /tmp "$openwrt_md5_uefi" -O /tmp/openwrt_uefi.md5
31 | cd /tmp && md5sum -c openwrt_uefi.md5
32 | if [ $? != 0 ]; then
33 | echo "您下载文件失败,请检查填写和网络再重试…"
34 | sleep 4
35 | exit
36 | fi
37 | Boot_type=efi
38 | fi
39 | #升级选择
40 | open_up()
41 | {
42 | echo
43 | clear
44 | read -n 1 -p " 您是否要保留配置升级,保留选择Y,否则选N:" num1
45 | echo
46 | case $num1 in
47 | Y|y)
48 | echo
49 | echo -e "\033[33m >>>正在准备保留配置升级,请稍后,等待系统重启…-> \033[0m"
50 | echo
51 | sleep 3
52 | if [ ! -d /sys/firmware/efi ];then
53 | gzip -d openwrt_x86-64_${kernel_version}_bios.img.gz
54 | sysupgrade /tmp/openwrt_x86-64_${kernel_version}_bios.img
55 | else
56 | gzip -d openwrt_x86-64_${kernel_version}_uefi.img.gz
57 | sysupgrade /tmp/openwrt_x86-64_${kernel_version}_uefi.img
58 | fi
59 | ;;
60 | n|N)
61 | echo
62 | echo -e "\033[33m >>>正在准备不保留配置升级,请稍后,等待系统重启…-> \033[0m"
63 | echo
64 | sleep 3
65 | if [ ! -d /sys/firmware/efi ];then
66 | gzip -d openwrt_x86-64_${kernel_version}_bios.img.gz
67 | sysupgrade -n /tmp/openwrt_x86-64_${kernel_version}_bios.img
68 | else
69 | gzip -d openwrt_x86-64_${kernel_version}_uefi.img.gz
70 | sysupgrade -n /tmp/openwrt_x86-64_${kernel_version}_uefi.img
71 | fi
72 | ;;
73 | *)
74 | echo
75 | echo -e "\033[31m err:只能选择Y/N\033[0m"
76 | echo
77 | read -n 1 -p "请回车继续…"
78 | echo
79 | open_up
80 | esac
81 | }
82 | open_op()
83 | {
84 | echo
85 | read -n 1 -p " 您确定要升级吗,升级选择Y,否则选N:" num1
86 | echo
87 | case $num1 in
88 | Y|y)
89 | open_up
90 | ;;
91 | n|N)
92 | echo
93 | echo -e "\033[31m >>>您已选择退出固件升级,已经终止脚本…-> \033[0m"
94 | echo
95 | exit 1
96 | ;;
97 | *)
98 | echo
99 | echo -e "\033[31m err:只能选择Y/N\033[0m"
100 | echo
101 | read -n 1 -p "请回车继续…"
102 | echo
103 | open_op
104 | esac
105 | }
106 | open_op
107 | exit 0
108 |
--------------------------------------------------------------------------------
/backup/Upgrade.sh:
--------------------------------------------------------------------------------
1 | #tmp扩容到1g,升级重启后恢复
2 | mount -t tmpfs -o remount,size=1G tmpfs /tmp
3 |
4 | ##下载解压的文件放openwrt的/tmp/目录
5 | 例如:openwrt_x86-64_5.15.55_uefi.img
6 | ##再运行下面二选一
7 | #保留配置升级
8 | sysupgrade /tmp/openwrt_x86-64_5.15.55_uefi.img
9 |
10 | #不保留配置升级
11 | sysupgrade -n /tmp/openwrt_x86-64_5.15.55_uefi.img
12 |
--------------------------------------------------------------------------------
/depends-ubuntu-2204:
--------------------------------------------------------------------------------
1 | ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison btrfs-progs build-essential bzip2 ca-certificates ccache clang cmake coreutils cpio curl device-tree-compiler ecj fakeroot fastjar flex g++-multilib gawk gcc-multilib gettext genisoimage git git-core gnutls-dev gperf gzip haveged help2man intltool jq lib32gcc-s1 libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5 libncursesw5-dev libpython3-dev libreadline-dev libssl-dev libtool libyaml-dev libz-dev lld llvm lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pigz pkgconf python2 python2.7 python3 python3-docutils python3-pip python3-ply python3-pyelftools python3-setuptools qemu-utils quilt re2c rsync scons squashfs-tools subversion swig tar texinfo uglifyjs unzip upx upx-ucl vim wget xmlto xsltproc xxd xz-utils yasm zip zlib1g-dev zstd
2 |
--------------------------------------------------------------------------------
/diy_script/function.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # 打包Toolchain
4 | if [[ $REBUILD_TOOLCHAIN = 'true' ]]; then
5 | echo -e "\e[1;33m开始打包toolchain目录\e[0m"
6 | cd $OPENWRT_PATH
7 | sed -i 's/ $(tool.*\/stamp-compile)//' Makefile
8 | [ -d ".ccache" ] && (ccache=".ccache"; ls -alh .ccache)
9 | du -h --max-depth=1 ./staging_dir
10 | du -h --max-depth=1 ./ --exclude=staging_dir
11 | tar -I zstdmt -cf $GITHUB_WORKSPACE/output/$CACHE_NAME.tzst staging_dir/host* staging_dir/tool* $ccache
12 | ls -lh $GITHUB_WORKSPACE/output
13 | [ -e $GITHUB_WORKSPACE/output/$CACHE_NAME.tzst ] || exit 1
14 | exit 0
15 | fi
16 |
17 | [ -d $GITHUB_WORKSPACE/output ] || mkdir $GITHUB_WORKSPACE/output
18 |
19 | # 拉取仓库文件夹
20 | drop_package(){
21 | find package/ -follow -name $1 -not -path "package/custom/*" | xargs -rt rm -rf
22 | }
23 |
24 | merge_feed(){
25 | ./scripts/feeds update $1
26 | ./scripts/feeds install -a -p $1
27 | }
28 |
29 | color() {
30 | case $1 in
31 | cr) echo -e "\e[1;31m$2\e[0m" ;;
32 | cg) echo -e "\e[1;32m$2\e[0m" ;;
33 | cy) echo -e "\e[1;33m$2\e[0m" ;;
34 | cb) echo -e "\e[1;34m$2\e[0m" ;;
35 | cp) echo -e "\e[1;35m$2\e[0m" ;;
36 | cc) echo -e "\e[1;36m$2\e[0m" ;;
37 | ch) echo -e "\e[1;41m$2\e[0m" ;;
38 | esac
39 | }
40 |
41 | status() {
42 | local check=$? end_time=$(date '+%H:%M:%S') total_time
43 | total_time="==> 用时 $[$(date +%s -d $end_time) - $(date +%s -d $begin_time)] 秒"
44 | [[ $total_time =~ [0-9]+ ]] || total_time=""
45 | if [[ $check = 0 ]]; then
46 | printf "%-62s %s %s %s %s %s %s %s\n" \
47 | $(color cy $1) [ $(color cg ✔) ] $(echo -e "\e[1m$total_time")
48 | else
49 | printf "%-62s %s %s %s %s %s %s %s\n" \
50 | $(color cy $1) [ $(color cr ✕) ] $(echo -e "\e[1m$total_time")
51 | fi
52 | }
53 |
54 | find_dir() {
55 | find $1 -maxdepth 3 -type d -name $2 -print -quit 2>/dev/null
56 | }
57 |
58 | print_info() {
59 | printf "%s %-40s %s %s %s\n" $1 $2 $3 $4 $5
60 | # read -r param1 param2 param3 param4 param5 <<< $1
61 | # printf "%s %-40s %s %s %s\n" $param1 $param2 $param3 $param4 $param5
62 | }
63 |
64 | # 添加整个源仓库(git clone)
65 | git_clone() {
66 | local repo_url branch target_dir current_dir
67 | if [[ "$1" == */* ]]; then
68 | repo_url="$1"
69 | shift
70 | else
71 | branch="-b $1 --single-branch"
72 | repo_url="$2"
73 | shift 2
74 | fi
75 | if [[ -n "$@" ]]; then
76 | target_dir="$@"
77 | else
78 | target_dir="${repo_url##*/}"
79 | fi
80 | git clone -q $branch --depth=1 $repo_url $target_dir 2>/dev/null || {
81 | print_info $(color cr 拉取) $repo_url [ $(color cr ✕) ]
82 | return 0
83 | }
84 | rm -rf $target_dir/{.git*,README*.md,LICENSE}
85 | current_dir=$(find_dir "package/ feeds/ target/" "$target_dir")
86 | if ([[ -d $current_dir ]] && rm -rf $current_dir); then
87 | mv -f $target_dir ${current_dir%/*}
88 | print_info $(color cg 替换) $target_dir [ $(color cg ✔) ]
89 | else
90 | mv -f $target_dir $destination_dir
91 | print_info $(color cb 添加) $target_dir [ $(color cb ✔) ]
92 | fi
93 | }
94 |
95 | # 添加源仓库内的指定目录
96 | clone_dir() {
97 | local repo_url branch temp_dir=$(mktemp -d)
98 | if [[ "$1" == */* ]]; then
99 | repo_url="$1"
100 | shift
101 | else
102 | branch="-b $1 --single-branch"
103 | repo_url="$2"
104 | shift 2
105 | fi
106 | git clone -q $branch --depth=1 $repo_url $temp_dir 2>/dev/null || {
107 | print_info $(color cr 拉取) $repo_url [ $(color cr ✕) ]
108 | return 0
109 | }
110 | local target_dir source_dir current_dir
111 | for target_dir in "$@"; do
112 | source_dir=$(find_dir "$temp_dir" "$target_dir")
113 | [[ -d $source_dir ]] || \
114 | source_dir=$(find "$temp_dir" -maxdepth 4 -type d -name "$target_dir" -print -quit) && \
115 | [[ -d $source_dir ]] || {
116 | print_info $(color cr 查找) $target_dir [ $(color cr ✕) ]
117 | continue
118 | }
119 | current_dir=$(find_dir "package/ feeds/ target/" "$target_dir")
120 | if ([[ -d $current_dir ]] && rm -rf $current_dir); then
121 | mv -f $source_dir ${current_dir%/*}
122 | print_info $(color cg 替换) $target_dir [ $(color cg ✔) ]
123 | else
124 | mv -f $source_dir $destination_dir
125 | print_info $(color cb 添加) $target_dir [ $(color cb ✔) ]
126 | fi
127 | done
128 | rm -rf $temp_dir
129 | }
130 |
131 | # 添加源仓库内的所有目录
132 | clone_all() {
133 | local repo_url branch temp_dir=$(mktemp -d)
134 | if [[ "$1" == */* ]]; then
135 | repo_url="$1"
136 | shift
137 | else
138 | branch="-b $1 --single-branch"
139 | repo_url="$2"
140 | shift 2
141 | fi
142 | git clone -q $branch --depth=1 $repo_url $temp_dir 2>/dev/null || {
143 | print_info $(color cr 拉取) $repo_url [ $(color cr ✕) ]
144 | return 0
145 | }
146 | local target_dir source_dir current_dir
147 | for target_dir in $(ls -l $temp_dir/$@ | awk '/^d/{print $NF}'); do
148 | source_dir=$(find_dir "$temp_dir" "$target_dir")
149 | current_dir=$(find_dir "package/ feeds/ target/" "$target_dir")
150 | if ([[ -d $current_dir ]] && rm -rf $current_dir); then
151 | mv -f $source_dir ${current_dir%/*}
152 | print_info $(color cg 替换) $target_dir [ $(color cg ✔) ]
153 | else
154 | mv -f $source_dir $destination_dir
155 | print_info $(color cb 添加) $target_dir [ $(color cb ✔) ]
156 | fi
157 | done
158 | rm -rf $temp_dir
159 | }
160 |
161 | # 源仓库与分支
162 | SOURCE_REPO=$(basename $REPO_URL)
163 | echo "SOURCE_REPO=$SOURCE_REPO" >>$GITHUB_ENV
164 |
165 | # 平台架构
166 | TARGET_NAME=$(awk -F '"' '/CONFIG_TARGET_BOARD/{print $2}' .config)
167 | SUBTARGET_NAME=$(awk -F '"' '/CONFIG_TARGET_SUBTARGET/{print $2}' .config)
168 | DEVICE_TARGET=$TARGET_NAME-$SUBTARGET_NAME
169 | echo "DEVICE_TARGET=$DEVICE_TARGET" >>$GITHUB_ENV
170 |
171 | # Toolchain缓存文件名
172 | TOOLS_HASH=$(git log --pretty=tformat:"%h" -n1 tools toolchain)
173 | CACHE_NAME="$SOURCE_REPO-${REPO_BRANCH#*-}-$DEVICE_TARGET-cache-$TOOLS_HASH"
174 | echo "CACHE_NAME=$CACHE_NAME" >>$GITHUB_ENV
175 |
176 | # 下载并部署Toolchain
177 | if [[ $TOOLCHAIN = 'true' ]]; then
178 | #cache_xa=$(curl -sL api.github.com/repos/$GITHUB_REPOSITORY/releases | awk -F '"' '/download_url/{print $4}' | grep $CACHE_NAME)
179 | cache_xa="https://github.com/$GITHUB_REPOSITORY/releases/download/toolchain-cache/$CACHE_NAME.tzst"
180 | cache_xc=$(curl -sL api.github.com/repos/Jejz168/toolchain-cache/releases | awk -F '"' '/download_url/{print $4}' | grep $CACHE_NAME)
181 | #if [[ $cache_xa || $cache_xc ]]; then
182 | if curl -Isf $cache_xa >/dev/null 2>&1 || [ $cache_xc ]; then
183 | begin_time=$(date '+%H:%M:%S')
184 | curl -Isf $cache_xa >/dev/null 2>&1 && wget -qc -t=3 $cache_xa || wget -qc -t=3 $cache_xc
185 | [ -e *.tzst ]; status "下载toolchain缓存文件"
186 | [ -e *.tzst ] && {
187 | begin_time=$(date '+%H:%M:%S')
188 | tar -I unzstd -xf *.tzst || tar -xf *.tzst
189 | # [ $cache_xa ] || (cp *.tzst $GITHUB_WORKSPACE/output && echo "OUTPUT_RELEASE=true" >>$GITHUB_ENV)
190 | sed -i 's/ $(tool.*\/stamp-compile)//' Makefile
191 | [ -d staging_dir ]; status "部署toolchain编译缓存"
192 | }
193 | else
194 | echo -e "$(color ch 下载toolchain缓存文件) [ $(color cr ✕) ]"
195 | echo "CANCEL_TOOLCHAIN=true" >>$GITHUB_ENV
196 | fi
197 | else
198 | echo -e "$(color ch 使用toolchain缓存文件) [ $(color cr ✕) ]"
199 | echo "CANCEL_TOOLCHAIN=true" >>$GITHUB_ENV
200 | fi
201 |
202 | # 创建插件保存目录
203 | destination_dir="package/A"
204 | [ -d $destination_dir ] || mkdir -p $destination_dir
205 |
206 | if [ -z "$DEVICE_TARGET" ] || [ "$DEVICE_TARGET" == "-" ]; then
207 | echo -e "$(color cy 当前编译机型) $(color cb $SOURCE_REPO-${REPO_BRANCH#*-})"
208 | else
209 | echo -e "$(color cy 当前编译机型) $(color cb $SOURCE_REPO-${REPO_BRANCH#*-}-$DEVICE_TARGET)"
210 | fi
211 |
--------------------------------------------------------------------------------
/diy_script/immo_diy/armv8/diy-part1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # Description: DIY script part 1
4 | # File name: diy-part1.sh
5 | # Lisence: MIT
6 | # By: Jejz
7 | #===============================================
8 |
9 |
10 | # Add a feed source
11 | sed -i "/helloworld/d" feeds.conf.default
12 | # sed -i '$a src-git Jejz https://github.com/Jejz168/openwrt-packages' feeds.conf.default
13 | # sed -i '$a src-git helloworld https://github.com/fw876/helloworld' feeds.conf.default
14 | # sed -i '$a src-git PWpackages https://github.com/xiaorouji/openwrt-passwall-packages.git;main' feeds.conf.default
15 |
--------------------------------------------------------------------------------
/diy_script/immo_diy/x86/99-default-settings:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | uci -q get system.@imm_init[0] > "/dev/null" || uci -q add system imm_init > "/dev/null"
4 |
5 | if ! uci -q get system.@imm_init[0].lang > "/dev/null"; then
6 | uci -q batch <<-EOF
7 | set luci.main.lang="auto"
8 | commit luci
9 |
10 | set system.@imm_init[0].lang="1"
11 | commit system
12 | EOF
13 | fi
14 |
15 | uci set fstab.@global[0].anon_mount=1
16 | uci commit fstab
17 |
18 | rm -f /usr/lib/lua/luci/view/admin_status/index/mwan.htm
19 | rm -f /usr/lib/lua/luci/view/admin_status/index/upnp.htm
20 | rm -f /usr/lib/lua/luci/view/admin_status/index/linkease.htm
21 |
22 | ln -sf /sbin/ip /usr/bin/ip
23 |
24 | sed -i '/log-facility/d' /etc/dnsmasq.conf
25 | echo "log-facility=/dev/null" >> /etc/dnsmasq.conf
26 |
27 | rm -rf /tmp/luci-modulecache/
28 | rm -f /tmp/luci-indexcache
29 |
30 | chmod 0755 /etc/init.d/*
31 |
32 | exit 0
33 |
--------------------------------------------------------------------------------
/diy_script/immo_diy/x86/diy-part1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # Description: DIY script part 1
4 | # File name: diy-part1.sh
5 | # Lisence: MIT
6 | # By: Jejz
7 | #===============================================
8 |
9 | # Add a feed source
10 | sed -i "/helloworld/d" feeds.conf.default
11 | # sed -i '$a src-git Jejz https://github.com/Jejz168/openwrt-packages' feeds.conf.default
12 | # sed -i '$a src-git helloworld https://github.com/fw876/helloworld' feeds.conf.default
13 | # sed -i '$a src-git PWpackages https://github.com/xiaorouji/openwrt-passwall-packages.git;main' feeds.conf.default
14 |
15 |
16 |
17 | cat>rename.sh<<-\EOF
18 | #!/bin/bash
19 | # 删除无关的文件
20 | ls -l bin/targets/x86/64/
21 | rm -rf bin/targets/x86/64/config.buildinfo
22 | rm -rf bin/targets/x86/64/feeds.buildinfo
23 | rm -rf bin/targets/x86/64/immortalwrt-x86-64-generic-kernel.bin
24 | rm -rf bin/targets/x86/64/immortalwrt-x86-64-generic-squashfs-combined-efi.vmdk
25 | rm -rf bin/targets/x86/64/immortalwrt-x86-64-generic-squashfs-combined.vmdk
26 | rm -rf bin/targets/x86/64/immortalwrt-x86-64-generic-squashfs-rootfs.img.gz
27 | rm -rf bin/targets/x86/64/immortalwrt-x86-64-generic.manifest
28 | rm -rf bin/targets/x86/64/sha256sums
29 | rm -rf bin/targets/x86/64/version.buildinfo
30 | rm -rf bin/targets/x86/64/profiles.json
31 |
32 | # 暂停 2 秒
33 | sleep 2
34 |
35 | # 获取默认内核版本号(例如:5.10)
36 | kernel_version=$(grep "KERNEL_PATCHVER:=" target/linux/x86/Makefile | cut -d "=" -f 2 | xargs)
37 |
38 | # 获取补丁版本号,若不存在则默认为0
39 | patch_version=$( (grep "LINUX_VERSION-${kernel_version} =" include/kernel-${kernel_version} 2>/dev/null || \
40 | grep "LINUX_VERSION-${kernel_version} =" target/linux/generic/kernel-${kernel_version} 2>/dev/null) | \
41 | cut -d "." -f 3)
42 | patch_version=${patch_version:-0}
43 |
44 | echo "Kernel Version: ${kernel_version}.${patch_version}"
45 |
46 | # 文件重命名
47 | if [ -f "bin/targets/x86/64/immortalwrt-x86-64-generic-squashfs-combined.img.gz" ]; then
48 | mv bin/targets/x86/64/immortalwrt-x86-64-generic-squashfs-combined.img.gz \
49 | bin/targets/x86/64/immortalwrt_x86-64_${kernel_version}.${patch_version}_bios.img.gz
50 | else
51 | echo "Error: File immortalwrt-x86-64-generic-squashfs-combined.img.gz not found!"
52 | exit 1
53 | fi
54 |
55 | if [ -f "bin/targets/x86/64/immortalwrt-x86-64-generic-squashfs-combined-efi.img.gz" ]; then
56 | mv bin/targets/x86/64/immortalwrt-x86-64-generic-squashfs-combined-efi.img.gz \
57 | bin/targets/x86/64/immortalwrt_x86-64_${kernel_version}.${patch_version}_uefi.img.gz
58 | else
59 | echo "Error: File immortalwrt-x86-64-generic-squashfs-combined-efi.img.gz not found!"
60 | exit 1
61 | fi
62 |
63 | # 直接指定文件名
64 | openwrt_dev="immortalwrt_x86-64_${kernel_version}.${patch_version}_bios.img.gz"
65 | openwrt_dev_uefi="immortalwrt_x86-64_${kernel_version}.${patch_version}_uefi.img.gz"
66 |
67 | # 生成 MD5 校验和
68 | cd bin/targets/x86/64 || exit 1
69 |
70 | if [ -f "$openwrt_dev" ]; then
71 | md5sum "$openwrt_dev" > openwrt_bios.md5
72 | else
73 | echo "Error: File $openwrt_dev not found!"
74 | exit 1
75 | fi
76 |
77 | if [ -f "$openwrt_dev_uefi" ]; then
78 | md5sum "$openwrt_dev_uefi" > openwrt_uefi.md5
79 | else
80 | echo "Error: File $openwrt_dev_uefi not found!"
81 | exit 1
82 | fi
83 | exit 0
84 | EOF
85 |
--------------------------------------------------------------------------------
/diy_script/lede_diy/armv8/diy-part1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # Description: DIY script part 1
4 | # File name: diy-part1.sh
5 | # Lisence: MIT
6 | # By: Jejz
7 | #===============================================
8 |
9 |
10 | # Add a feed source
11 | sed -i "/helloworld/d" feeds.conf.default
12 | # sed -i '$a src-git Jejz https://github.com/Jejz168/openwrt-packages' feeds.conf.default
13 | # sed -i '$a src-git helloworld https://github.com/fw876/helloworld' feeds.conf.default
14 | # sed -i '$a src-git PWpackages https://github.com/xiaorouji/openwrt-passwall.git;packages' feeds.conf.default
15 |
--------------------------------------------------------------------------------
/diy_script/lede_diy/armv8/diy-part2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # Description: DIY script part 2
4 | # File name: diy-part2.sh
5 | # Lisence: MIT
6 | # By: Jejz
7 | #===============================================
8 |
9 | echo "========================="
10 | echo "开始 DIY2 配置……"
11 | echo "========================="
12 |
13 | # Git稀疏克隆,只克隆指定目录到本地
14 | chmod +x $GITHUB_WORKSPACE/diy_script/function.sh
15 | source $GITHUB_WORKSPACE/diy_script/function.sh
16 |
17 | # 修改默认IP
18 | sed -i 's/192.168.1.1/192.168.8.8/g' package/base-files/files/bin/config_generate
19 | sed -i 's/192.168.1.1/192.168.8.8/g' package/base-files/luci2/bin/config_generate
20 |
21 | # Autocore
22 | sed -i 's/DEPENDS:=@(.*/DEPENDS:=@(TARGET_bcm27xx||TARGET_bcm53xx||TARGET_ipq40xx||TARGET_ipq806x||TARGET_ipq807x||TARGET_mvebu||TARGET_rockchip||TARGET_armvirt) \\/g' package/lean/autocore/Makefile
23 |
24 | # 设置ttyd免帐号登录
25 | sed -i 's/\/bin\/login/\/bin\/login -f root/' feeds/packages/utils/ttyd/files/ttyd.config
26 |
27 | # 默认 shell 为 bash
28 | sed -i 's/\/bin\/ash/\/bin\/bash/g' package/base-files/files/etc/passwd
29 |
30 | # samba解除root限制
31 | # sed -i 's/invalid users = root/#&/g' feeds/packages/net/samba4/files/smb.conf.template
32 |
33 | # coremark跑分定时清除
34 | sed -i '/\* \* \* \/etc\/coremark.sh/d' feeds/packages/utils/coremark/*
35 |
36 | # 替换curl修改版(无nghttp3、ngtcp2)
37 | curl_ver=$(grep -i "PKG_VERSION:=" feeds/packages/net/curl/Makefile | awk -F'=' '{print $2}')
38 | if [ "$curl_ver" != "8.11.1" ]; then
39 | echo "当前 curl 版本是: $curl_ver,开始替换......"
40 | rm -rf feeds/packages/net/curl
41 | cp -rf $GITHUB_WORKSPACE/personal/curl feeds/packages/net/curl
42 | fi
43 |
44 | # 报错修复
45 | # rm -rf package/kernel/mac80211/patches/brcm/999-backport-to-linux-5.18.patch
46 | # sed -i 's/PKG_VERSION:=.*/PKG_VERSION:=4.8/g' tools/sed/Makefile
47 | # sed -i 's/PKG_HASH:=.*/PKG_HASH:=f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633/g' tools/sed/Makefile
48 | # sed -i 's/PKG_VERSION:=.*/PKG_VERSION:=1.7.2/g' feeds/Jejz/xray-core/Makefile
49 | # sed -i 's/PKG_HASH:=.*/PKG_HASH:=e35824e19e8acc06296ce6bfa78a14a6f3ee8f42a965f7762b7056b506457a29/g' feeds/Jejz/xray-core/Makefile
50 | # cp -f $GITHUB_WORKSPACE/personal/hysteria/* feeds/Jejz/hysteria
51 | # rm -rf feeds/packages/utils/v2dat
52 |
53 | # 添加整个源仓库(git_clone)/添加源仓库内的指定目录(clone_dir)/添加源仓库内的所有目录(clone_all)
54 | # vssr adguardhome turboacc去dns
55 | rm -rf feeds/packages/net/adguardhome
56 | clone_dir master https://github.com/xiangfeidexiaohuo/extra-ipk luci-app-adguardhome luci-app-poweroff lua-maxminddb luci-app-vssr
57 |
58 | # 修复frps
59 | clone_dir https://github.com/superzjg/luci-app-frpc_frps luci-app-frpc luci-app-frps
60 |
61 | # ddns-go 动态域名
62 | # clone_all https://github.com/sirpdboy/luci-app-ddns-go
63 |
64 | # chatgpt
65 | # git_clone https://github.com/sirpdboy/luci-app-chatgpt-web luci-app-chatgpt
66 |
67 | # lucky 大吉
68 | clone_all https://github.com/gdy666/luci-app-lucky
69 |
70 | # ddnsto
71 | clone_dir main https://github.com/linkease/nas-packages-luci luci-app-ddnsto
72 | clone_dir master https://github.com/linkease/nas-packages ddnsto
73 | ddnsto_ver=$(grep -i "PKG_VERSION:=" $destination_dir/ddnsto/Makefile | awk -F'=' '{print $2}' | tr -d ' ')
74 | if [ "$ddnsto_ver" == "3.0.4" ]; then
75 | echo "当前 ddnsto 版本是: $ddnsto_ver, 开始替换......"
76 |
77 | sed -i 's|PKG_SOURCE_URL:=.*|PKG_SOURCE_URL:=https://github.com/Jejz168/OpenWrt/raw/refs/heads/main/personal/ddnsto/|' $destination_dir/ddnsto/Makefile
78 |
79 | echo "替换完成!"
80 | fi
81 |
82 | # OpenAppFilter 应用过滤
83 | clone_all https://github.com/sbwml/OpenAppFilter
84 |
85 | # autotimeset 定时
86 | # git_clone https://github.com/sirpdboy/luci-app-autotimeset
87 |
88 | # dockerman
89 | # clone_dir https://github.com/lisaac/luci-app-dockerman luci-app-dockerman
90 |
91 | # eqos 限速
92 | # clone_dir master https://github.com/kenzok8/openwrt-packages luci-app-eqos
93 |
94 | # unblockneteasemusic
95 | # git_clone https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
96 |
97 | # filebrowser 文件浏览器
98 | clone_dir main https://github.com/Lienol/openwrt-package luci-app-filebrowser
99 |
100 | # smartdns
101 | git_clone lede https://github.com/pymumu/luci-app-smartdns luci-app-smartdns
102 | git_clone https://github.com/pymumu/openwrt-smartdns smartdns
103 |
104 | # mosdns
105 | clone_all v5-lua https://github.com/sbwml/luci-app-mosdns
106 |
107 | # alist
108 | git_clone https://github.com/sbwml/packages_lang_golang golang
109 | clone_all lua https://github.com/sbwml/luci-app-alist
110 |
111 | # ssr-plus
112 | clone_all https://github.com/fw876/helloworld
113 |
114 | # passwall
115 | clone_all https://github.com/xiaorouji/openwrt-passwall-packages
116 | clone_all https://github.com/xiaorouji/openwrt-passwall
117 |
118 | # passwall2
119 | clone_all https://github.com/xiaorouji/openwrt-passwall2
120 |
121 | # mihomo
122 | # clone_all https://github.com/morytyann/OpenWrt-mihomo
123 |
124 | # homeproxy
125 | # git_clone https://github.com/immortalwrt/homeproxy luci-app-homeproxy
126 |
127 | # nekobox
128 | # rm -rf feeds/packages/net/sing-box
129 | # clone_all nekobox https://github.com/Thaolga/openwrt-nekobox
130 |
131 | # 阿里云盘webdav
132 | clone_dir main https://github.com/messense/aliyundrive-webdav luci-app-aliyundrive-webdav aliyundrive-webdav
133 |
134 | # openclash
135 | clone_dir master https://github.com/vernesong/OpenClash luci-app-openclash
136 | # clone_dir dev https://github.com/vernesong/OpenClash luci-app-openclash
137 | # 编译 po2lmo (如果有po2lmo可跳过)
138 | pushd $destination_dir/luci-app-openclash/tools/po2lmo
139 | make && sudo make install
140 | popd
141 |
142 | # Themes 主题
143 | clone_dir openwrt-18.06 https://github.com/rosywrt/luci-theme-rosy luci-theme-rosy
144 | clone_dir master https://github.com/haiibo/openwrt-packages luci-theme-atmaterial_new luci-theme-opentomcat luci-theme-netgear
145 | clone_dir classic https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom luci-theme-infinityfreedom
146 | git_clone 18.06 https://github.com/jerrykuku/luci-theme-argon
147 | git_clone 18.06 https://github.com/jerrykuku/luci-app-argon-config
148 | git_clone https://github.com/sirpdboy/luci-theme-opentopd
149 | git_clone https://github.com/thinktip/luci-theme-neobird
150 |
151 | # 更改argon主题背景
152 | # cp -f $GITHUB_WORKSPACE/personal/bg1.jpg feeds/luci/themes/luci-theme-argon/htdocs/luci-static/argon/img/bg1.jpg
153 | # 获取当天的星期几 (0=星期日, 1=星期一,...,6=星期六)
154 | bg_file="bg$((($(date +%w) + 6) % 7 + 1)).jpg"
155 | # argon登录页面美化
156 | ARGON_IMG_FILE="feeds/luci/themes/luci-theme-argon/htdocs/luci-static/argon/img/bg1.jpg"
157 | if [ -f "$ARGON_IMG_FILE" ]; then
158 | # 替换Argon主题内建壁纸
159 | cp -f "$GITHUB_WORKSPACE/personal/$bg_file" "$ARGON_IMG_FILE"
160 |
161 | echo "$bg_file argon wallpaper has been replaced!"
162 | fi
163 | ARGON_CONFIG_FILE="feeds/luci/applications/luci-app-argon-config/root/etc/config/argon"
164 | if [ -f "$ARGON_CONFIG_FILE" ]; then
165 | # 设置Argon主题的登录页面壁纸为内建
166 | sed -i "s/option online_wallpaper 'bing'/option online_wallpaper 'none'/" $ARGON_CONFIG_FILE
167 | # 设置Argon主题的登录表单模糊度
168 | sed -i "s/option blur '[0-9]*'/option blur '0'/" $ARGON_CONFIG_FILE
169 | sed -i "s/option blur_dark '[0-9]*'/option blur_dark '0'/" $ARGON_CONFIG_FILE
170 | # 设置Argon主题颜色
171 | PRIMARY_COLORS=("#FF8C00" "#1E90FF" "#FF69B4" "#FF1493" "#FFD700" "#00CED1" "#DC143C")
172 | DARK_PRIMARY_COLORS=("#9370DB" "#8A2BE2" "#D87093" "#C71585" "#B8860B" "#4682B4" "#8B0000")
173 | WEEKDAY=$(date +%w)
174 | sed -i "s/option primary '#[0-9a-fA-F]\{6\}'/option primary '${PRIMARY_COLORS[$WEEKDAY]}'/" $ARGON_CONFIG_FILE
175 | sed -i "s/option dark_primary '#[0-9a-fA-F]\{6\}'/option dark_primary '${DARK_PRIMARY_COLORS[$WEEKDAY]}'/" $ARGON_CONFIG_FILE
176 |
177 | echo "argon theme has been customized!"
178 | fi
179 |
180 | # 主机名右上角符号❤
181 | # sed -i 's/❤/❤/g' package/lean/luci-theme-argon_armygreen/luasrc/view/themes/argon_armygreen/header.htm
182 |
183 | # 修改主题多余版本信息
184 | sed -i 's|||g' feeds/luci/themes/luci-theme-argon/luasrc/view/themes/argon/footer.htm
186 | sed -i 's///g' feeds/luci/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm
187 |
188 | # 显示增加编译时间(F大打包工具会替换)
189 | # sed -i "s/<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%>/<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> (By @Jejz build $(TZ=UTC-8 date "+%Y-%m-%d %H:%M"))/g" package/lean/autocore/files/arm/index.htm
190 |
191 | # 修改概览里时间显示为中文数字(F大打包工具会替换)
192 | # sed -i 's/os.date()/os.date("%Y年%m月%d日") .. " " .. translate(os.date("%A")) .. " " .. os.date("%X")/g' package/lean/autocore/files/arm/index.htm
193 |
194 | # 去除型号右侧肿瘤式跑分信息
195 | # sed -i "s|\ <%=luci.sys.exec(\"cat \/etc\/bench.log\") or \" \"%>||g" feeds/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
196 |
197 | # 固件更新地址(F大打包工具会替换)
198 | # sed -i '/CPU usage/a\ <%:Compile update%> | 👆查看 |
' package/lean/autocore/files/arm/index.htm
199 | # cat >>feeds/luci/modules/luci-base/po/zh-cn/base.po<<- EOF
200 |
201 | # msgid "Compile update"
202 | # msgstr "固件地址"
203 | # EOF
204 |
205 | # 晶晨宝盒
206 | clone_dir main https://github.com/ophub/luci-app-amlogic luci-app-amlogic
207 | sed -i "s|https.*/OpenWrt|https://github.com/Jejz168/OpenWrt|g" $destination_dir/luci-app-amlogic/root/etc/config/amlogic
208 | # sed -i "s|http.*/library|https://github.com/Jejz168/OpenWrt/backup/kernel|g" $destination_dir/luci-app-amlogic/root/etc/config/amlogic
209 | sed -i "s|ARMv8|ARMv8|g" $destination_dir/luci-app-amlogic/root/etc/config/amlogic
210 |
211 | # 修改makefile
212 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/include\ \.\.\/\.\.\/luci\.mk/include \$(TOPDIR)\/feeds\/luci\/luci\.mk/g' {}
213 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/include\ \.\.\/\.\.\/lang\/golang\/golang\-package\.mk/include \$(TOPDIR)\/feeds\/packages\/lang\/golang\/golang\-package\.mk/g' {}
214 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/PKG_SOURCE_URL:=\@GHREPO/PKG_SOURCE_URL:=https:\/\/github\.com/g' {}
215 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/PKG_SOURCE_URL:=\@GHCODELOAD/PKG_SOURCE_URL:=https:\/\/codeload\.github\.com/g' {}
216 |
217 | # 调整V2ray服务到VPN菜单
218 | sed -i 's/services/vpn/g' feeds/luci/applications/luci-app-v2ray-server/luasrc/controller/*.lua
219 | sed -i 's/services/vpn/g' feeds/luci/applications/luci-app-v2ray-server/luasrc/model/cbi/v2ray_server/*.lua
220 | sed -i 's/services/vpn/g' feeds/luci/applications/luci-app-v2ray-server/luasrc/view/v2ray_server/*.htm
221 |
222 | # 调整阿里云盘webdav到存储菜单
223 | sed -i 's/services/nas/g' feeds/luci/applications/luci-app-aliyundrive-webdav/luasrc/controller/*.lua
224 | sed -i 's/services/nas/g' feeds/luci/applications/luci-app-aliyundrive-webdav/luasrc/model/cbi/aliyundrive-webdav/*.lua
225 | sed -i 's/services/nas/g' feeds/luci/applications/luci-app-aliyundrive-webdav/luasrc/view/aliyundrive-webdav/*.htm
226 |
227 | # 修改插件名字
228 | # sed -i 's/"挂载 SMB 网络共享"/"挂载共享"/g' `grep "挂载 SMB 网络共享" -rl ./`
229 | # sed -i 's/"Argon 主题设置"/"Argon 设置"/g' `grep "Argon 主题设置" -rl ./`
230 | # sed -i 's/"阿里云盘 WebDAV"/"阿里云盘"/g' `grep "阿里云盘 WebDAV" -rl ./`
231 | # sed -i 's/"USB 打印服务器"/"USB 打印"/g' `grep "USB 打印服务器" -rl ./`
232 |
233 | # 转换插件语言翻译
234 | for e in $(ls -d $destination_dir/luci-*/po feeds/luci/applications/luci-*/po); do
235 | if [[ -d $e/zh-cn && ! -d $e/zh_Hans ]]; then
236 | ln -s zh-cn $e/zh_Hans 2>/dev/null
237 | elif [[ -d $e/zh_Hans && ! -d $e/zh-cn ]]; then
238 | ln -s zh_Hans $e/zh-cn 2>/dev/null
239 | fi
240 | done
241 |
242 |
243 | ./scripts/feeds update -a
244 | ./scripts/feeds install -a
245 |
246 | echo "========================="
247 | echo " DIY2 配置完成……"
248 |
--------------------------------------------------------------------------------
/diy_script/lede_diy/x86/5gMK.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # File name: 5gMK.sh
4 | # Lisence: MIT
5 | # By: Jejz
6 | #===============================================
7 |
8 | echo "加入5g模块……"
9 | echo "========================="
10 |
11 | ## 5g模块(rm500q-gl和rm500u-cn)
12 | sed -i 's/# CONFIG_PACKAGE_quectel-CM-5G is not set/CONFIG_PACKAGE_quectel-CM-5G=y/g' .config
13 | sed -i 's/# CONFIG_PACKAGE_usb-modeswitch is not set/CONFIG_PACKAGE_usb-modeswitch=y/g' .config
14 | sed -i 's/# CONFIG_PACKAGE_kmod-mii is not set/CONFIG_PACKAGE_kmod-mii=y/g' .config
15 | sed -i 's/# CONFIG_PACKAGE_kmod-usb-net is not set/CONFIG_PACKAGE_kmod-usb-net=y/g' .config
16 | sed -i 's/# CONFIG_PACKAGE_kmod-usb-wdm is not set/CONFIG_PACKAGE_kmod-usb-wdm=y/g' .config
17 | sed -i 's/# CONFIG_PACKAGE_kmod-usb-net-qmi-wwan is not set/CONFIG_PACKAGE_kmod-usb-net-qmi-wwan=y/g' .config
18 | sed -i 's/# CONFIG_PACKAGE_uqmi is not set/CONFIG_PACKAGE_uqmi=y/g' .config
19 | sed -i 's/# CONFIG_PACKAGE_kmod-usb-net-cdc-mbim is not set/CONFIG_PACKAGE_kmod-usb-net-cdc-mbim=y/g' .config
20 | sed -i 's/# CONFIG_PACKAGE_umbim is not set/CONFIG_PACKAGE_umbim=y/g' .config
21 | sed -i 's/# CONFIG_PACKAGE_kmod-usb-serial-option is not set/CONFIG_PACKAGE_kmod-usb-serial-option=y/g' .config
22 | sed -i 's/# CONFIG_PACKAGE_kmod-usb-serial is not set/CONFIG_PACKAGE_kmod-usb-serial=y/g' .config
23 | sed -i 's/# CONFIG_PACKAGE_kmod-usb-serial-wwan is not set/CONFIG_PACKAGE_kmod-usb-serial-wwan=y/g' .config
24 | sed -i 's/# CONFIG_PACKAGE_luci-proto-qmi is not set/CONFIG_PACKAGE_luci-proto-qmi=y/g' .config
25 | sed -i 's/# CONFIG_PACKAGE_kmod-usb-net-rndis is not set/CONFIG_PACKAGE_kmod-usb-net-rndis=y/g' .config
26 | sed -i '/CONFIG_PACKAGE_kmod-usb-serial=y/a\CONFIG_PACKAGE_kmod-usb-serial-wwan=y' .config
27 |
--------------------------------------------------------------------------------
/diy_script/lede_diy/x86/diy-part1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # Description: DIY script part 1
4 | # File name: diy-part1.sh
5 | # Lisence: MIT
6 | # By: Jejz
7 | #===============================================
8 |
9 | # Add a feed source
10 | sed -i "/helloworld/d" feeds.conf.default
11 | # sed -i '$a src-git Jejz https://github.com/Jejz168/openwrt-packages' feeds.conf.default
12 | # sed -i '$a src-git helloworld https://github.com/fw876/helloworld' feeds.conf.default
13 | # sed -i '$a src-git PWpackages https://github.com/xiaorouji/openwrt-passwall.git;packages' feeds.conf.default
14 |
15 |
16 |
17 | cat>rename.sh<<-\EOF
18 | #!/bin/bash
19 | # 删除无关的文件
20 | ls -l bin/targets/x86/64/
21 | rm -rf bin/targets/x86/64/config.buildinfo
22 | rm -rf bin/targets/x86/64/feeds.buildinfo
23 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic-kernel.bin
24 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.vmdk
25 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined.vmdk
26 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic-squashfs-rootfs.img.gz
27 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic.manifest
28 | rm -rf bin/targets/x86/64/sha256sums
29 | rm -rf bin/targets/x86/64/version.buildinfo
30 | rm -rf bin/targets/x86/64/profiles.json
31 |
32 | # 暂停 2 秒
33 | sleep 2
34 |
35 | # 获取默认内核版本号(例如:5.10)
36 | kernel_version=$(grep "KERNEL_PATCHVER:=" target/linux/x86/Makefile | cut -d "=" -f 2 | xargs)
37 |
38 | # 获取补丁版本号,若不存在则默认为0
39 | patch_version=$( (grep "LINUX_VERSION-${kernel_version} =" include/kernel-${kernel_version} 2>/dev/null || \
40 | grep "LINUX_VERSION-${kernel_version} =" target/linux/generic/kernel-${kernel_version} 2>/dev/null) | \
41 | cut -d "." -f 3)
42 | patch_version=${patch_version:-0}
43 |
44 | echo "Kernel Version: ${kernel_version}.${patch_version}"
45 |
46 | # 文件重命名
47 | if [ -f "bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined.img.gz" ]; then
48 | mv bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined.img.gz \
49 | bin/targets/x86/64/lede_x86-64_${kernel_version}.${patch_version}_bios.img.gz
50 | else
51 | echo "Error: File openwrt-x86-64-generic-squashfs-combined.img.gz not found!"
52 | exit 1
53 | fi
54 |
55 | if [ -f "bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img.gz" ]; then
56 | mv bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img.gz \
57 | bin/targets/x86/64/lede_x86-64_${kernel_version}.${patch_version}_uefi.img.gz
58 | else
59 | echo "Error: File openwrt-x86-64-generic-squashfs-combined-efi.img.gz not found!"
60 | exit 1
61 | fi
62 |
63 | # 直接指定文件名
64 | openwrt_dev="lede_x86-64_${kernel_version}.${patch_version}_bios.img.gz"
65 | openwrt_dev_uefi="lede_x86-64_${kernel_version}.${patch_version}_uefi.img.gz"
66 |
67 | # 生成 MD5 校验和
68 | cd bin/targets/x86/64 || exit 1
69 |
70 | if [ -f "$openwrt_dev" ]; then
71 | md5sum "$openwrt_dev" > openwrt_bios.md5
72 | else
73 | echo "Error: File $openwrt_dev not found!"
74 | exit 1
75 | fi
76 |
77 | if [ -f "$openwrt_dev_uefi" ]; then
78 | md5sum "$openwrt_dev_uefi" > openwrt_uefi.md5
79 | else
80 | echo "Error: File $openwrt_dev_uefi not found!"
81 | exit 1
82 | fi
83 | exit 0
84 | EOF
85 |
--------------------------------------------------------------------------------
/diy_script/lede_diy/x86/diy-part2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # Description: DIY script part 2
4 | # File name: diy-part2.sh
5 | # Lisence: MIT
6 | # By: Jejz
7 | #===============================================
8 |
9 | echo "开始 DIY2 配置……"
10 | echo "========================="
11 |
12 | # Git稀疏克隆,只克隆指定目录到本地
13 | chmod +x $GITHUB_WORKSPACE/diy_script/function.sh
14 | source $GITHUB_WORKSPACE/diy_script/function.sh
15 |
16 | # 修改主机名字,修改你喜欢的就行(不能纯数字或者使用中文)
17 | # sed -i "/uci commit system/i\uci set system.@system[0].hostname='Jejz'" package/lean/default-settings/files/zzz-default-settings
18 | # sed -i "s/hostname='.*'/hostname='Jejz'/g" ./package/base-files/files/bin/config_generate
19 |
20 | # 修改默认IP
21 | sed -i 's/192.168.1.1/192.168.8.3/g' package/base-files/files/bin/config_generate
22 | sed -i 's/192.168.1.1/192.168.8.3/g' package/base-files/luci2/bin/config_generate
23 |
24 | # 设置密码为空(安装固件时无需密码登陆,然后自己修改想要的密码)
25 | sed -i '/$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF./d' package/lean/default-settings/files/zzz-default-settings
26 |
27 | # 调整 x86 型号只显示 CPU 型号
28 | sed -i 's/${g}.*/${a}${b}${c}${d}${e}${f}${hydrid}/g' package/lean/autocore/files/x86/autocore
29 |
30 | # 修改版本号
31 | # sed -i "s|DISTRIB_REVISION='.*'|DISTRIB_REVISION='R$(date +%y.%m.%d)'|g" package/lean/default-settings/files/zzz-default-settings
32 |
33 | # 设置ttyd免帐号登录
34 | sed -i 's/\/bin\/login/\/bin\/login -f root/' feeds/packages/utils/ttyd/files/ttyd.config
35 |
36 | # 默认 shell 为 bash
37 | sed -i 's/\/bin\/ash/\/bin\/bash/g' package/base-files/files/etc/passwd
38 |
39 | # samba解除root限制
40 | # sed -i 's/invalid users = root/#&/g' feeds/packages/net/samba4/files/smb.conf.template
41 |
42 | # coremark跑分定时清除
43 | sed -i '/\* \* \* \/etc\/coremark.sh/d' feeds/packages/utils/coremark/*
44 |
45 | # 修改 argon 为默认主题
46 | sed -i '/set luci.main.mediaurlbase=\/luci-static\/bootstrap/d' feeds/luci/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap
47 | sed -i 's/Bootstrap theme/Argon theme/g' feeds/luci/collections/*/Makefile
48 | sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/*/Makefile
49 |
50 | ##切换为samba4
51 | # sed -i 's/luci-app-samba/luci-app-samba4/g' package/lean/autosamba/Makefile
52 |
53 | # 替换curl修改版(无nghttp3、ngtcp2)
54 | curl_ver=$(grep -i "PKG_VERSION:=" feeds/packages/net/curl/Makefile | awk -F'=' '{print $2}')
55 | if [ "$curl_ver" != "8.12.0" ]; then
56 | echo "当前 curl 版本是: $curl_ver,开始替换......"
57 | rm -rf feeds/packages/net/curl
58 | cp -rf $GITHUB_WORKSPACE/personal/curl feeds/packages/net/curl
59 | echo "替换完成!"
60 | fi
61 |
62 | # 报错修复
63 | # sed -i 's/9625784cf2e4fd9842f1d407681ce4878b5b0dcddbcd31c6135114a30c71e6a8/5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72/g' feeds/packages/utils/jq/Makefile
64 | # sed -i 's/PKG_VERSION:=.*/PKG_VERSION:=1.7.2/g' feeds/Jejz/xray-core/Makefile
65 | # sed -i 's/PKG_HASH:=.*/PKG_HASH:=e35824e19e8acc06296ce6bfa78a14a6f3ee8f42a965f7762b7056b506457a29/g' feeds/Jejz/xray-core/Makefile
66 | # cp -f $GITHUB_WORKSPACE/personal/hysteria/* feeds/Jejz/hysteria
67 | # cp -f $GITHUB_WORKSPACE/personal/chinadns-ng/* feeds/Jejz/chinadns-ng
68 | # rm -rf feeds/packages/utils/v2dat
69 |
70 | # 添加整个源仓库(git_clone)/添加源仓库内的指定目录(clone_dir)/添加源仓库内的所有目录(clone_all)
71 | # vssr adguardhome turboacc去dns
72 | rm -rf feeds/packages/net/adguardhome
73 | clone_dir master https://github.com/xiangfeidexiaohuo/extra-ipk luci-app-adguardhome luci-app-poweroff lua-maxminddb luci-app-vssr
74 |
75 | # 修复frps
76 | clone_dir https://github.com/superzjg/luci-app-frpc_frps luci-app-frpc luci-app-frps
77 |
78 | # 修复adguardhome重定向端口识别
79 | # cp -f $GITHUB_WORKSPACE/personal/AdGuardHome/base.lua $destination_dir/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua
80 |
81 | # ddns-go 动态域名
82 | # clone_all https://github.com/sirpdboy/luci-app-ddns-go
83 |
84 | # chatgpt
85 | # git_clone https://github.com/sirpdboy/luci-app-chatgpt-web luci-app-chatgpt
86 |
87 | # lucky 大吉
88 | clone_all https://github.com/gdy666/luci-app-lucky
89 |
90 | # ddnsto
91 | clone_dir main https://github.com/linkease/nas-packages-luci luci-app-ddnsto
92 | clone_dir master https://github.com/linkease/nas-packages ddnsto
93 | ddnsto_ver=$(grep -i "PKG_VERSION:=" $destination_dir/ddnsto/Makefile | awk -F'=' '{print $2}' | tr -d ' ')
94 | if [ "$ddnsto_ver" == "3.0.4" ]; then
95 | echo "当前 ddnsto 版本是: $ddnsto_ver, 开始替换......"
96 |
97 | sed -i 's|PKG_SOURCE_URL:=.*|PKG_SOURCE_URL:=https://github.com/Jejz168/OpenWrt/raw/refs/heads/main/personal/ddnsto/|' $destination_dir/ddnsto/Makefile
98 |
99 | echo "替换完成!"
100 | fi
101 |
102 | # OpenAppFilter 应用过滤
103 | clone_all https://github.com/sbwml/OpenAppFilter
104 |
105 | # autotimeset 定时
106 | # git_clone https://github.com/sirpdboy/luci-app-autotimeset
107 |
108 | # dockerman
109 | # clone_dir https://github.com/lisaac/luci-app-dockerman luci-app-dockerman
110 |
111 | # eqos 限速
112 | # clone_dir master https://github.com/kenzok8/openwrt-packages luci-app-eqos
113 |
114 | # unblockneteasemusic
115 | # git_clone https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
116 |
117 | # filebrowser 文件浏览器
118 | clone_dir main https://github.com/Lienol/openwrt-package luci-app-filebrowser
119 |
120 | # smartdns
121 | git_clone lede https://github.com/pymumu/luci-app-smartdns luci-app-smartdns
122 | git_clone https://github.com/pymumu/openwrt-smartdns smartdns
123 |
124 | # mosdns
125 | clone_all v5-lua https://github.com/sbwml/luci-app-mosdns
126 |
127 | # alist
128 | git_clone https://github.com/sbwml/packages_lang_golang golang
129 | clone_all lua https://github.com/sbwml/luci-app-alist
130 |
131 | # ssr-plus
132 | clone_all https://github.com/fw876/helloworld
133 |
134 | # passwall
135 | clone_all https://github.com/xiaorouji/openwrt-passwall-packages
136 | clone_all https://github.com/xiaorouji/openwrt-passwall
137 |
138 | # passwall2
139 | # clone_all https://github.com/xiaorouji/openwrt-passwall2
140 |
141 | # mihomo
142 | # clone_all https://github.com/morytyann/OpenWrt-mihomo
143 |
144 | # homeproxy
145 | # git_clone https://github.com/immortalwrt/homeproxy luci-app-homeproxy
146 |
147 | # nekobox
148 | # rm -rf feeds/packages/net/sing-box
149 | # clone_all nekobox https://github.com/Thaolga/openwrt-nekobox
150 |
151 | # openclash
152 | clone_dir master https://github.com/vernesong/OpenClash luci-app-openclash
153 | # clone_dir dev https://github.com/vernesong/OpenClash luci-app-openclash
154 | # 编译 po2lmo (如果有po2lmo可跳过)
155 | pushd $destination_dir/luci-app-openclash/tools/po2lmo
156 | make && sudo make install
157 | popd
158 |
159 | # argon 主题
160 | git_clone 18.06 https://github.com/jerrykuku/luci-theme-argon
161 | git_clone 18.06 https://github.com/jerrykuku/luci-app-argon-config
162 |
163 | # 更改argon主题背景
164 | # cp -f $GITHUB_WORKSPACE/personal/bg1.jpg feeds/luci/themes/luci-theme-argon/htdocs/luci-static/argon/img/bg1.jpg
165 | # 获取当天的星期几 (0=星期日, 1=星期一,...,6=星期六)
166 | bg_file="bg$((($(date +%w) + 6) % 7 + 1)).jpg"
167 | # argon登录页面美化
168 | ARGON_IMG_FILE="feeds/luci/themes/luci-theme-argon/htdocs/luci-static/argon/img/bg1.jpg"
169 | if [ -f "$ARGON_IMG_FILE" ]; then
170 | # 替换Argon主题内建壁纸
171 | cp -f "$GITHUB_WORKSPACE/personal/$bg_file" "$ARGON_IMG_FILE"
172 |
173 | echo "$bg_file argon wallpaper has been replaced!"
174 | fi
175 | ARGON_CONFIG_FILE="feeds/luci/applications/luci-app-argon-config/root/etc/config/argon"
176 | if [ -f "$ARGON_CONFIG_FILE" ]; then
177 | # 设置Argon主题的登录页面壁纸为内建
178 | sed -i "s/option online_wallpaper 'bing'/option online_wallpaper 'none'/" $ARGON_CONFIG_FILE
179 | # 设置Argon主题的登录表单模糊度
180 | sed -i "s/option blur '[0-9]*'/option blur '0'/" $ARGON_CONFIG_FILE
181 | sed -i "s/option blur_dark '[0-9]*'/option blur_dark '0'/" $ARGON_CONFIG_FILE
182 | # 设置Argon主题颜色
183 | PRIMARY_COLORS=("#FF8C00" "#1E90FF" "#FF69B4" "#FF1493" "#FFD700" "#00CED1" "#DC143C")
184 | DARK_PRIMARY_COLORS=("#9370DB" "#8A2BE2" "#D87093" "#C71585" "#B8860B" "#4682B4" "#8B0000")
185 | WEEKDAY=$(date +%w)
186 | sed -i "s/option primary '#[0-9a-fA-F]\{6\}'/option primary '${PRIMARY_COLORS[$WEEKDAY]}'/" $ARGON_CONFIG_FILE
187 | sed -i "s/option dark_primary '#[0-9a-fA-F]\{6\}'/option dark_primary '${DARK_PRIMARY_COLORS[$WEEKDAY]}'/" $ARGON_CONFIG_FILE
188 |
189 | echo "argon theme has been customized!"
190 | fi
191 |
192 | # 主机名右上角符号❤
193 | # sed -i 's/❤/❤/g' package/lean/luci-theme-argon_armygreen/luasrc/view/themes/argon_armygreen/header.htm
194 |
195 | # 修改主题多余版本信息
196 | sed -i 's|||g' feeds/luci/themes/luci-theme-argon/luasrc/view/themes/argon/footer.htm
198 | sed -i 's///g' feeds/luci/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm
199 |
200 | # 显示增加编译时间
201 | sed -i "s/<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%>/<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> (By @Jejz build $(TZ=UTC-8 date "+%Y-%m-%d %H:%M"))/g" package/lean/autocore/files/x86/index.htm
202 |
203 | # 修改概览里时间显示为中文数字
204 | sed -i 's/os.date()/os.date("%Y年%m月%d日") .. " " .. translate(os.date("%A")) .. " " .. os.date("%X")/g' package/lean/autocore/files/x86/index.htm
205 |
206 | # 修改欢迎banner
207 | # cp -f $GITHUB_WORKSPACE/personal/banner package/base-files/files/etc/banner
208 | # wget -O ./package/base-files/files/etc/banner https://raw.githubusercontent.com/Jejz168/OpenWrt/main/personal/banner
209 | sed -i "/\\ DE \//s/$/ [31mBy @Jejz build $(TZ=UTC-8 date '+%Y.%m.%d')[0m/" package/base-files/files/etc/banner
210 | cat package/base-files/files/etc/banner
211 |
212 | # 固件更新地址
213 | sed -i '/CPU usage/a\ <%:Compile update%> | 👆查看 |
' package/lean/autocore/files/x86/index.htm
214 | cat >>feeds/luci/modules/luci-base/po/zh-cn/base.po<<- EOF
215 |
216 | msgid "Compile update"
217 | msgstr "固件地址"
218 | EOF
219 |
220 | # 修改makefile
221 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/include\ \.\.\/\.\.\/luci\.mk/include \$(TOPDIR)\/feeds\/luci\/luci\.mk/g' {}
222 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/include\ \.\.\/\.\.\/lang\/golang\/golang\-package\.mk/include \$(TOPDIR)\/feeds\/packages\/lang\/golang\/golang\-package\.mk/g' {}
223 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/PKG_SOURCE_URL:=\@GHREPO/PKG_SOURCE_URL:=https:\/\/github\.com/g' {}
224 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/PKG_SOURCE_URL:=\@GHCODELOAD/PKG_SOURCE_URL:=https:\/\/codeload\.github\.com/g' {}
225 |
226 | # 调整V2ray服务到VPN菜单
227 | sed -i 's/services/vpn/g' feeds/luci/applications/luci-app-v2ray-server/luasrc/controller/*.lua
228 | sed -i 's/services/vpn/g' feeds/luci/applications/luci-app-v2ray-server/luasrc/model/cbi/v2ray_server/*.lua
229 | sed -i 's/services/vpn/g' feeds/luci/applications/luci-app-v2ray-server/luasrc/view/v2ray_server/*.htm
230 |
231 | # 修改插件名字
232 | # sed -i 's/"挂载 SMB 网络共享"/"挂载共享"/g' `grep "挂载 SMB 网络共享" -rl ./`
233 | # sed -i 's/"Argon 主题设置"/"Argon 设置"/g' `grep "Argon 主题设置" -rl ./`
234 | # sed -i 's/"阿里云盘 WebDAV"/"阿里云盘"/g' `grep "阿里云盘 WebDAV" -rl ./`
235 | # sed -i 's/"USB 打印服务器"/"USB 打印"/g' `grep "USB 打印服务器" -rl ./`
236 | # sed -i 's/"网络存储"/"存储"/g' `grep "网络存储" -rl ./`
237 | # sed -i 's/"Turbo ACC 网络加速"/"网络加速"/g' `grep "Turbo ACC 网络加速" -rl ./`
238 | # sed -i 's/"实时流量监测"/"流量"/g' `grep "实时流量监测" -rl ./`
239 | # sed -i 's/"KMS 服务器"/"KMS激活"/g' `grep "KMS 服务器" -rl ./`
240 | # sed -i 's/"TTYD 终端"/"命令窗"/g' `grep "TTYD 终端" -rl ./`
241 | # sed -i 's/"USB 打印服务器"/"打印服务"/g' `grep "USB 打印服务器" -rl ./`
242 |
243 | # 转换插件语言翻译
244 | for e in $(ls -d $destination_dir/luci-*/po feeds/luci/applications/luci-*/po); do
245 | if [[ -d $e/zh-cn && ! -d $e/zh_Hans ]]; then
246 | ln -s zh-cn $e/zh_Hans 2>/dev/null
247 | elif [[ -d $e/zh_Hans && ! -d $e/zh-cn ]]; then
248 | ln -s zh_Hans $e/zh-cn 2>/dev/null
249 | fi
250 | done
251 |
252 | ./scripts/feeds update -a
253 | ./scripts/feeds install -a
254 |
255 | echo "========================="
256 | echo " DIY2 配置完成……"
257 |
--------------------------------------------------------------------------------
/diy_script/lede_diy/x86/diy2305-part2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # Description: DIY script part 2
4 | # File name: diy-part2.sh
5 | # Lisence: MIT
6 | # By: Jejz
7 | #===============================================
8 |
9 | echo "开始 DIY2 配置……"
10 | echo "========================="
11 |
12 | # Git稀疏克隆,只克隆指定目录到本地
13 | chmod +x $GITHUB_WORKSPACE/diy_script/function.sh
14 | source $GITHUB_WORKSPACE/diy_script/function.sh
15 |
16 | # 修改主机名字,修改你喜欢的就行(不能纯数字或者使用中文)
17 | # sed -i "/uci commit system/i\uci set system.@system[0].hostname='Jejz'" package/lean/default-settings/files/zzz-default-settings
18 | # sed -i "s/hostname='.*'/hostname='Jejz'/g" ./package/base-files/files/bin/config_generate
19 |
20 | # 修改默认IP
21 | sed -i 's/192.168.1.1/192.168.8.3/g' package/base-files/files/bin/config_generate
22 | sed -i 's/192.168.1.1/192.168.8.3/g' package/base-files/luci2/bin/config_generate
23 |
24 | # 设置密码为空(安装固件时无需密码登陆,然后自己修改想要的密码)
25 | sed -i '/$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF./d' package/lean/default-settings/files/zzz-default-settings
26 |
27 | # 调整 x86 型号只显示 CPU 型号
28 | sed -i 's/${g}.*/${a}${b}${c}${d}${e}${f}${hydrid}/g' package/lean/autocore/files/x86/autocore
29 |
30 | # 修改版本号
31 | # sed -i "s|DISTRIB_REVISION='.*'|DISTRIB_REVISION='R$(date +%y.%m.%d)'|g" package/lean/default-settings/files/zzz-default-settings
32 |
33 | # 设置ttyd免帐号登录
34 | sed -i 's/\/bin\/login/\/bin\/login -f root/' feeds/packages/utils/ttyd/files/ttyd.config
35 |
36 | # 默认 shell 为 bash
37 | sed -i 's/\/bin\/ash/\/bin\/bash/g' package/base-files/files/etc/passwd
38 |
39 | # samba解除root限制
40 | # sed -i 's/invalid users = root/#&/g' feeds/packages/net/samba4/files/smb.conf.template
41 |
42 | # coremark跑分定时清除
43 | sed -i '/\* \* \* \/etc\/coremark.sh/d' feeds/packages/utils/coremark/*
44 |
45 | # 修改 argon 为默认主题
46 | sed -i '/set luci.main.mediaurlbase=\/luci-static\/bootstrap/d' feeds/luci/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap
47 | sed -i 's/Bootstrap theme/Argon theme/g' feeds/luci/collections/*/Makefile
48 | sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/*/Makefile
49 |
50 | # 最大连接数修改为65535
51 | sed -i '$a net.netfilter.nf_conntrack_max=65535' package/base-files/files/etc/sysctl.conf
52 |
53 | #nlbwmon 修复log警报
54 | sed -i '$a net.core.wmem_max=16777216' package/base-files/files/etc/sysctl.conf
55 | sed -i '$a net.core.rmem_max=16777216' package/base-files/files/etc/sysctl.conf
56 |
57 | # 替换curl修改版(无nghttp3、ngtcp2)
58 | curl_ver=$(grep -i "PKG_VERSION:=" feeds/packages/net/curl/Makefile | awk -F'=' '{print $2}')
59 | if [ "$curl_ver" != "8.12.0" ]; then
60 | echo "当前 curl 版本是: $curl_ver,开始替换......"
61 | rm -rf feeds/packages/net/curl
62 | cp -rf $GITHUB_WORKSPACE/personal/curl feeds/packages/net/curl
63 | fi
64 |
65 | # 报错修复
66 | # sed -i 's/9625784cf2e4fd9842f1d407681ce4878b5b0dcddbcd31c6135114a30c71e6a8/5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72/g' feeds/packages/utils/jq/Makefile
67 | # sed -i 's/PKG_VERSION:=.*/PKG_VERSION:=1.7.2/g' feeds/Jejz/xray-core/Makefile
68 | # sed -i 's/PKG_HASH:=.*/PKG_HASH:=e35824e19e8acc06296ce6bfa78a14a6f3ee8f42a965f7762b7056b506457a29/g' feeds/Jejz/xray-core/Makefile
69 | # cp -f $GITHUB_WORKSPACE/personal/hysteria/* feeds/Jejz/hysteria
70 | # cp -f $GITHUB_WORKSPACE/personal/chinadns-ng/* feeds/Jejz/chinadns-ng
71 | # rm -rf feeds/packages/utils/v2dat
72 |
73 | # 添加整个源仓库(git_clone)/添加源仓库内的指定目录(clone_dir)/添加源仓库内的所有目录(clone_all)
74 | # filebrowser luci-app-pushbot
75 | rm -rf feeds/packages/net/adguardhome
76 | clone_dir main https://github.com/xiangfeidexiaohuo/2305-ipk luci-app-adguardhome luci-app-pushbot luci-app-poweroff
77 |
78 | # 替换immortalwrt插件
79 | clone_dir master https://github.com/immortalwrt/luci luci-app-syncdial luci-app-eqos luci-app-nps luci-app-frpc luci-app-frps luci-app-hd-idle luci-app-socat luci-app-n2n luci-app-softethervpn
80 |
81 | # 补全依赖
82 | clone_dir master https://github.com/immortalwrt/packages nps n2n socat
83 |
84 | # ddns-go 动态域名
85 | # clone_all https://github.com/sirpdboy/luci-app-ddns-go
86 |
87 | # chatgpt
88 | # git_clone https://github.com/sirpdboy/luci-app-chatgpt-web luci-app-chatgpt
89 |
90 | # lucky 大吉
91 | clone_all https://github.com/gdy666/luci-app-lucky
92 |
93 | # ddnsto
94 | clone_dir main https://github.com/linkease/nas-packages-luci luci-app-ddnsto
95 | clone_dir master https://github.com/linkease/nas-packages ddnsto
96 | ddnsto_ver=$(grep -i "PKG_VERSION:=" $destination_dir/ddnsto/Makefile | awk -F'=' '{print $2}' | tr -d ' ')
97 | if [ "$ddnsto_ver" == "3.0.4" ]; then
98 | echo "当前 ddnsto 版本是: $ddnsto_ver, 开始替换......"
99 |
100 | sed -i 's|PKG_SOURCE_URL:=.*|PKG_SOURCE_URL:=https://github.com/Jejz168/OpenWrt/raw/refs/heads/main/personal/ddnsto/|' $destination_dir/ddnsto/Makefile
101 |
102 | echo "替换完成!"
103 | fi
104 |
105 | # OpenAppFilter 应用过滤
106 | clone_all https://github.com/sbwml/OpenAppFilter
107 |
108 | # autotimeset 定时
109 | # git_clone https://github.com/sirpdboy/luci-app-autotimeset
110 |
111 | # dockerman
112 | # clone_dir https://github.com/lisaac/luci-app-dockerman luci-app-dockerman
113 |
114 | # unblockneteasemusic
115 | # git_clone https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
116 |
117 | # smartdns
118 | git_clone https://github.com/pymumu/luci-app-smartdns luci-app-smartdns
119 | git_clone https://github.com/pymumu/openwrt-smartdns smartdns
120 |
121 | # mosdns
122 | clone_all v5 https://github.com/sbwml/luci-app-mosdns
123 |
124 | # alist
125 | git_clone https://github.com/sbwml/packages_lang_golang golang
126 | clone_all https://github.com/sbwml/luci-app-alist
127 |
128 | # ssr-plus
129 | clone_all https://github.com/fw876/helloworld
130 |
131 | # passwall
132 | clone_all https://github.com/xiaorouji/openwrt-passwall-packages
133 | clone_all https://github.com/xiaorouji/openwrt-passwall
134 |
135 | # passwall2
136 | # clone_all https://github.com/xiaorouji/openwrt-passwall2
137 |
138 | # Nikki
139 | clone_all https://github.com/nikkinikki-org/OpenWrt-nikki
140 |
141 | # homeproxy
142 | git_clone https://github.com/immortalwrt/homeproxy luci-app-homeproxy
143 |
144 | # luci-app-filemanager
145 | git_clone https://github.com/sbwml/luci-app-filemanager luci-app-filemanager
146 |
147 | # openclash
148 | clone_dir master https://github.com/vernesong/OpenClash luci-app-openclash
149 | # clone_dir dev https://github.com/vernesong/OpenClash luci-app-openclash
150 | # 编译 po2lmo (如果有po2lmo可跳过)
151 | pushd feeds/luci/applications/luci-app-openclash/tools/po2lmo
152 | make && sudo make install
153 | popd
154 |
155 | # argon 主题
156 | git_clone https://github.com/jerrykuku/luci-theme-argon
157 | git_clone https://github.com/jerrykuku/luci-app-argon-config
158 | # clone_all https://github.com/sbwml/luci-theme-argon
159 |
160 | # 更改argon主题背景
161 | # cp -f $GITHUB_WORKSPACE/personal/bg1.jpg feeds/luci/themes/luci-theme-argon/htdocs/luci-static/argon/img/bg1.jpg
162 | # 获取当天的星期几 (0=星期日, 1=星期一,...,6=星期六)
163 | bg_file="bg$((($(date +%w) + 6) % 7 + 1)).jpg"
164 | # argon登录页面美化
165 | ARGON_IMG_FILE="feeds/luci/themes/luci-theme-argon/htdocs/luci-static/argon/img/bg1.jpg"
166 | if [ -f "$ARGON_IMG_FILE" ]; then
167 | # 替换Argon主题内建壁纸
168 | cp -f "$GITHUB_WORKSPACE/personal/$bg_file" "$ARGON_IMG_FILE"
169 |
170 | echo "$bg_file argon wallpaper has been replaced!"
171 | fi
172 | ARGON_CONFIG_FILE="feeds/luci/applications/luci-app-argon-config/root/etc/config/argon"
173 | if [ -f "$ARGON_CONFIG_FILE" ]; then
174 | # 设置Argon主题的登录页面壁纸为内建
175 | sed -i "s/option online_wallpaper 'bing'/option online_wallpaper 'none'/" $ARGON_CONFIG_FILE
176 | # 设置Argon主题的登录表单模糊度
177 | sed -i "s/option blur '[0-9]*'/option blur '0'/" $ARGON_CONFIG_FILE
178 | sed -i "s/option blur_dark '[0-9]*'/option blur_dark '0'/" $ARGON_CONFIG_FILE
179 | # 设置Argon主题颜色
180 | PRIMARY_COLORS=("#FF8C00" "#1E90FF" "#FF69B4" "#FF1493" "#FFD700" "#00CED1" "#DC143C")
181 | DARK_PRIMARY_COLORS=("#9370DB" "#8A2BE2" "#D87093" "#C71585" "#B8860B" "#4682B4" "#8B0000")
182 | WEEKDAY=$(date +%w)
183 | sed -i "s/option primary '#[0-9a-fA-F]\{6\}'/option primary '${PRIMARY_COLORS[$WEEKDAY]}'/" $ARGON_CONFIG_FILE
184 | sed -i "s/option dark_primary '#[0-9a-fA-F]\{6\}'/option dark_primary '${DARK_PRIMARY_COLORS[$WEEKDAY]}'/" $ARGON_CONFIG_FILE
185 |
186 | echo "argon theme has been customized!"
187 | fi
188 |
189 | # 修改主题多余版本信息
190 | sed -i 's|||g' feeds/luci/themes/luci-theme-argon/luasrc/view/themes/argon/footer.htm
193 | sed -i 's|||g' feeds/luci/themes/luci-theme-argon/luasrc/view/themes/argon/footer_login.htm
194 |
195 | # 显示增加编译时间
196 | pushd package/lean/default-settings/files
197 | export orig_version=$(cat "zzz-default-settings" | grep DISTRIB_REVISION= | awk -F "'" '{print $2}')
198 | export date_version="By @Jejz build $(TZ=UTC-8 date '+%Y-%m-%d %H:%M')"
199 | sed -i "s/${orig_version}/${orig_version} (${date_version})/g" zzz-default-settings
200 | popd
201 | echo -e "\e[41m当前写入的编译时间:\e[0m \e[33m$(grep 'DISTRIB_REVISION=' package/lean/default-settings/files/zzz-default-settings)\e[0m"
202 |
203 | # 修改欢迎banner
204 | # cp -f $GITHUB_WORKSPACE/personal/banner package/base-files/files/etc/banner
205 | # wget -O ./package/base-files/files/etc/banner https://raw.githubusercontent.com/Jejz168/OpenWrt/main/personal/banner
206 | sed -i "/\\ DE \//s/$/ [31mBy @Jejz build $(TZ=UTC-8 date '+%Y.%m.%d')[0m/" package/base-files/files/etc/banner
207 | cat package/base-files/files/etc/banner
208 |
209 | # 修改makefile
210 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/include\ \.\.\/\.\.\/luci\.mk/include \$(TOPDIR)\/feeds\/luci\/luci\.mk/g' {}
211 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/include\ \.\.\/\.\.\/lang\/golang\/golang\-package\.mk/include \$(TOPDIR)\/feeds\/packages\/lang\/golang\/golang\-package\.mk/g' {}
212 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/PKG_SOURCE_URL:=\@GHREPO/PKG_SOURCE_URL:=https:\/\/github\.com/g' {}
213 | find package/*/ -maxdepth 2 -path "*/Makefile" | xargs -i sed -i 's/PKG_SOURCE_URL:=\@GHCODELOAD/PKG_SOURCE_URL:=https:\/\/codeload\.github\.com/g' {}
214 |
215 | # 设置 nlbwmon 独立菜单
216 | sed -i 's/524288/16777216/g' feeds/packages/net/nlbwmon/files/nlbwmon.config
217 | sed -i 's/option commit_interval.*/option commit_interval 24h/g' feeds/packages/net/nlbwmon/files/nlbwmon.config
218 | sed -i 's/services\/nlbw/nlbw/g; /path/s/admin\///g' feeds/luci/applications/luci-app-nlbwmon/root/usr/share/luci/menu.d/luci-app-nlbwmon.json
219 | sed -i 's/services\///g' feeds/luci/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/config.js
220 |
221 | # 调整位置
222 | #sed -i 's/services/nas/g' feeds/luci/applications/luci-app-p910nd/root/usr/share/luci/menu.d/luci-app-p910nd.json
223 | #sed -i 's/services/nas/g' feeds/luci/applications/luci-app-aria2/root/usr/share/luci/menu.d/luci-app-aria2.json
224 | #sed -i 's/services/nas/g' feeds/luci/applications/luci-app-filebrowser/root/usr/share/luci/menu.d/luci-app-filebrowser.json
225 | #sed -i 's/services/nas/g' feeds/luci/applications/luci-app-ksmbd/root/usr/share/luci/menu.d/luci-app-ksmbd.json
226 | #sed -i 's/services/system/g' feeds/luci/applications/luci-app-ttyd/root/usr/share/luci/menu.d/luci-app-ttyd.json
227 | #sed -i 's/services/network/g' $destination_dir/luci-app-eqos/root/usr/share/luci/menu.d/luci-app-eqos.json
228 | primary_dir="feeds/luci/applications"
229 | fallback_dir="$destination_dir"
230 | apps=(
231 | "luci-app-p910nd:services/nas"
232 | "luci-app-aria2:services/nas"
233 | "luci-app-filebrowser:services/nas"
234 | "luci-app-ksmbd:services/nas"
235 | "luci-app-ttyd:services/system"
236 | "luci-app-eqos:services/network"
237 | )
238 | # 遍历模块和替换规则
239 | for app_rule in "${apps[@]}"; do
240 | app=${app_rule%%:*} # 提取模块名
241 | rule=${app_rule#*:} # 提取替换规则
242 | src=${rule%/*} # 提取替换前的内容
243 | dst=${rule#*/} # 提取替换后的内容
244 |
245 | # 查找路径并执行替换
246 | if [ -d "$primary_dir/$app" ]; then
247 | sed -i "s/$src/$dst/g" "$primary_dir/$app/root/usr/share/luci/menu.d/$app.json"
248 | echo "Processed $app in $primary_dir."
249 | elif [ -d "$fallback_dir/$app" ]; then
250 | sed -i "s/$src/$dst/g" "$fallback_dir/$app/root/usr/share/luci/menu.d/$app.json"
251 | echo "Processed $app in $fallback_dir."
252 | else
253 | echo "Error: $app not found in either $primary_dir or $fallback_dir."
254 | fi
255 | done
256 |
257 | # 更改 ttyd 顺序和名称
258 | sed -i '3a \ "order": 10,' feeds/luci/applications/luci-app-ttyd/root/usr/share/luci/menu.d/luci-app-ttyd.json
259 | sed -i 's,终端,TTYD 终端,g' feeds/luci/applications/luci-app-ttyd/po/zh_Hans/ttyd.po
260 |
261 | # 重命名
262 | sed -i 's,frp 服务器,Frp 服务器,g' feeds/luci/applications/luci-app-frps/po/zh_Hans/frps.po
263 | sed -i 's,frp 客户端,Frp 客户端,g' feeds/luci/applications/luci-app-frpc/po/zh_Hans/frpc.po
264 |
265 | # 修改插件名字
266 | # sed -i 's/"挂载 SMB 网络共享"/"挂载共享"/g' `grep "挂载 SMB 网络共享" -rl ./`
267 | # sed -i 's/"Argon 主题设置"/"Argon 设置"/g' `grep "Argon 主题设置" -rl ./`
268 | # sed -i 's/"阿里云盘 WebDAV"/"阿里云盘"/g' `grep "阿里云盘 WebDAV" -rl ./`
269 | # sed -i 's/"USB 打印服务器"/"USB 打印"/g' `grep "USB 打印服务器" -rl ./`
270 | # sed -i 's/"网络存储"/"存储"/g' `grep "网络存储" -rl ./`
271 | # sed -i 's/"Turbo ACC 网络加速"/"网络加速"/g' `grep "Turbo ACC 网络加速" -rl ./`
272 | # sed -i 's/"实时流量监测"/"流量"/g' `grep "实时流量监测" -rl ./`
273 | # sed -i 's/"KMS 服务器"/"KMS激活"/g' `grep "KMS 服务器" -rl ./`
274 | # sed -i 's/"TTYD 终端"/"命令窗"/g' `grep "TTYD 终端" -rl ./`
275 | # sed -i 's/"USB 打印服务器"/"打印服务"/g' `grep "USB 打印服务器" -rl ./`
276 |
277 | # 转换插件语言翻译
278 | for e in $(ls -d $destination_dir/luci-*/po feeds/luci/applications/luci-*/po); do
279 | if [[ -d $e/zh-cn && ! -d $e/zh_Hans ]]; then
280 | ln -s zh-cn $e/zh_Hans 2>/dev/null
281 | elif [[ -d $e/zh_Hans && ! -d $e/zh-cn ]]; then
282 | ln -s zh_Hans $e/zh-cn 2>/dev/null
283 | fi
284 | done
285 |
286 | ./scripts/feeds update -a
287 | ./scripts/feeds install -a
288 |
289 | echo "========================="
290 | echo " DIY2 配置完成……"
291 |
--------------------------------------------------------------------------------
/diy_script/lede_diy/x86/docker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # File name: docker.sh
4 | # Lisence: MIT
5 | # By: Jejz
6 | #===============================================
7 |
8 | echo "加入docker套件……"
9 | echo "========================="
10 |
11 | ## docker套件
12 | sed -i 's/CONFIG_TARGET_ROOTFS_PARTSIZE.*/CONFIG_TARGET_ROOTFS_PARTSIZE=5120/g' .config
13 | sed -i 's/# CONFIG_PACKAGE_luci-app-dockerman is not set/CONFIG_PACKAGE_luci-app-dockerman=y/g' .config
14 | sed -i 's/# CONFIG_PACKAGE_docker is not set/CONFIG_PACKAGE_docker=y/g' .config
15 | sed -i 's/# CONFIG_PACKAGE_dockerd is not set/CONFIG_PACKAGE_dockerd=y/g' .config
16 | sed -i 's/# CONFIG_PACKAGE_docker-compose is not set/CONFIG_PACKAGE_docker-compose=y/g' .config
17 | sed -i 's/# CONFIG_PACKAGE_containerd is not set/CONFIG_PACKAGE_containerd=y/g' .config
18 | sed -i 's/# CONFIG_PACKAGE_runc is not set/CONFIG_PACKAGE_runc=y/g' .config
19 | #sed -i 's/# CONFIG_PACKAGE_libnetwork is not set/CONFIG_PACKAGE_libnetwork=y/g' .config
20 | sed -i 's/# CONFIG_PACKAGE_tini is not set/CONFIG_PACKAGE_tini=y/g' .config
21 | sed -i '/# CONFIG_PACKAGE_digitemp-usb is not set/a\CONFIG_DOCKER_CGROUP_OPTIONS=y' .config
22 | sed -i '/# CONFIG_PACKAGE_luci-i18n-ddnsto-zh_Hans is not set/a\CONFIG_PACKAGE_luci-i18n-dockerman-zh-cn=y' .config
23 | sed -i '/CONFIG_PACKAGE_luci-i18n-dockerman-zh-cn=y/a\# CONFIG_PACKAGE_luci-i18n-dockerman-zh_Hans is not set' .config
24 |
--------------------------------------------------------------------------------
/diy_script/openwrt_diy/x86/diy-part1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #===============================================
3 | # Description: DIY script part 1
4 | # File name: diy-part1.sh
5 | # Lisence: MIT
6 | # By: Jejz
7 | #===============================================
8 |
9 | # Add a feed source
10 | sed -i "/helloworld/d" feeds.conf.default
11 | # sed -i '$a src-git Jejz https://github.com/Jejz168/openwrt-packages' feeds.conf.default
12 | # sed -i '$a src-git helloworld https://github.com/fw876/helloworld' feeds.conf.default
13 | # sed -i '$a src-git PWpackages https://github.com/xiaorouji/openwrt-passwall.git;packages' feeds.conf.default
14 |
15 |
16 |
17 | cat>rename.sh<<-\EOF
18 | #!/bin/bash
19 | # 删除无关的文件
20 | ls -l bin/targets/x86/64/
21 | rm -rf bin/targets/x86/64/config.buildinfo
22 | rm -rf bin/targets/x86/64/feeds.buildinfo
23 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic-kernel.bin
24 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.vmdk
25 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined.vmdk
26 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic-squashfs-rootfs.img.gz
27 | rm -rf bin/targets/x86/64/openwrt-x86-64-generic.manifest
28 | rm -rf bin/targets/x86/64/sha256sums
29 | rm -rf bin/targets/x86/64/version.buildinfo
30 | rm -rf bin/targets/x86/64/profiles.json
31 |
32 | # 暂停 2 秒
33 | sleep 2
34 |
35 | # 获取默认内核版本号(例如:5.10)
36 | kernel_version=$(grep "KERNEL_PATCHVER:=" target/linux/x86/Makefile | cut -d "=" -f 2 | xargs)
37 |
38 | # 获取补丁版本号,若不存在则默认为0
39 | patch_version=$( (grep "LINUX_VERSION-${kernel_version} =" include/kernel-${kernel_version} 2>/dev/null || \
40 | grep "LINUX_VERSION-${kernel_version} =" target/linux/generic/kernel-${kernel_version} 2>/dev/null) | \
41 | cut -d "." -f 3)
42 | patch_version=${patch_version:-0}
43 |
44 | echo "Kernel Version: ${kernel_version}.${patch_version}"
45 |
46 | # 文件重命名
47 | if [ -f "bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined.img.gz" ]; then
48 | mv bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined.img.gz \
49 | bin/targets/x86/64/openwrt_x86-64_${kernel_version}.${patch_version}_bios.img.gz
50 | else
51 | echo "Error: File openwrt-x86-64-generic-squashfs-combined.img.gz not found!"
52 | exit 1
53 | fi
54 |
55 | if [ -f "bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img.gz" ]; then
56 | mv bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img.gz \
57 | bin/targets/x86/64/openwrt_x86-64_${kernel_version}.${patch_version}_uefi.img.gz
58 | else
59 | echo "Error: File openwrt-x86-64-generic-squashfs-combined-efi.img.gz not found!"
60 | exit 1
61 | fi
62 |
63 | # 直接指定文件名
64 | openwrt_dev="openwrt_x86-64_${kernel_version}.${patch_version}_bios.img.gz"
65 | openwrt_dev_uefi="openwrt_x86-64_${kernel_version}.${patch_version}_uefi.img.gz"
66 |
67 | # 生成 MD5 校验和
68 | cd bin/targets/x86/64 || exit 1
69 |
70 | if [ -f "$openwrt_dev" ]; then
71 | md5sum "$openwrt_dev" > openwrt_bios.md5
72 | else
73 | echo "Error: File $openwrt_dev not found!"
74 | exit 1
75 | fi
76 |
77 | if [ -f "$openwrt_dev_uefi" ]; then
78 | md5sum "$openwrt_dev_uefi" > openwrt_uefi.md5
79 | else
80 | echo "Error: File $openwrt_dev_uefi not found!"
81 | exit 1
82 | fi
83 | exit 0
84 | EOF
85 |
--------------------------------------------------------------------------------
/diy_script/preset-JejzWrt.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # 创建文件夹结构
4 | [ -d files/bin ] || mkdir -p files/bin
5 |
6 | # 创建脚本文件
7 | cat << 'EOF' > files/bin/JejzWrt
8 | #!/bin/bash
9 |
10 | # 获取内核版本
11 | kernel_version=$(uname -r)
12 |
13 | # 获取平台架构
14 | platform=$(uname -m)
15 |
16 | # 获取 CPU 型号
17 | cpu_model=$(awk -F ': ' '/model name/ {print $2}' /proc/cpuinfo | uniq)
18 |
19 | # 获取系统的运行时间(包括秒),并去掉小数
20 | uptime_seconds=$(cat /proc/uptime | awk '{print int($1)}')
21 |
22 | # 计算天、小时、分钟和秒(去掉小数)
23 | days=$((uptime_seconds / 86400))
24 | hours=$(( (uptime_seconds % 86400) / 3600 ))
25 | minutes=$(( (uptime_seconds % 3600) / 60 ))
26 | seconds=$((uptime_seconds % 60))
27 |
28 | # 获取内存使用情况
29 | mem_usage=$(free | awk '/Mem/ {printf "%d%% of %dM\n", $3/$2*100, int($2/1024)}')
30 |
31 | # 获取 IP 地址
32 | ip_addresses=$(ip -4 addr show dev br-lan | awk '/inet / {gsub(/\/.*/, "", $2); print $2}')
33 |
34 | # 获取 CPU 温度(需要安装 kmod-thermal 模块)
35 | cpu_temp=$(cat /sys/class/thermal/thermal_zone0/temp 2>/dev/null | awk '{printf "%.0f°C", $1/1000}')
36 |
37 | # 获取磁盘使用情况
38 | disk_usage=$(df -h / | awk '/\// {printf "%s of %s", $5, $2}')
39 |
40 | # 判断系统是通过 BIOS 还是 UEFI 启动
41 | if [ -d /sys/firmware/efi ]; then
42 | boot_mode="UEFI"
43 | else
44 | boot_mode="BIOS"
45 | fi
46 |
47 | # 彩色输出函数
48 | color_output() {
49 | echo -e "$1"
50 | }
51 |
52 | # 打印脚本头部,增加美观
53 | print_header() {
54 | clear
55 | color_output "\e[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\e[0m"
56 | color_output "\e[36m\ _ _ __ __ _ / \e[0m"
57 | color_output "\e[36m\ | | (_) \ \ / / | | / \e[0m"
58 | color_output "\e[36m\ | | ___ _ ___\ \ /\ / / __| |_ / \e[0m"
59 | color_output "\e[36m\ _ | |/ _ \ |_ /\ \/ \/ / '__| __| / \e[0m"
60 | color_output "\e[33m\ | |__| | __/ |/ / \ /\ /| | | |_ / \e[0m"
61 | color_output "\e[33m\ \____/ \___| /___| \/ \/ |_| \__| / \e[0m"
62 | color_output "\e[33m\ _/ | / \e[0m"
63 | color_output "\e[33m\ |__/ / \e[0m"
64 | color_output "\e[35m\ J e j z W r t By J e j z / \e[0m"
65 | color_output "\e[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\e[0m"
66 | echo -e "\e[96mCPU Model: $cpu_model \e[0m"
67 | echo -e "Run Time: $days 天 $hours 小时 $minutes 分钟 $seconds 秒 "
68 | echo -e "Memory Usage: $mem_usage "
69 | echo -e "Kernel Ver: $kernel_version $cpu_temp "
70 | echo -e "Overlay /TMP: $disk_usage "
71 | echo -e "Target Info: $platform - $boot_mode "
72 | echo -e "\e[31mIpv4 Address\e[0m: \e[41m$ip_addresses\e[0m"
73 | echo " "
74 | }
75 |
76 | # 显示菜单
77 | show_menu() {
78 | echo "=============================================="
79 | echo -e "\e[41mJejzWrt\e[0m \e[35m快捷命令菜单(Shortcut Command Menu)\e[0m "
80 | echo "=============================================="
81 | echo -e "\e[33m1. 更改 LAN 口 IP 地址(Change LAN port IP address)\e[0m"
82 | echo -e "\e[33m2. 更改管理员密码(Change administrator password)\e[0m"
83 | echo -e "\e[33m3. 重置网络和切换默认主题(Reset network and Switch default theme)\e[0m"
84 | echo -e "\e[33m4. 重启系统(Reboot)\e[0m"
85 | echo -e "\e[33m5. 关闭系统(Shutdown)\e[0m"
86 | echo -e "\e[33m6. 释放内存(Release memory)\e[0m"
87 | echo -e "\e[33m7. 恢复出厂设置(Restore factory settings)\e[0m"
88 | echo "0/q. 退出本快捷菜单(Exit shortcut menu)"
89 | echo "=============================================="
90 | printf "请输入功能编号(Enter the function number): "
91 | read choice
92 | case "$choice" in
93 | 1) change_ip ;;
94 | 2) change_password ;;
95 | 3) change_theme ;;
96 | 4) reboot_system ;;
97 | 5) shutdown_system ;;
98 | 6) echo "正在清理内存缓存..."; sync && echo 3 > /proc/sys/vm/drop_caches; echo "内存缓存已清理"; show_menu ;;
99 | 7) reset_config ;;
100 | 0|q|Q) exit 0 ;;
101 | *) echo "无效选项,请重新输入"; show_menu ;;
102 | esac
103 | }
104 |
105 | # 更改 LAN 口 IP 地址
106 | # 判断IP地址是否合法
107 | is_valid_ip() {
108 | local ip="$1"
109 | # 使用正则表达式检查 IP 地址格式
110 | if [[ "$ip" =~ ^([1-9]{1}[0-9]{0,2}|0){1}\.([1-9]{1}[0-9]{0,2}|0){1}\.([1-9]{1}[0-9]{0,2}|0){1}\.([1-9]{1}[0-9]{0,2}|0){1}$ ]]; then
111 | # 检查每个段的数字是否在 0 到 255 之间
112 | IFS='.' read -r -a octets <<< "$ip"
113 | for octet in "${octets[@]}"; do
114 | if [[ "$octet" -lt 1 || "$octet" -gt 255 ]]; then
115 | return 1 # 不合法
116 | fi
117 | done
118 | return 0 # 合法
119 | else
120 | return 1 # 格式不正确
121 | fi
122 | }
123 |
124 | change_ip() {
125 | # 提示用户是否确认更改 IP 地址
126 | echo -n "是否确定要更改 LAN 口 IP 地址?(y/n): "
127 | read confirm_ip
128 |
129 | if [[ "$confirm_ip" == "y" || "$confirm_ip" == "Y" ]]; then
130 | # 用户确认后提示输入新的 LAN 口 IP 地址
131 | printf "请输入新的 LAN 口 IP 地址(如 192.168.1.2),按 Enter 返回菜单:"
132 | read new_ip
133 |
134 | # 如果用户没有输入新 IP,取消操作
135 | if [[ -z "$new_ip" ]]; then
136 | echo "操作已取消,返回菜单。"
137 | show_menu
138 | return
139 | fi
140 |
141 | # 如果输入的 IP 地址格式无效
142 | if ! is_valid_ip "$new_ip"; then
143 | echo "无效的 IP 地址格式,操作取消。"
144 | show_menu
145 | return
146 | fi
147 |
148 | # 使用 UCI 更改 IP 地址
149 | uci set network.lan.ipaddr="$new_ip"
150 | uci commit network
151 | /etc/init.d/network restart
152 | echo "LAN 口 IP 已成功更改为 $new_ip"
153 | else
154 | # 如果用户取消操作
155 | echo "IP 地址更改已取消。"
156 | fi
157 |
158 | # 返回菜单
159 | printf "按 Enter 键返回菜单..."
160 | read
161 | show_menu
162 | }
163 |
164 | # 更改管理员密码
165 | change_password() {
166 | # 提示用户是否确认更改管理员密码
167 | echo -n "是否确定要更改管理员密码?(y/n): "
168 | read confirm_password
169 |
170 | if [[ "$confirm_password" == "y" || "$confirm_password" == "Y" ]]; then
171 | # 用户确认后提示输入新密码
172 | printf "请输入新的管理员密码,按 Enter 返回菜单:"
173 | read new_password
174 |
175 | # 如果用户未输入密码,则取消操作
176 | if [[ -z "$new_password" ]]; then
177 | echo "操作已取消,返回菜单。"
178 | show_menu
179 | return
180 | fi
181 |
182 | # 使用 OpenWrt 的 `passwd` 工具更新密码
183 | echo -e "$new_password\n$new_password" | passwd root
184 | echo "管理员密码已成功更改。"
185 | else
186 | # 如果用户取消操作
187 | echo "密码更改已取消。"
188 | fi
189 |
190 | # 返回菜单
191 | printf "按 Enter 键返回菜单..."
192 | read
193 | show_menu
194 | }
195 |
196 | # 重置网络和切换默认主题
197 | change_theme() {
198 | # 提示用户是否更改 luci 配置
199 | echo -n "是否要更改主题配置为默认主题?(y/n): "
200 | read confirm_theme
201 |
202 | if [[ "$confirm_theme" == "y" || "$confirm_theme" == "Y" ]]; then
203 | # 使用 UCI 更改 luci 配置
204 | uci set luci.main.mediaurlbase='/luci-static/bootstrap'
205 | uci commit luci
206 | echo "主题已成功切换为默认主题。"
207 | else
208 | echo "主题更改已取消。"
209 | fi
210 |
211 | # 提示是否重启网络
212 | echo -n "是否要重启网络服务?(y/n): "
213 | read reset_choice
214 | if [[ "$reset_choice" == "y" || "$reset_choice" == "Y" ]]; then
215 | echo "正在重启网络..."
216 | /etc/init.d/network restart
217 | echo "网络已重启。"
218 | else
219 | echo "网络设置未更改。"
220 | fi
221 |
222 | # 返回菜单
223 | printf "按 Enter 键返回菜单..."
224 | read
225 | show_menu
226 | }
227 |
228 | # 一键重启
229 | reboot_system() {
230 | printf "确定要重启系统吗?(y/n): "
231 | read confirm_reboot
232 |
233 | if [[ "$confirm_reboot" == "y" || "$confirm_reboot" == "Y" ]]; then
234 | echo "正在重启系统..."
235 | reboot
236 | else
237 | echo "系统重启操作已取消。"
238 | fi
239 |
240 | # 返回菜单
241 | printf "按 Enter 键返回菜单..."
242 | read
243 | show_menu
244 | }
245 |
246 | # 一键关闭系统
247 | shutdown_system() {
248 | printf "确定要关闭系统吗?(y/n): "
249 | read confirm_shutdown
250 |
251 | if [[ "$confirm_shutdown" == "y" || "$confirm_shutdown" == "Y" ]]; then
252 | echo "正在关闭系统..."
253 | poweroff
254 | else
255 | echo "系统关闭操作已取消。"
256 | fi
257 |
258 | # 返回菜单
259 | printf "按 Enter 键返回菜单..."
260 | read
261 | show_menu
262 | }
263 |
264 | # 一键重置配置
265 | reset_config() {
266 | # 提示用户是否确认恢复出厂设置
267 | echo -n "是否确定要恢复出厂设置?此操作将清除所有配置!(y/n): "
268 | read confirm_reset
269 |
270 | if [[ "$confirm_reset" == "y" || "$confirm_reset" == "Y" ]]; then
271 | # 执行恢复出厂设置
272 | echo "恢复出厂设置中..."
273 | firstboot -y
274 |
275 | # 提示用户设备重启
276 | echo "设备将在 5 秒钟后重启..."
277 | sleep 5
278 | reboot
279 | else
280 | echo "恢复出厂设置已取消。"
281 | fi
282 |
283 | # 返回菜单
284 | printf "按 Enter 键返回菜单..."
285 | read
286 | show_menu
287 | }
288 |
289 | # 启动菜单
290 | print_header
291 | show_menu
292 | EOF
293 |
294 | # 设置脚本权限
295 | chmod +x files/bin/JejzWrt
296 |
297 | # 重定向 menu -> JejzWrt
298 | ln -s /bin/JejzWrt files/bin/menu
299 |
--------------------------------------------------------------------------------
/diy_script/preset-adguard-core.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | [ -d files/usr/bin/AdGuardHome ] || mkdir -p files/usr/bin/AdGuardHome
4 |
5 | AGH_CORE=$(curl -sL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | grep /AdGuardHome_linux_${1} | awk -F '"' '{print $4}')
6 |
7 | wget -qO- $AGH_CORE | tar xOvz > files/usr/bin/AdGuardHome/AdGuardHome
8 |
9 | chmod +x files/usr/bin/AdGuardHome/AdGuardHome
10 |
--------------------------------------------------------------------------------
/diy_script/preset-clash-core.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | [ -d files/etc/openclash/core ] || mkdir -p files/etc/openclash/core
4 |
5 | CLASH_META_URL="https://raw.githubusercontent.com/vernesong/OpenClash/core/master/meta/clash-linux-${1}.tar.gz"
6 | GEOIP_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat"
7 | GEOSITE_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat"
8 | GEO_MMDB_URL="https://github.com/alecthw/mmdb_china_ip_list/raw/release/lite/Country.mmdb"
9 |
10 | wget -qO- $CLASH_META_URL | tar xOvz > files/etc/openclash/core/clash_meta
11 | wget -qO- $GEOIP_URL > files/etc/openclash/GeoIP.dat
12 | wget -qO- $GEOSITE_URL > files/etc/openclash/GeoSite.dat
13 | wget -qO- $GEO_MMDB_URL > files/etc/openclash/Country.mmdb
14 |
15 | chmod +x files/etc/openclash/core/clash*
16 |
--------------------------------------------------------------------------------
/diy_script/preset-mihomo-core.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | [ -d files/etc/mihomo/run/ui ] || mkdir -p files/etc/mihomo/run/ui
4 |
5 | GEOIP_URL="https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat"
6 | GEOSITE_URL="https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat"
7 | GEOIP_METADB_URL="https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.metadb"
8 | ASN_MMDB_URL="https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb"
9 |
10 | wget -qO- $GEOIP_URL > files/etc/mihomo/run/GeoIP.dat
11 | wget -qO- $GEOSITE_URL > files/etc/mihomo/run/GeoSite.dat
12 | wget -qO- $GEOIP_METADB_URL > files/etc/mihomo/run/geoip.metadb
13 | wget -qO- $ASN_MMDB_URL > files/etc/mihomo/run/ASN.mmdb
14 |
--------------------------------------------------------------------------------
/feeds_config/immo.feeds.conf.default:
--------------------------------------------------------------------------------
1 | src-git packages https://github.com/immortalwrt/packages.git
2 | src-git luci https://github.com/immortalwrt/luci.git
3 | src-git routing https://github.com/openwrt/routing.git
4 | src-git telephony https://github.com/openwrt/telephony.git
5 |
6 |
7 | #src-git-full video https://github.com/openwrt/video.git
8 | #src-git-full targets https://github.com/openwrt/targets.git
9 | #src-git-full oldpackages http://git.openwrt.org/packages.git
10 | #src-link custom /usr/src/openwrt/custom-feed
11 |
--------------------------------------------------------------------------------
/feeds_config/lede.feeds.conf.default:
--------------------------------------------------------------------------------
1 | src-git packages https://github.com/coolsnowwolf/packages;master
2 | src-git luci https://github.com/coolsnowwolf/luci;master
3 | #src-git luci https://github.com/coolsnowwolf/luci.git;openwrt-23.05
4 | src-git routing https://github.com/openwrt/routing.git;openwrt-23.05
5 | src-git telephony https://github.com/openwrt/telephony.git;openwrt-23.05
6 |
7 | #src-git video https://github.com/openwrt/video.git
8 | #src-git targets https://github.com/openwrt/targets.git
9 | #src-git management https://github.com/openwrt-management/packages.git
10 | #src-git oldpackages http://git.openwrt.org/packages.git
11 | #src-git nas https://github.com/linkease/nas-packages.git;master
12 | #src-git nas_luci https://github.com/linkease/nas-packages-luci.git;main
13 |
--------------------------------------------------------------------------------
/feeds_config/lede2305.feeds.conf.default:
--------------------------------------------------------------------------------
1 | src-git packages https://github.com/coolsnowwolf/packages;master
2 | #src-git luci https://github.com/coolsnowwolf/luci;master
3 | src-git luci https://github.com/coolsnowwolf/luci.git;openwrt-23.05
4 | src-git routing https://github.com/openwrt/routing.git;openwrt-23.05
5 | src-git telephony https://github.com/openwrt/telephony.git;openwrt-23.05
6 |
7 | #src-git video https://github.com/openwrt/video.git
8 | #src-git targets https://github.com/openwrt/targets.git
9 | #src-git management https://github.com/openwrt-management/packages.git
10 | #src-git oldpackages http://git.openwrt.org/packages.git
11 | #src-git nas https://github.com/linkease/nas-packages.git;master
12 | #src-git nas_luci https://github.com/linkease/nas-packages-luci.git;main
13 |
--------------------------------------------------------------------------------
/feeds_config/openwrt.feeds.conf.default:
--------------------------------------------------------------------------------
1 | src-git packages https://github.com/openwrt/packages.git
2 | src-git luci https://github.com/openwrt/luci.git
3 | src-git routing https://github.com/openwrt/routing.git
4 | src-git telephony https://github.com/openwrt/telephony.git
5 |
6 |
7 | #src-git video https://github.com/openwrt/video.git
8 | #src-git targets https://github.com/openwrt/targets.git
9 | #src-git oldpackages http://git.openwrt.org/packages.git
10 | #src-link custom /usr/src/openwrt/custom-feed
11 |
--------------------------------------------------------------------------------
/personal/AdGuardHome/base.lua:
--------------------------------------------------------------------------------
1 | require("luci.sys")
2 | require("luci.util")
3 | require("io")
4 | local m,s,o,o1
5 | local fs=require"nixio.fs"
6 | local uci=require"luci.model.uci".cursor()
7 | local configpath=uci:get("AdGuardHome","AdGuardHome","configpath") or "/etc/AdGuardHome.yaml"
8 | local binpath=uci:get("AdGuardHome","AdGuardHome","binpath") or "/usr/bin/AdGuardHome/AdGuardHome"
9 | httpport=uci:get("AdGuardHome","AdGuardHome","httpport") or "3000"
10 | m = Map("AdGuardHome", "AdGuard Home")
11 | m.description = translate("Free and open source, powerful network-wide ads & trackers blocking DNS server.")
12 | m:section(SimpleSection).template = "AdGuardHome/AdGuardHome_status"
13 |
14 | s = m:section(TypedSection, "AdGuardHome")
15 | s.anonymous=true
16 | s.addremove=false
17 | ---- enable
18 | o = s:option(Flag, "enabled", translate("Enable"))
19 | o.default = 0
20 | o.optional = false
21 | ---- httpport
22 | o =s:option(Value,"httpport",translate("Browser management port"))
23 | o.placeholder=3000
24 | o.default=3000
25 | o.datatype="port"
26 | o.optional = false
27 | o.description = translate("")
28 | ---- update warning not safe
29 | local binmtime=uci:get("AdGuardHome","AdGuardHome","binmtime") or "0"
30 | local e=""
31 | if not fs.access(configpath) then
32 | e=e.." "..translate("no config")
33 | end
34 | if not fs.access(binpath) then
35 | e=e.." "..translate("no core")
36 | else
37 | local version=uci:get("AdGuardHome","AdGuardHome","version")
38 | local testtime=fs.stat(binpath,"mtime")
39 | if testtime~=tonumber(binmtime) or version==nil then
40 | local tmp=luci.sys.exec(binpath.." --version 2>/dev/null | grep -m 1 -E '[0-9]+[.][Bbeta0-9\.\-]+' -o")
41 | version=string.sub(tmp, 1, -2)
42 | if version=="" then version="core error" end
43 | uci:set("AdGuardHome","AdGuardHome","version",version)
44 | uci:set("AdGuardHome","AdGuardHome","binmtime",testtime)
45 | uci:commit("AdGuardHome")
46 | end
47 | e=version..e
48 | end
49 | o=s:option(Button,"restart",translate("Update"))
50 | o.inputtitle=translate("Update core version")
51 | o.template = "AdGuardHome/AdGuardHome_check"
52 | o.showfastconfig=(not fs.access(configpath))
53 | o.description=string.format(translate("core version:").."%s ",e)
54 | ---- port warning not safe
55 | local port = luci.sys.exec("awk '/^\\s*dns:/ {found_dns=1} found_dns && /^\\s*port:/ {print $2; exit}' "..configpath.." 2>/dev/null")
56 | if (port=="") then port="?" end
57 | ---- Redirect
58 | o = s:option(ListValue, "redirect", port..translate("Redirect"), translate("AdGuardHome redirect mode"))
59 | o.placeholder = "none"
60 | o:value("none", translate("none"))
61 | o:value("dnsmasq-upstream", translate("Run as dnsmasq upstream server"))
62 | o:value("redirect", translate("Redirect 53 port to AdGuardHome"))
63 | o:value("exchange", translate("Use port 53 replace dnsmasq"))
64 | o.default = "none"
65 | o.optional = true
66 | ---- bin path
67 | o = s:option(Value, "binpath", translate("Bin Path"), translate("AdGuardHome Bin path if no bin will auto download"))
68 | o.default = "/usr/bin/AdGuardHome/AdGuardHome"
69 | o.datatype = "string"
70 | o.optional = false
71 | o.rmempty=false
72 | o.validate=function(self, value)
73 | if value=="" then return nil end
74 | if fs.stat(value,"type")=="dir" then
75 | fs.rmdir(value)
76 | end
77 | if fs.stat(value,"type")=="dir" then
78 | if (m.message) then
79 | m.message =m.message.."\nerror!bin path is a dir"
80 | else
81 | m.message ="error!bin path is a dir"
82 | end
83 | return nil
84 | end
85 | return value
86 | end
87 | --- arch
88 | o = s:option(ListValue, "arch", translate("choose Arch for download"))
89 | o:value("",translate("Auto"))
90 | o:value("386",translate("i386"))
91 | o:value("amd64",translate("x86_64"))
92 | o:value("armv5",translate("armv5"))
93 | o:value("armv6",translate("armv6"))
94 | o:value("armv7",translate("armv7"))
95 | o:value("arm64",translate("aarch64"))
96 | o:value("mips_softfloat",translate("mips"))
97 | o:value("mips64_softfloat",translate("mips64"))
98 | o:value("mipsle_softfloat",translate("mipsel"))
99 | o:value("mips64le_softfloat",translate("mips64el"))
100 | o:value("ppc64le",translate("powerpc64"))
101 | o.description=translate("Need to save to config first before downloading.")
102 | o.default=""
103 | o.rmempty=true
104 |
105 | --- upx
106 | o = s:option(ListValue, "upxflag", translate("use upx to compress bin after download"))
107 | o:value("", translate("none"))
108 | o:value("-1", translate("compress faster"))
109 | o:value("-9", translate("compress better"))
110 | o:value("--best", translate("compress best(can be slow for big files)"))
111 | o:value("--brute", translate("try all available compression methods & filters [slow]"))
112 | o:value("--ultra-brute", translate("try even more compression variants [very slow]"))
113 | o.default = ""
114 | o.description=translate("bin use less space,but may have compatibility issues")
115 | o.rmempty = true
116 | ---- config path
117 | o = s:option(Value, "configpath", translate("Config Path"), translate("AdGuardHome config path"))
118 | o.default = "/etc/AdGuardHome.yaml"
119 | o.datatype = "string"
120 | o.optional = false
121 | o.rmempty=false
122 | o.validate=function(self, value)
123 | if value==nil then return nil end
124 | if fs.stat(value,"type")=="dir" then
125 | fs.rmdir(value)
126 | end
127 | if fs.stat(value,"type")=="dir" then
128 | if m.message then
129 | m.message =m.message.."\nerror!config path is a dir"
130 | else
131 | m.message ="error!config path is a dir"
132 | end
133 | return nil
134 | end
135 | return value
136 | end
137 | ---- work dir
138 | o = s:option(Value, "workdir", translate("Work dir"), translate("AdGuardHome work dir include rules,audit log and database"))
139 | o.default = "/usr/bin/AdGuardHome"
140 | o.datatype = "string"
141 | o.optional = false
142 | o.rmempty=false
143 | o.validate=function(self, value)
144 | if value=="" then return nil end
145 | if fs.stat(value,"type")=="reg" then
146 | if m.message then
147 | m.message =m.message.."\nerror!work dir is a file"
148 | else
149 | m.message ="error!work dir is a file"
150 | end
151 | return nil
152 | end
153 | if string.sub(value, -1)=="/" then
154 | return string.sub(value, 1, -2)
155 | else
156 | return value
157 | end
158 | end
159 | ---- log file
160 | o = s:option(Value, "logfile", translate("Runtime log file"), translate("AdGuardHome runtime Log file if 'syslog': write to system log;if empty no log"))
161 | o.datatype = "string"
162 | o.rmempty = true
163 | o.validate=function(self, value)
164 | if fs.stat(value,"type")=="dir" then
165 | fs.rmdir(value)
166 | end
167 | if fs.stat(value,"type")=="dir" then
168 | if m.message then
169 | m.message =m.message.."\nerror!log file is a dir"
170 | else
171 | m.message ="error!log file is a dir"
172 | end
173 | return nil
174 | end
175 | return value
176 | end
177 | ---- debug
178 | o = s:option(Flag, "verbose", translate("Verbose log"))
179 | o.default = 0
180 | o.optional = true
181 | ---- gfwlist
182 | local a
183 | if fs.access(configpath) then
184 | a=luci.sys.call("grep -m 1 -q programadd "..configpath)
185 | else
186 | a=1
187 | end
188 | if (a==0) then
189 | a="Added"
190 | else
191 | a="Not added"
192 | end
193 | o=s:option(Button,"gfwdel",translate("Del gfwlist"),translate(a))
194 | o.optional = true
195 | o.inputtitle=translate("Del")
196 | o.write=function()
197 | luci.sys.exec("sh /usr/share/AdGuardHome/gfw2adg.sh del 2>&1")
198 | luci.http.redirect(luci.dispatcher.build_url("admin","services","AdGuardHome"))
199 | end
200 | o=s:option(Button,"gfwadd",translate("Add gfwlist"),translate(a))
201 | o.optional = true
202 | o.inputtitle=translate("Add")
203 | o.write=function()
204 | luci.sys.exec("sh /usr/share/AdGuardHome/gfw2adg.sh 2>&1")
205 | luci.http.redirect(luci.dispatcher.build_url("admin","services","AdGuardHome"))
206 | end
207 | if fs.access(configpath) then
208 | a=luci.sys.call("grep -m 1 -q ipset.txt "..configpath)
209 | else
210 | a=1
211 | end
212 | if (a==0) then
213 | a="Added"
214 | else
215 | a="Not added"
216 | end
217 | o=s:option(Button,"gfwipsetdel",translate("Del gfwlist")..translate("(ipset only)"),translate(a))
218 | o.optional = true
219 | o.inputtitle=translate("Del")
220 | o.write=function()
221 | luci.sys.exec("sh /usr/share/AdGuardHome/gfwipset2adg.sh del 2>&1")
222 | luci.http.redirect(luci.dispatcher.build_url("admin","services","AdGuardHome"))
223 | end
224 | o=s:option(Button,"gfwipsetadd",translate("Add gfwlist")..translate("(ipset only)"),translate(a).." "..translate("will set to name gfwlist"))
225 | o.optional = true
226 | o.inputtitle=translate("Add")
227 | o.write=function()
228 | luci.sys.exec("sh /usr/share/AdGuardHome/gfwipset2adg.sh 2>&1")
229 | luci.http.redirect(luci.dispatcher.build_url("admin","services","AdGuardHome"))
230 | end
231 | o = s:option(Value, "gfwupstream", translate("Gfwlist upstream dns server"), translate("Gfwlist domain upstream dns service")..translate(a))
232 | o.default = "tcp://208.67.220.220:5353"
233 | o.datatype = "string"
234 | o.optional = true
235 | ---- chpass
236 | o = s:option(Value, "hashpass", translate("Change browser management password"), translate("Press load culculate model and culculate finally save/apply"))
237 | o.default = ""
238 | o.datatype = "string"
239 | o.template = "AdGuardHome/AdGuardHome_chpass"
240 | o.optional = true
241 | ---- upgrade protect
242 | o = s:option(MultiValue, "upprotect", translate("Keep files when system upgrade"))
243 | o:value("$binpath",translate("core bin"))
244 | o:value("$configpath",translate("config file"))
245 | o:value("$logfile",translate("log file"))
246 | o:value("$workdir/data/sessions.db",translate("sessions.db"))
247 | o:value("$workdir/data/stats.db",translate("stats.db"))
248 | o:value("$workdir/data/querylog.json",translate("querylog.json"))
249 | o:value("$workdir/data/filters",translate("filters"))
250 | o.widget = "checkbox"
251 | o.default = nil
252 | o.optional=true
253 | ---- wait net on boot
254 | o = s:option(Flag, "waitonboot", translate("On boot when network ok restart"))
255 | o.default = 1
256 | o.optional = true
257 | ---- backup workdir on shutdown
258 | local workdir=uci:get("AdGuardHome","AdGuardHome","workdir") or "/usr/bin/AdGuardHome"
259 | o = s:option(MultiValue, "backupfile", translate("Backup workdir files when shutdown"))
260 | o1 = s:option(Value, "backupwdpath", translate("Backup workdir path"))
261 | local name
262 | o:value("filters","filters")
263 | o:value("stats.db","stats.db")
264 | o:value("querylog.json","querylog.json")
265 | o:value("sessions.db","sessions.db")
266 | o1:depends ("backupfile", "filters")
267 | o1:depends ("backupfile", "stats.db")
268 | o1:depends ("backupfile", "querylog.json")
269 | o1:depends ("backupfile", "sessions.db")
270 | for name in fs.glob(workdir.."/data/*")
271 | do
272 | name=fs.basename (name)
273 | if name~="filters" and name~="stats.db" and name~="querylog.json" and name~="sessions.db" then
274 | o:value(name,name)
275 | o1:depends ("backupfile", name)
276 | end
277 | end
278 | o.widget = "checkbox"
279 | o.default = nil
280 | o.optional=false
281 | o.description=translate("Will be restore when workdir/data is empty")
282 | ----backup workdir path
283 |
284 | o1.default = "/usr/bin/AdGuardHome"
285 | o1.datatype = "string"
286 | o1.optional = false
287 | o1.validate=function(self, value)
288 | if fs.stat(value,"type")=="reg" then
289 | if m.message then
290 | m.message =m.message.."\nerror!backup dir is a file"
291 | else
292 | m.message ="error!backup dir is a file"
293 | end
294 | return nil
295 | end
296 | if string.sub(value,-1)=="/" then
297 | return string.sub(value, 1, -2)
298 | else
299 | return value
300 | end
301 | end
302 |
303 | ----Crontab
304 | o = s:option(MultiValue, "crontab", translate("Crontab task"),translate("Please change time and args in crontab"))
305 | o:value("autoupdate",translate("Auto update core"))
306 | o:value("cutquerylog",translate("Auto tail querylog"))
307 | o:value("cutruntimelog",translate("Auto tail runtime log"))
308 | o:value("autohost",translate("Auto update ipv6 hosts and restart adh"))
309 | o:value("autogfw",translate("Auto update gfwlist and restart adh"))
310 | o:value("autogfwipset",translate("Auto update ipset list and restart adh"))
311 | o.widget = "checkbox"
312 | o.default = nil
313 | o.optional=true
314 |
315 | ----downloadtarge
316 | o = s:option(ListValue, "tagname", translate("Choose Release Version for download"))
317 | o:value("release",translate("Release(Default)"))
318 | o:value("beta",translate("Beta"))
319 | o.description=translate("If this option is modified, please confirm the download links")
320 | o.default="release"
321 | o.rmempty=true
322 |
323 | ----downloadpath
324 | o = s:option(TextValue, "downloadlinks",translate("Download links for update"))
325 | o.optional = false
326 | o.rows = 4
327 | o.wrap = "soft"
328 | o.cfgvalue = function(self, section)
329 | return fs.readfile("/usr/share/AdGuardHome/links.txt")
330 | end
331 | o.write = function(self, section, value)
332 | fs.writefile("/usr/share/AdGuardHome/links.txt", value:gsub("\r\n", "\n"))
333 | end
334 | fs.writefile("/var/run/lucilogpos","0")
335 | function m.on_commit(map)
336 | if (fs.access("/var/run/AdGserverdis")) then
337 | io.popen("/etc/init.d/AdGuardHome reload &")
338 | return
339 | end
340 | local ucitracktest=uci:get("AdGuardHome","AdGuardHome","ucitracktest")
341 | if ucitracktest=="1" then
342 | return
343 | elseif ucitracktest=="0" then
344 | io.popen("/etc/init.d/AdGuardHome reload &")
345 | else
346 | if (fs.access("/var/run/AdGlucitest")) then
347 | uci:set("AdGuardHome","AdGuardHome","ucitracktest","0")
348 | io.popen("/etc/init.d/AdGuardHome reload &")
349 | else
350 | fs.writefile("/var/run/AdGlucitest","")
351 | if (ucitracktest=="2") then
352 | uci:set("AdGuardHome","AdGuardHome","ucitracktest","1")
353 | else
354 | uci:set("AdGuardHome","AdGuardHome","ucitracktest","2")
355 | end
356 | end
357 | uci:commit("AdGuardHome")
358 | end
359 | end
360 | return m
361 |
--------------------------------------------------------------------------------
/personal/banner:
--------------------------------------------------------------------------------
1 |
2 | _ooOoo_
3 | o8888888o
4 | 88" . "88
5 | (| ^_^ |)
6 | O\ = /O
7 | ____/`---'\____
8 | .' \\| |// `.
9 | / \\||| : |||// \
10 | / _||||| -:- |||||_ \
11 | | | \\\ - /// | |
12 | | \_| ''\---/'' |_/ |
13 | \ .-\__ `-` ___/-. /
14 | ___`. .' /--.--\ `. .' ___
15 | [36m."" '< `.___\_<|>_/___.' >' "".[0m
16 | [35m| | : `- \`.;`\ _ /`;.`/ - ` : | |[0m
17 | [33m\ \ `-. \_ __\ /__ _/ .-` / /[0m
18 | [33m========`-.____`-.__\_____/___.-`____.-'========
19 | `=---='[0m
20 |
21 | .----..----..----..-. .-..-. . .-..----. .---.
22 | / {} \ {} } {_ | `| || |/ \| || {} |_ _}
23 | \ / .--'| {__ | |\ || .'. || .-. \ | |
24 | `----'`-' `----'`-' `-'`-' `-'`-' `-' `-'
25 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | [31m %D %V, %C/LEDE By Jejz[0m
27 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 |
--------------------------------------------------------------------------------
/personal/banner-immo:
--------------------------------------------------------------------------------
1 |
2 | _ooOoo_
3 | o8888888o
4 | 88" . "88
5 | (| ^_^ |)
6 | O\ = /O
7 | ____/`---'\____
8 | .' \\| |// `.
9 | / \\||| : |||// \
10 | / _||||| -:- |||||_ \
11 | | | \\\ - /// | |
12 | | \_| ''\---/'' |_/ |
13 | \ .-\__ `-` ___/-. /
14 | ___`. .' /--.--\ `. .' ___
15 | [36m."" '< `.___\_<|>_/___.' >' "".[0m
16 | [35m| | : `- \`.;`\ _ /`;.`/ - ` : | |[0m
17 | [33m\ \ `-. \_ __\ /__ _/ .-` / /[0m
18 | [33m========`-.____`-.__\_____/___.-`____.-'========
19 | `=---='[0m
20 |
21 | .----..----..----..-. .-..-. . .-..----. .---.
22 | / {} \ {} } {_ | `| || |/ \| || {} |_ _}
23 | \ / .--'| {__ | |\ || .'. || .-. \ | |
24 | `----'`-' `----'`-' `-'`-' `-'`-' `-' `-'
25 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | [31m %D %V, %C/ImmortalWrt By Jejz [0m
27 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 |
--------------------------------------------------------------------------------
/personal/banner-op:
--------------------------------------------------------------------------------
1 |
2 | _ooOoo_
3 | o8888888o
4 | 88" . "88
5 | (| ^_^ |)
6 | O\ = /O
7 | ____/`---'\____
8 | .' \\| |// `.
9 | / \\||| : |||// \
10 | / _||||| -:- |||||_ \
11 | | | \\\ - /// | |
12 | | \_| ''\---/'' |_/ |
13 | \ .-\__ `-` ___/-. /
14 | ___`. .' /--.--\ `. .' ___
15 | [36m."" '< `.___\_<|>_/___.' >' "".[0m
16 | [35m| | : `- \`.;`\ _ /`;.`/ - ` : | |[0m
17 | [33m\ \ `-. \_ __\ /__ _/ .-` / /[0m
18 | [33m========`-.____`-.__\_____/___.-`____.-'========
19 | `=---='[0m
20 |
21 | .----..----..----..-. .-..-. . .-..----. .---.
22 | / {} \ {} } {_ | `| || |/ \| || {} |_ _}
23 | \ / .--'| {__ | |\ || .'. || .-. \ | |
24 | `----'`-' `----'`-' `-'`-' `-'`-' `-' `-'
25 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | [31m %D %V, %C/OpenWrt By Jejz [0m
27 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 |
--------------------------------------------------------------------------------
/personal/banner2:
--------------------------------------------------------------------------------
1 | [31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
2 | [35m\ ___ _ __ __ __ _ /[0m
3 | [35m\ / _ \ | '_ \ ___ _ _ \ \ / / _ _ | |_ /[0m
4 | [35m\ | (_) | | .__/ / -_) | ' \ \ \/\/ / | '_| | _| /[0m
5 | [35m\ \___/ |_|__ \___| |_||_| \_/\_/ _|_|_ _\__| /[0m
6 | [33m\ _|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| /[0m
7 | [33m\ "`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-' /[0m
8 | [33m\ /[0m
9 | [31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
10 | %D %V, %C/OpenWrt By Jejz
11 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 |
13 |
--------------------------------------------------------------------------------
/personal/bg1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/bg1.jpg
--------------------------------------------------------------------------------
/personal/bg2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/bg2.jpg
--------------------------------------------------------------------------------
/personal/bg3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/bg3.jpg
--------------------------------------------------------------------------------
/personal/bg4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/bg4.jpg
--------------------------------------------------------------------------------
/personal/bg5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/bg5.jpg
--------------------------------------------------------------------------------
/personal/bg6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/bg6.jpg
--------------------------------------------------------------------------------
/personal/bg7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/bg7.jpg
--------------------------------------------------------------------------------
/personal/chinadns-ng/Makefile:
--------------------------------------------------------------------------------
1 | include $(TOPDIR)/rules.mk
2 |
3 | PKG_NAME:=chinadns-ng
4 | PKG_VERSION:=2024.03.07
5 | PKG_RELEASE:=1
6 |
7 | PKG_SOURCE_URL:=https://github.com/zfl9/chinadns-ng/releases/download/$(PKG_VERSION)
8 | UNPACK_CMD=$(CP) $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/chinadns-ng
9 |
10 | ifeq ($(ARCH),aarch64)
11 | PKG_SOURCE:=chinadns-ng@aarch64-linux-musl@generic+v8a@fast+lto
12 | PKG_HASH:=a699d6d6a3b03b068d6a52fa411611f0e6738a51b5c43cb745c36e2d155e03d8
13 | else ifeq ($(ARCH),arm)
14 | ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE))))
15 | ifeq ($(ARM_CPU_FEATURES),)
16 | PKG_SOURCE:=chinadns-ng@arm-linux-musleabi@generic+v7a@fast+lto
17 | PKG_HASH:=0c77f8d7631cca22d1816a90655b407b9f82bbb349ac221d12a9a26da6c72dcb
18 | else
19 | PKG_SOURCE:=chinadns-ng@arm-linux-musleabihf@generic+v7a@fast+lto
20 | PKG_HASH:=02ef7b8c9d54a1718fa7f6832bbdc04b9c3e2f29ecb89f726c801030c1f0a3b4
21 | endif
22 | else ifeq ($(ARCH),mips)
23 | PKG_SOURCE:=chinadns-ng@mips-linux-musl@mips32@fast+lto
24 | PKG_HASH:=5d04803e8353f69d0358ce14d2c44579cf286477d3457e72ce8a3f6659b6625f
25 | else ifeq ($(ARCH),mipsel)
26 | PKG_SOURCE:=chinadns-ng@mipsel-linux-musl@mips32@fast+lto
27 | PKG_HASH:=10bf2f022596ed69585876cb126aa487e6585a574ec2787f535d0b7b419b3c58
28 | else ifeq ($(ARCH),i386)
29 | PKG_SOURCE:=chinadns-ng@i386-linux-musl@i686@fast+lto
30 | PKG_HASH:=fef4eeb0533dbec588cdbc768e9eaa6d6087eb484f0a693a4ec677e06d3caa46
31 | else ifeq ($(ARCH),x86_64)
32 | PKG_SOURCE:=chinadns-ng@x86_64-linux-musl@x86_64@fast+lto
33 | PKG_HASH:=f2cb388d150b836228dc114d25867fc649fdd56a6ff04d35c1ef6df5025f0888
34 | else
35 | PKG_SOURCE:=dummy
36 | PKG_HASH:=dummy
37 | endif
38 |
39 | PKG_LICENSE:=AGPL-3.0-only
40 | PKG_LICENSE_FILES:=LICENSE
41 | PKG_MAINTAINER:=sbwml
42 |
43 | include $(INCLUDE_DIR)/package.mk
44 |
45 | define Package/chinadns-ng
46 | SECTION:=net
47 | CATEGORY:=Network
48 | SUBMENU:=IP Addresses and Names
49 | TITLE:=ChinaDNS next generation, refactoring with epoll and ipset.
50 | URL:=https://github.com/zfl9/chinadns-ng
51 | DEPENDS:=@(aarch64||arm||i386||mips||mipsel||x86_64) @!(TARGET_x86_geode||TARGET_x86_legacy) +ipset
52 | endef
53 |
54 | define Build/Compile
55 | endef
56 |
57 | define Package/chinadns-ng/install
58 | $(INSTALL_DIR) $(1)/usr/bin
59 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/chinadns-ng $(1)/usr/bin
60 | endef
61 |
62 | $(eval $(call BuildPackage,chinadns-ng))
63 |
--------------------------------------------------------------------------------
/personal/curl/Config.in:
--------------------------------------------------------------------------------
1 | if PACKAGE_libcurl
2 |
3 | comment "SSL support"
4 |
5 | choice
6 | prompt "Selected SSL library"
7 | default LIBCURL_OPENSSL
8 |
9 | config LIBCURL_MBEDTLS
10 | bool "mbed TLS"
11 |
12 | config LIBCURL_WOLFSSL
13 | bool "wolfSSL"
14 |
15 | config LIBCURL_OPENSSL
16 | bool "OpenSSL"
17 |
18 | config LIBCURL_GNUTLS
19 | bool "GNUTLS"
20 |
21 | config LIBCURL_NOSSL
22 | bool "No SSL support"
23 |
24 | endchoice
25 |
26 | comment "Supported protocols"
27 |
28 | config LIBCURL_DICT
29 | bool "DICT protocol"
30 | default n
31 |
32 | config LIBCURL_FILE
33 | bool "FILE protocol"
34 | default y
35 |
36 | config LIBCURL_FTP
37 | bool "FTP / FTPS protocol"
38 | default y
39 |
40 | config LIBCURL_GOPHER
41 | bool "Gopher protocol"
42 | default n
43 |
44 | config LIBCURL_HTTP
45 | bool "HTTP / HTTPS protocol"
46 | default y
47 |
48 | config LIBCURL_COOKIES
49 | bool "Enable Cookies support"
50 | depends on LIBCURL_HTTP
51 | default y
52 |
53 | config LIBCURL_IMAP
54 | bool "IMAP / IMAPS protocol"
55 | default n
56 |
57 | config LIBCURL_LDAP
58 | bool "LDAP protocol"
59 | default n
60 |
61 | config LIBCURL_LDAPS
62 | bool "Enable LDAPS support"
63 | depends on LIBCURL_LDAP && !LIBCURL_NOSSL
64 | default y
65 |
66 | config LIBCURL_POP3
67 | bool "POP3 / POP3S protocol"
68 | default n
69 |
70 | config LIBCURL_RTSP
71 | bool "RTSP protocol"
72 | depends on LIBCURL_HTTP
73 | default n
74 | config LIBCURL_NO_RTSP
75 | string "RTSP require HTTP protocol"
76 | depends on !LIBCURL_HTTP
77 | default "!"
78 |
79 | config LIBCURL_SSH2
80 | bool "SCP / SFTP protocol"
81 | default n
82 |
83 | config LIBCURL_SMB
84 | bool "SMB protocol (CIFS)"
85 | depends on LIBCURL_CRYPTO_AUTH && (LIBCURL_GNUTLS || LIBCURL_OPENSSL)
86 | default n
87 | config LIBCURL_NO_SMB
88 | string "SMB require 'cryptographic authentication' and either 'GnuTLS' or 'OpenSSL'"
89 | depends on !LIBCURL_CRYPTO_AUTH || (!LIBCURL_GNUTLS && !LIBCURL_OPENSSL)
90 | default "!"
91 |
92 | config LIBCURL_SMTP
93 | bool "SMTP / SMTPS protocol"
94 | default n
95 |
96 | config LIBCURL_TELNET
97 | bool "TELNET protocol"
98 | default n
99 |
100 | config LIBCURL_TFTP
101 | bool "TFTP protocol"
102 | default n
103 |
104 | config LIBCURL_NGHTTP2
105 | bool "HTTP2 protocol"
106 | default y
107 |
108 | comment "Miscellaneous"
109 |
110 | config LIBCURL_PROXY
111 | bool "Enable proxy support"
112 | default y
113 |
114 | config LIBCURL_CRYPTO_AUTH
115 | bool "Enable cryptographic authentication"
116 | default n
117 |
118 | config LIBCURL_TLS_SRP
119 | bool "Enable TLS-SRP authentication"
120 | default n
121 |
122 | config LIBCURL_LIBIDN2
123 | bool "Enable IDN2 support"
124 | default n
125 |
126 | config LIBCURL_THREADED_RESOLVER
127 | bool "Enable threaded DNS resolver"
128 | default n
129 | help
130 | Enable POSIX threaded asynchronous DNS resolution
131 |
132 | config LIBCURL_ZLIB
133 | bool "Enable zlib support"
134 | default n
135 |
136 | config LIBCURL_ZSTD
137 | bool "Enable zstd support"
138 | default n
139 |
140 | config LIBCURL_UNIX_SOCKETS
141 | bool "Enable unix domain socket support"
142 | default y
143 | help
144 | Enable HTTP over unix domain sockets.
145 | To use this with the curl command line, you specify the socket path to the new --unix-domain option.
146 | This feature is actually not limited to HTTP, you can do all the TCP-based protocols
147 | except FTP over the unix domain socket, but it is only HTTP that is regularly used this way.
148 | The reason FTP isn't supported is of course its use of two connections
149 | which would be even weirder to do like this.
150 |
151 | config LIBCURL_LIBCURL_OPTION
152 | bool "Enable generation of C code"
153 | default n
154 |
155 | config LIBCURL_VERBOSE
156 | bool "Enable verbose error strings"
157 | default n
158 |
159 | config LIBCURL_NTLM
160 | bool "Enable NTLM support"
161 | depends on LIBCURL_CRYPTO_AUTH && !LIBCURL_NOSSL
162 | default n
163 |
164 | endif
165 |
--------------------------------------------------------------------------------
/personal/curl/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2007-2020 OpenWrt.org
3 | #
4 | # This is free software, licensed under the GNU General Public License v2.
5 | # See /LICENSE for more information.
6 | #
7 |
8 | include $(TOPDIR)/rules.mk
9 | include $(INCLUDE_DIR)/nls.mk
10 |
11 | PKG_NAME:=curl
12 | PKG_VERSION:=8.12.0
13 | PKG_RELEASE:=1
14 |
15 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 | PKG_SOURCE_URL:=https://github.com/curl/curl/releases/download/curl-$(subst .,_,$(PKG_VERSION))/ \
17 | https://dl.uxnr.de/mirror/curl/ \
18 | https://curl.askapache.com/download/ \
19 | https://curl.se/download/
20 | PKG_HASH:=5a85adbe401ed3b998ee1128524e9b045feb39577f3c336f6997e7a4afaafcd7
21 |
22 | PKG_LICENSE:=MIT
23 | PKG_LICENSE_FILES:=COPYING
24 | PKG_CPE_ID:=cpe:/a:haxx:libcurl
25 |
26 | PKG_FIXUP:=autoreconf
27 | PKG_INSTALL:=1
28 | PKG_BUILD_PARALLEL:=1
29 |
30 | PKG_CONFIG_DEPENDS:= \
31 | CONFIG_IPV6 \
32 | \
33 | CONFIG_LIBCURL_WOLFSSL \
34 | CONFIG_LIBCURL_GNUTLS \
35 | CONFIG_LIBCURL_OPENSSL \
36 | CONFIG_LIBCURL_MBEDTLS \
37 | CONFIG_LIBCURL_NOSSL \
38 | \
39 | CONFIG_LIBCURL_LIBIDN2 \
40 | CONFIG_LIBCURL_SSH2 \
41 | CONFIG_LIBCURL_ZLIB \
42 | CONFIG_LIBCURL_ZSTD \
43 | \
44 | CONFIG_LIBCURL_DICT \
45 | CONFIG_LIBCURL_FILE \
46 | CONFIG_LIBCURL_FTP \
47 | CONFIG_LIBCURL_GOPHER \
48 | CONFIG_LIBCURL_HTTP \
49 | CONFIG_LIBCURL_IMAP \
50 | CONFIG_LIBCURL_LDAP \
51 | CONFIG_LIBCURL_LDAPS \
52 | CONFIG_LIBCURL_POP3 \
53 | CONFIG_LIBCURL_RTSP \
54 | CONFIG_LIBCURL_NO_RTSP \
55 | CONFIG_LIBCURL_SMB \
56 | CONFIG_LIBCURL_NO_SMB \
57 | CONFIG_LIBCURL_SMTP \
58 | CONFIG_LIBCURL_TELNET \
59 | CONFIG_LIBCURL_TFTP \
60 | CONFIG_LIBCURL_NGHTTP2 \
61 | \
62 | CONFIG_LIBCURL_COOKIES \
63 | CONFIG_LIBCURL_CRYPTO_AUTH \
64 | CONFIG_LIBCURL_LIBCURL_OPTION \
65 | CONFIG_LIBCURL_PROXY \
66 | CONFIG_LIBCURL_THREADED_RESOLVER \
67 | CONFIG_LIBCURL_TLS_SRP \
68 | CONFIG_LIBCURL_UNIX_SOCKETS \
69 | CONFIG_LIBCURL_VERBOSE \
70 | CONFIG_LIBCURL_NTLM \
71 | $(if $(CONFIG_LIBCURL_OPENSSL), \
72 | CONFIG_OPENSSL_ENGINE \
73 | CONFIG_OPENSSL_WITH_COMPRESSION \
74 | CONFIG_OPENSSL_WITH_NPN)
75 |
76 | include $(INCLUDE_DIR)/package.mk
77 |
78 | define Package/curl/Default
79 | SECTION:=net
80 | CATEGORY:=Network
81 | URL:=http://curl.se/
82 | MAINTAINER:=Stan Grishin
83 | endef
84 |
85 | define Package/curl
86 | $(call Package/curl/Default)
87 | SUBMENU:=File Transfer
88 | DEPENDS:=+libcurl
89 | TITLE:=A client-side URL transfer utility
90 | endef
91 |
92 | define Package/libcurl
93 | $(call Package/curl/Default)
94 | SECTION:=libs
95 | CATEGORY:=Libraries
96 | DEPENDS:= +LIBCURL_WOLFSSL:libwolfssl +LIBCURL_OPENSSL:libopenssl +LIBCURL_GNUTLS:libgnutls +LIBCURL_MBEDTLS:libmbedtls
97 | DEPENDS += +LIBCURL_ZLIB:zlib +LIBCURL_ZSTD:libzstd +LIBCURL_THREADED_RESOLVER:libpthread +LIBCURL_LDAP:libopenldap
98 | DEPENDS += +LIBCURL_LIBIDN2:libidn2 +LIBCURL_SSH2:libssh2 +LIBCURL_NGHTTP2:libnghttp2 +ca-bundle
99 | TITLE:=A client-side URL transfer library
100 | MENU:=1
101 | ABI_VERSION:=4
102 | endef
103 |
104 | define Package/libcurl/config
105 | source "$(SOURCE)/Config.in"
106 | endef
107 |
108 | TARGET_CFLAGS += $(FPIC)
109 | TARGET_CPPFLAGS += $(if $(CONFIG_LIBCURL_NTLM),,-DCURL_DISABLE_NTLM)
110 | TARGET_LDFLAGS += -Wl,--gc-sections
111 |
112 | CONFIGURE_ARGS += \
113 | --disable-debug \
114 | --disable-ares \
115 | --enable-shared \
116 | --enable-static \
117 | --disable-manual \
118 | --without-nss \
119 | --without-librtmp \
120 | --without-ca-path \
121 | --without-libpsl \
122 | --without-zstd \
123 | --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
124 | \
125 | $(call autoconf_bool,CONFIG_IPV6,ipv6) \
126 | \
127 | $(if $(CONFIG_LIBCURL_WOLFSSL)$(CONFIG_LIBCURL_GNUTLS)$(CONFIG_LIBCURL_OPENSSL)$(CONFIG_LIBCURL_MBEDTLS),,--without-ssl) \
128 | $(if $(CONFIG_LIBCURL_WOLFSSL),--with-wolfssl="$(STAGING_DIR)/usr",--without-wolfssl) \
129 | $(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr",--without-gnutls) \
130 | $(if $(CONFIG_LIBCURL_OPENSSL),--with-openssl="$(STAGING_DIR)/usr",--without-openssl) \
131 | $(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr",--without-mbedtls) \
132 | \
133 | $(if $(CONFIG_LIBCURL_LIBIDN2),--with-libidn2="$(STAGING_DIR)/usr",--without-libidn2) \
134 | $(if $(CONFIG_LIBCURL_SSH2),--with-libssh2="$(STAGING_DIR)/usr",--without-libssh2) \
135 | $(if $(CONFIG_LIBCURL_ZLIB),--with-zlib="$(STAGING_DIR)/usr",--without-zlib) \
136 | $(if $(CONFIG_LIBCURL_ZSTD),--with-zstd="$(STAGING_DIR)/usr",--without-zstd) \
137 | $(if $(CONFIG_LIBCURL_NGHTTP2),--with-nghttp2="$(STAGING_DIR)/usr",--without-nghttp2) \
138 | \
139 | $(call autoconf_bool,CONFIG_LIBCURL_DICT,dict) \
140 | $(call autoconf_bool,CONFIG_LIBCURL_FILE,file) \
141 | $(call autoconf_bool,CONFIG_LIBCURL_FTP,ftp) \
142 | $(call autoconf_bool,CONFIG_LIBCURL_GOPHER,gopher) \
143 | $(call autoconf_bool,CONFIG_LIBCURL_HTTP,http) \
144 | $(call autoconf_bool,CONFIG_LIBCURL_IMAP,imap) \
145 | $(call autoconf_bool,CONFIG_LIBCURL_LDAP,ldap) \
146 | $(call autoconf_bool,CONFIG_LIBCURL_LDAPS,ldaps) \
147 | $(call autoconf_bool,CONFIG_LIBCURL_POP3,pop3) \
148 | $(call autoconf_bool,CONFIG_LIBCURL_RTSP,rtsp) \
149 | $(call autoconf_bool,CONFIG_LIBCURL_SMB,smb) \
150 | $(call autoconf_bool,CONFIG_LIBCURL_SMTP,smtp) \
151 | $(call autoconf_bool,CONFIG_LIBCURL_TELNET,telnet) \
152 | $(call autoconf_bool,CONFIG_LIBCURL_TFTP,tftp) \
153 | \
154 | $(call autoconf_bool,CONFIG_LIBCURL_COOKIES,cookies) \
155 | $(call autoconf_bool,CONFIG_LIBCURL_CRYPTO_AUTH,crypto-auth) \
156 | $(call autoconf_bool,CONFIG_LIBCURL_LIBCURL_OPTION,libcurl-option) \
157 | $(call autoconf_bool,CONFIG_LIBCURL_PROXY,proxy) \
158 | $(call autoconf_bool,CONFIG_LIBCURL_THREADED_RESOLVER,threaded-resolver) \
159 | $(call autoconf_bool,CONFIG_LIBCURL_TLS_SRP,tls-srp) \
160 | $(call autoconf_bool,CONFIG_LIBCURL_UNIX_SOCKETS,unix-sockets) \
161 | $(call autoconf_bool,CONFIG_LIBCURL_VERBOSE,verbose) \
162 |
163 | define Build/InstallDev
164 | $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
165 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
166 | $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
167 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
168 | $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
169 | $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/curl-config
170 | [ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libcurl.pc || true
171 | $(LN) $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
172 | endef
173 |
174 | define Package/curl/install
175 | $(INSTALL_DIR) $(1)/usr/bin
176 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
177 | endef
178 |
179 | define Package/libcurl/install
180 | $(INSTALL_DIR) $(1)/usr/lib
181 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
182 | endef
183 |
184 | $(eval $(call BuildPackage,libcurl))
185 | $(eval $(call BuildPackage,curl))
186 |
--------------------------------------------------------------------------------
/personal/curl/patches/200-no_docs_tests.patch:
--------------------------------------------------------------------------------
1 | --- a/Makefile.am
2 | +++ b/Makefile.am
3 | @@ -89,7 +89,7 @@ DISTCLEANFILES = buildinfo.txt
4 | bin_SCRIPTS = curl-config
5 |
6 | SUBDIRS = lib docs src scripts
7 | -DIST_SUBDIRS = $(SUBDIRS) tests packages include docs
8 | +DIST_SUBDIRS = $(SUBDIRS) packages include
9 |
10 | pkgconfigdir = $(libdir)/pkgconfig
11 | pkgconfig_DATA = libcurl.pc
12 | @@ -185,12 +185,9 @@ rpm:
13 | if BUILD_DOCS
14 | install-data-hook:
15 | (cd include && $(MAKE) install)
16 | - (cd docs && $(MAKE) install)
17 | - (cd docs/libcurl && $(MAKE) install)
18 | else
19 | install-data-hook:
20 | (cd include && $(MAKE) install)
21 | - (cd docs && $(MAKE) install)
22 | endif
23 |
24 | # We extend the standard uninstall with a custom hook:
25 |
--------------------------------------------------------------------------------
/personal/ddnsto/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2015-2016 OpenWrt.org
3 | # Copyright (C) 2020 jjm2473@gmail.com
4 | #
5 | # This is free software, licensed under the GNU General Public License v3.
6 | #
7 |
8 | include $(TOPDIR)/rules.mk
9 |
10 | PKG_ARCH_DDNSTO:=$(ARCH)
11 |
12 | PKG_NAME:=ddnsto
13 | PKG_VERSION:=3.0.4
14 | PKG_RELEASE:=$(PKG_ARCH_DDNSTO)-7
15 | PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
16 | PKG_SOURCE_URL:=https://github.com/Jejz168/OpenWrt/raw/refs/heads/main/personal/ddnsto/
17 | PKG_HASH:=486aa15a5e026b5a3aca72f1850746e127a7e86ef11db8a7c498dad29545eaf6
18 |
19 | PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)
20 |
21 | PKG_BUILD_PARALLEL:=1
22 | PKG_USE_MIPS16:=0
23 |
24 | include $(INCLUDE_DIR)/package.mk
25 |
26 | define Package/$(PKG_NAME)
27 | SECTION:=net
28 | CATEGORY:=Network
29 | SUBMENU:=Web Servers/Proxies
30 | TITLE:=DDNS.to - the reverse proxy
31 | DEPENDS:=
32 | PKGARCH:=all
33 | URL:=https://www.ddnsto.com/
34 | endef
35 |
36 | define Package/$(PKG_NAME)/description
37 | DDNS.to is a reverse proxy
38 | endef
39 |
40 | define Package/$(PKG_NAME)/conffiles
41 | /etc/config/ddnsto
42 | endef
43 |
44 | define Package/$(PKG_NAME)/postinst
45 | #!/bin/sh
46 | if [ -z "$${IPKG_INSTROOT}" ]; then
47 | [ -f /etc/uci-defaults/ddnsto ] && /etc/uci-defaults/ddnsto && rm -f /etc/uci-defaults/ddnsto
48 | exit 0
49 | fi
50 | endef
51 |
52 | define Build/Configure
53 | endef
54 |
55 | define Build/Compile
56 | endef
57 |
58 | define Package/$(PKG_NAME)/install
59 | $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(1)/etc/uci-defaults
60 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/ddnsto.$(PKG_ARCH_DDNSTO) $(1)/usr/sbin/ddnstod
61 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/ddwebdav.$(PKG_ARCH_DDNSTO) $(1)/usr/sbin/ddwebdav
62 | $(INSTALL_CONF) ./files/ddnsto.config $(1)/etc/config/ddnsto
63 | $(INSTALL_BIN) ./files/ddnsto.init $(1)/etc/init.d/ddnsto
64 | $(INSTALL_BIN) ./files/ddnsto.uci-default $(1)/etc/uci-defaults/ddnsto
65 | $(LN) /usr/sbin/ddnstod $(1)/usr/sbin/ddnsto
66 | endef
67 |
68 | $(eval $(call BuildPackage,$(PKG_NAME)))
69 |
--------------------------------------------------------------------------------
/personal/ddnsto/ddnsto-binary-3.0.4.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/ddnsto/ddnsto-binary-3.0.4.tar.gz
--------------------------------------------------------------------------------
/personal/files/aarch64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/files/aarch64
--------------------------------------------------------------------------------
/personal/files/arm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/files/arm
--------------------------------------------------------------------------------
/personal/files/x86_64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jejz168/OpenWrt/7b8ed1460419ace9fce4001a871705705fe789fc/personal/files/x86_64
--------------------------------------------------------------------------------
/personal/hysteria/Makefile:
--------------------------------------------------------------------------------
1 | # SPDX-License-Identifier: GPL-3.0-only
2 | #
3 | # Copyright (C) 2022 ImmortalWrt.org
4 |
5 | include $(TOPDIR)/rules.mk
6 |
7 | PKG_NAME:=hysteria
8 | PKG_VERSION:=1.3.5
9 | PKG_RELEASE:=1
10 |
11 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 | PKG_SOURCE_URL:=https://codeload.github.com/apernet/hysteria/tar.gz/v$(PKG_VERSION)?
13 | PKG_HASH:=9b3b5fca069d215a1f4c9cf3aa0a7b4e9b1fe21216fddb483a20ab42eb4a4dd7
14 |
15 | PKG_LICENSE:=MIT
16 | PKG_LICENSE_FILE:=LICENSE
17 | PKG_MAINTAINER:=Tianling Shen
18 |
19 | PKG_BUILD_DEPENDS:=golang/host
20 | PKG_BUILD_PARALLEL:=1
21 | PKG_USE_MIPS16:=0
22 |
23 | GO_PKG:=github.com/apernet/hysteria
24 | GO_PKG_BUILD_PKG:=$(GO_PKG)/app/cmd
25 | GO_PKG_LDFLAGS_X:=main.appVersion=$(PKG_VERSION)
26 |
27 | include $(INCLUDE_DIR)/package.mk
28 | include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
29 |
30 | define Package/hysteria
31 | SECTION:=net
32 | CATEGORY:=Network
33 | TITLE:=A feature-packed network utility optimized for networks of poor quality
34 | URL:=https://github.com/apernet/hysteria
35 | DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
36 | endef
37 |
38 | define Package/hysteria/description
39 | Hysteria is a feature-packed network utility optimized for networks
40 | of poor quality (e.g. satellite connections, congested public Wi-Fi,
41 | connecting from China to servers abroad) powered by a custom version
42 | of QUIC protocol.
43 | endef
44 |
45 | define Package/hysteria/install
46 | $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
47 |
48 | $(INSTALL_DIR) $(1)/usr/bin
49 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmd $(1)/usr/bin/hysteria
50 | endef
51 |
52 | $(eval $(call GoBinPackage,hysteria))
53 | $(eval $(call BuildPackage,hysteria))
54 |
--------------------------------------------------------------------------------
/personal/softethervpn5/Makefile:
--------------------------------------------------------------------------------
1 | # Based partially on the versions of el1n and Federico Di Marco
2 |
3 | include $(TOPDIR)/rules.mk
4 |
5 | PKG_NAME:=softethervpn5
6 | PKG_VERSION:=5.01.9674
7 | PKG_RELEASE:=1
8 |
9 | PKG_LICENSE:=GPL-2.0
10 | PKG_LICENSE_FILES:=COPYING
11 |
12 | PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN/releases/download/$(PKG_VERSION)/
13 | PKG_SOURCE:=softether-vpn-src-$(PKG_VERSION).tar.gz
14 | PKG_HASH:=c4dc53f4912605a25c18357b0a0bf6dc059286ca901cb981abdf1a22d1649ddc
15 |
16 | HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/SoftEtherVPN-$(PKG_VERSION)
17 | PKG_BUILD_DIR:=$(BUILD_DIR)/SoftEtherVPN-$(PKG_VERSION)
18 |
19 | HOST_BUILD_DEPENDS:=ncurses/host readline/host
20 | PKG_BUILD_DEPENDS:=softethervpn5/host
21 |
22 | include $(INCLUDE_DIR)/package.mk
23 | include $(INCLUDE_DIR)/host-build.mk
24 | include $(INCLUDE_DIR)/nls.mk
25 | include $(INCLUDE_DIR)/cmake.mk
26 |
27 | define Package/softethervpn5/Default
28 | SECTION:=net
29 | CATEGORY:=Network
30 | SUBMENU:=VPN
31 | TITLE:=softethervpn5 v$(PKG_VERSION)
32 | URL:=http://www.softether.org/
33 | endef
34 |
35 | define Package/softethervpn5/Default/description
36 | SoftEther VPN supports SSL-VPN, OpenVPN, L2TP, EtherIP, L2TPv3 and IPsec as a single VPN software.
37 | SoftEther VPN is not only an alternative VPN server to existing VPN products (OpenVPN, IPsec and MS-SSTP),
38 | but has also original strong SSL-VPN protocol to penetrate any kinds of firewalls.
39 | Guide: https://wordpress.tirlins.com/2015/03/setting-up-softether-vpn-on-openwrt/
40 | endef
41 |
42 | define Package/softethervpn5-libs
43 | $(call Package/softethervpn5/Default)
44 | DEPENDS:=+libpthread +librt +libreadline +libopenssl +libncurses +kmod-tun +zlib $(ICONV_DEPENDS)
45 | TITLE+= libs
46 | HIDDEN:=1
47 | endef
48 |
49 | define Package/softethervpn5-server
50 | $(call Package/softethervpn5/Default)
51 | TITLE+= server
52 | DEPENDS:= +softethervpn5-libs
53 | endef
54 | define Package/softethervpn5-server/description
55 | $(call Package/softethervpn5/Default/description)
56 |
57 | Provides the vpnserver (daemon).
58 | endef
59 |
60 | define Package/softethervpn5-bridge
61 | $(call Package/softethervpn5/Default)
62 | TITLE+= bridge
63 | DEPENDS:= +softethervpn5-libs
64 | endef
65 | define Package/softethervpn5-bridge/description
66 | $(call Package/softethervpn5/Default/description)
67 |
68 | Provides the vpnbridge (daemon).
69 | endef
70 |
71 | define Package/softethervpn5-client
72 | $(call Package/softethervpn5/Default)
73 | TITLE+= client
74 | DEPENDS:= +softethervpn5-libs
75 | endef
76 | define Package/softethervpn5-client/description
77 | $(call Package/softethervpn5/Default/description)
78 |
79 | Provides the vpnclient.
80 | endef
81 |
82 | export USE_MUSL=YES
83 | # BUG: outdated host/include/elf.h
84 | HOST_CFLAGS += $(FPIC) -DAT_HWCAP2=26
85 | TARGET_CFLAGS += $(FPIC)
86 | CMAKE_OPTIONS += -DICONV_LIB_PATH="$(ICONV_PREFIX)/lib"
87 |
88 | # static build for host (hamcorebuilder), avoid -fpic on ncurses/host and shared libs can't be found on host
89 | define Host/Prepare
90 | $(Host/Prepare/Default)
91 | $(SED) 's,SHARED,STATIC,g' $(HOST_BUILD_DIR)/src/Mayaqua/CMakeLists.txt
92 | $(SED) 's,SHARED,STATIC,g' $(HOST_BUILD_DIR)/src/Cedar/CMakeLists.txt
93 | $(SED) 's,readline,libreadline.a,g' $(HOST_BUILD_DIR)/src/Cedar/CMakeLists.txt
94 | endef
95 |
96 | define Host/Compile
97 | $(call Host/Compile/Default,hamcorebuilder)
98 | endef
99 |
100 | define Host/Install
101 | $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
102 | $(INSTALL_BIN) $(HOST_BUILD_DIR)/tmp/hamcorebuilder $(STAGING_DIR_HOSTPKG)/bin/
103 | endef
104 |
105 | define Build/Compile
106 | $(call Build/Compile/Default,vpnserver vpnbridge vpnclient vpncmd hamcore-archive-build)
107 | endef
108 |
109 | define Build/Install
110 | endef
111 |
112 | define Package/softethervpn5-libs/install
113 | $(INSTALL_DIR) $(1)/usr/lib
114 | $(CP) $(PKG_BUILD_DIR)/build/libcedar.so $(1)/usr/lib/
115 | $(CP) $(PKG_BUILD_DIR)/build/libmayaqua.so $(1)/usr/lib/
116 | $(INSTALL_DIR) $(1)/usr/libexec/softethervpn
117 | $(CP) $(PKG_BUILD_DIR)/build/hamcore.se2 $(1)/usr/libexec/softethervpn/
118 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vpncmd $(1)/usr/libexec/softethervpn/
119 | $(INSTALL_BIN) files/launcher.sh $(1)/usr/libexec/softethervpn/
120 | $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/lang.config
121 | $(INSTALL_DIR) $(1)/usr/bin
122 | $(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpncmd
123 | endef
124 |
125 | define Package/softethervpn5-server/install
126 | $(INSTALL_DIR) $(1)/usr/libexec/softethervpn
127 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vpnserver $(1)/usr/libexec/softethervpn/
128 | $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_server.config
129 | $(INSTALL_DIR) $(1)/etc/init.d
130 | $(INSTALL_BIN) files/vpnserver.init $(1)/etc/init.d/softethervpnserver
131 | endef
132 |
133 | define Package/softethervpn5-bridge/install
134 | $(INSTALL_DIR) $(1)/usr/libexec/softethervpn
135 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vpnbridge $(1)/usr/libexec/softethervpn/
136 | $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_bridge.config
137 | $(INSTALL_DIR) $(1)/etc/init.d
138 | $(INSTALL_BIN) files/vpnbridge.init $(1)/etc/init.d/softethervpnbridge
139 | endef
140 |
141 | define Package/softethervpn5-client/install
142 | $(INSTALL_DIR) $(1)/usr/libexec/softethervpn
143 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vpnclient $(1)/usr/libexec/softethervpn/
144 | $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_client.config
145 | $(INSTALL_DIR) $(1)/etc/init.d
146 | $(INSTALL_BIN) files/vpnclient.init $(1)/etc/init.d/softethervpnclient
147 | endef
148 |
149 | define Package/softethervpn5-server/conffiles
150 | /usr/libexec/softethervpn/vpn_server.config
151 | /usr/libexec/softethervpn/lang.config
152 | endef
153 |
154 | define Package/softethervpn5-bridge/conffiles
155 | /usr/libexec/softethervpn/vpn_bridge.config
156 | /usr/libexec/softethervpn/lang.config
157 | endef
158 |
159 | define Package/softethervpn5-client/conffiles
160 | /usr/libexec/softethervpn/vpn_client.config
161 | /usr/libexec/softethervpn/lang.config
162 | endef
163 |
164 | $(eval $(call HostBuild))
165 | $(eval $(call BuildPackage,softethervpn5-libs))
166 | $(eval $(call BuildPackage,softethervpn5-server))
167 | $(eval $(call BuildPackage,softethervpn5-bridge))
168 | $(eval $(call BuildPackage,softethervpn5-client))
169 |
--------------------------------------------------------------------------------
/personal/softethervpn5/files/dummy:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/personal/softethervpn5/files/launcher.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | exec "/usr/libexec/softethervpn/${0##*/}" "$@"
3 |
--------------------------------------------------------------------------------
/personal/softethervpn5/files/vpnbridge.init:
--------------------------------------------------------------------------------
1 | #!/bin/sh /etc/rc.common
2 |
3 | START=90
4 | USE_PROCD=1
5 |
6 | start_service(){
7 | logger -t 'softethervpn5' "Starting softether bridge service."
8 |
9 | [ -d /var/softethervpn ] || mkdir -p -m 0775 /var/softethervpn
10 |
11 | [ -f /var/softethervpn/hamcore.se2 ] || ln -sf /usr/libexec/softethervpn/hamcore.se2 /var/softethervpn/
12 | [ -f /var/softethervpn/lang.config ] || ln -sf /usr/libexec/softethervpn/lang.config /var/softethervpn/
13 |
14 | [ -f /var/softethervpn/vpnbridge ] || ln -sf /usr/libexec/softethervpn/vpnbridge /var/softethervpn/
15 | [ -f /var/softethervpn/vpn_bridge.config ] || ln -sf /usr/libexec/softethervpn/vpn_bridge.config /var/softethervpn/
16 |
17 | procd_open_instance
18 | procd_set_param env LANG=en_US.UTF-8
19 | procd_set_param command /var/softethervpn/vpnbridge start --foreground
20 | procd_set_param respawn
21 | procd_close_instance
22 | }
23 |
--------------------------------------------------------------------------------
/personal/softethervpn5/files/vpnclient.init:
--------------------------------------------------------------------------------
1 | #!/bin/sh /etc/rc.common
2 |
3 | START=92
4 | USE_PROCD=1
5 |
6 | start_service(){
7 | logger -t 'softethervpn5' "Starting softether client service."
8 |
9 | [ -d /var/softethervpn ] || mkdir -p -m 0775 /var/softethervpn
10 |
11 | [ -f /var/softethervpn/hamcore.se2 ] || ln -sf /usr/libexec/softethervpn/hamcore.se2 /var/softethervpn/
12 | [ -f /var/softethervpn/lang.config ] || ln -sf /usr/libexec/softethervpn/lang.config /var/softethervpn/
13 |
14 | [ -f /var/softethervpn/vpnclient ] || ln -sf /usr/libexec/softethervpn/vpnclient /var/softethervpn/
15 | [ -f /var/softethervpn/vpn_client.config ] || ln -sf /usr/libexec/softethervpn/vpn_client.config /var/softethervpn/
16 |
17 | procd_open_instance
18 | procd_set_param env LANG=en_US.UTF-8
19 | procd_set_param command /var/softethervpn/vpnclient start --foreground
20 | procd_set_param respawn
21 | procd_close_instance
22 | }
23 |
--------------------------------------------------------------------------------
/personal/softethervpn5/files/vpnserver.init:
--------------------------------------------------------------------------------
1 | #!/bin/sh /etc/rc.common
2 |
3 | START=91
4 | USE_PROCD=1
5 |
6 | start_service(){
7 | logger -t 'softethervpn5' "Starting softether vpnserver service."
8 |
9 | [ -d /var/softethervpn ] || mkdir -p -m 0775 /var/softethervpn
10 |
11 | [ -f /var/softethervpn/hamcore.se2 ] || ln -sf /usr/libexec/softethervpn/hamcore.se2 /var/softethervpn/
12 | [ -f /var/softethervpn/lang.config ] || ln -sf /usr/libexec/softethervpn/lang.config /var/softethervpn/
13 |
14 | [ -f /var/softethervpn/vpnserver ] || ln -sf /usr/libexec/softethervpn/vpnserver /var/softethervpn/
15 | [ -f /var/softethervpn/vpn_server.config ] || ln -sf /usr/libexec/softethervpn/vpn_server.config /var/softethervpn/
16 |
17 | procd_open_instance
18 | procd_set_param env LANG=en_US.UTF-8
19 | procd_set_param command /var/softethervpn/vpnserver start --foreground
20 | procd_set_param respawn
21 | procd_close_instance
22 | }
23 |
--------------------------------------------------------------------------------
/personal/softethervpn5/patches/001-iconv-defines-fix.patch:
--------------------------------------------------------------------------------
1 | --- a/src/Mayaqua/Mayaqua.h
2 | +++ b/src/Mayaqua/Mayaqua.h
3 | @@ -184,7 +184,7 @@ int PASCAL WinMain(HINSTANCE hInst, HINS
4 | #include
5 | #endif // MAYAQUA_SUPPORTS_GETIFADDRS
6 |
7 | -#ifdef UNIX_LINUX
8 | +#if 0
9 | typedef void *iconv_t;
10 | iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
11 | size_t iconv (iconv_t __cd, char **__restrict __inbuf,
12 |
--------------------------------------------------------------------------------
/personal/softethervpn5/patches/002-iconv-cmake-fix.patch:
--------------------------------------------------------------------------------
1 | --- a/src/Mayaqua/CMakeLists.txt
2 | +++ b/src/Mayaqua/CMakeLists.txt
3 | @@ -59,7 +59,7 @@ if(UNIX)
4 | find_package(ZLIB REQUIRED)
5 |
6 | # In some cases libiconv is not included in libc
7 | - find_library(LIB_ICONV iconv)
8 | + find_library(LIB_ICONV iconv HINTS "${ICONV_LIB_PATH}")
9 |
10 | find_library(LIB_RT rt)
11 |
12 |
--------------------------------------------------------------------------------
/personal/softethervpn5/patches/100-increase-cfg-save-intervall.patch:
--------------------------------------------------------------------------------
1 | --- a/src/Cedar/Server.h
2 | +++ b/src/Cedar/Server.h
3 | @@ -32,10 +32,10 @@ extern char *SERVER_CONFIG_FILE_NAME;
4 | #define SERVER_CONTROL_TCP_TIMEOUT (60 * 1000)
5 | #define SERVER_FARM_CONTROL_INTERVAL (10 * 1000)
6 |
7 | -#define SERVER_FILE_SAVE_INTERVAL_DEFAULT (5 * 60 * 1000)
8 | -#define SERVER_FILE_SAVE_INTERVAL_MIN (5 * 1000)
9 | -#define SERVER_FILE_SAVE_INTERVAL_MAX (3600 * 1000)
10 | -#define SERVER_FILE_SAVE_INTERVAL_USERMODE (1 * 60 * 1000)
11 | +#define SERVER_FILE_SAVE_INTERVAL_DEFAULT (24 * 60 * 60 * 1000)
12 | +#define SERVER_FILE_SAVE_INTERVAL_MIN (5 * 60 * 1000)
13 | +#define SERVER_FILE_SAVE_INTERVAL_MAX (7 * 24 * 60 * 60 * 1000)
14 | +#define SERVER_FILE_SAVE_INTERVAL_USERMODE (5 * 60 * 1000)
15 |
16 | #define SERVER_LICENSE_VIOLATION_SPAN (SERVER_FARM_CONTROL_INTERVAL * 2)
17 |
18 |
--------------------------------------------------------------------------------
/personal/softethervpn5/patches/101-add-config-write-syslog.patch:
--------------------------------------------------------------------------------
1 | --- a/src/Cedar/Server.c
2 | +++ b/src/Cedar/Server.c
3 | @@ -4,7 +4,7 @@
4 |
5 | // Server.c
6 | // VPN Server module
7 | -
8 | +#include
9 | #include "CedarPch.h"
10 |
11 | static SERVER *server = NULL;
12 | @@ -6492,6 +6492,10 @@ UINT SiWriteConfigurationFile(SERVER *s)
13 | {
14 | return 0;
15 | }
16 | +
17 | + openlog("softethervpn-server", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_DAEMON);
18 | + syslog(LOG_NOTICE, "Writing vpn_server.config (AutoSaveConfigSpan set to < %d > seconds)", (s->AutoSaveConfigSpan / 1000));
19 | + closelog();
20 |
21 | Lock(s->SaveCfgLock);
22 | {
23 |
--------------------------------------------------------------------------------
/personal/softethervpn5/patches/150_remove-restriction.patch:
--------------------------------------------------------------------------------
1 | --- a/src/Cedar/Server.c 2020-04-30 16:48:22.000000000 +0800
2 | +++ b/src/Cedar/Server.c 2022-08-12 15:08:36.000000000 +0800
3 | @@ -10624,6 +10624,7 @@
4 | //
5 | bool SiIsEnterpriseFunctionsRestrictedOnOpenSource(CEDAR *c)
6 | {
7 | + return false;
8 | char region[128];
9 | bool ret = false;
10 | // Validate arguments
11 |
--------------------------------------------------------------------------------
/personal/softethervpn5/patches/151-fix-openvpn-static-route-push.patch:
--------------------------------------------------------------------------------
1 | --- a/src/Cedar/Proto_OpenVPN.c 2020-04-30 16:48:22.000000000 +0800
2 | +++ b/src/Cedar/Proto_OpenVPN.c 2022-08-12 15:12:00.000000000 +0800
3 | @@ -2436,8 +2436,8 @@
4 | if (r->Exists)
5 | {
6 | Format(l3_options, sizeof(l3_options),
7 | - ",route %r %r vpn_gateway",
8 | - &r->Network, &r->SubnetMask);
9 | + ",route %r %r %r",
10 | + &r->Network, &r->SubnetMask, &r->Gateway);
11 |
12 | StrCat(option_str, sizeof(option_str), l3_options);
13 | }
14 |
--------------------------------------------------------------------------------