-
Notifications
You must be signed in to change notification settings - Fork 17
454 lines (359 loc) · 20.1 KB
/
K2P-32m+512m+usb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
name: K2P-32m-512m-usb
on:
workflow_dispatch:
#设置仓库的读写权限
permissions:
contents: write
env:
TZ: Asia/Shanghai
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get -y install unzip libtool-bin curl cmake gperf gawk flex bison nano xxd fakeroot \
cpio git python-docutils gettext automake autopoint texinfo build-essential help2man \
pkg-config zlib1g-dev libgmp3-dev libmpc-dev libmpfr-dev libncurses5-dev libltdl-dev wget
sudo timedatectl set-timezone Asia/Shanghai
- name: Install UPX
uses: crazy-max/ghaction-upx@v3
with:
version: latest
install-only: true
- name: Clone source code
env:
KERNEL: 3.4
run: |
git clone --depth=1 https://github.com/${GITHUB_REPOSITORY}.git /opt/rt-n56u
cd /opt/rt-n56u/toolchain-mipsel
sh dl_toolchain.sh
mkdir -p /opt/images/
##### 修改内存空间和 storage空间17m
sed -i 's/0x200000/0x1100000/g' /opt/rt-n56u/trunk/configs/boards/K2P-USB/kernel-3.4.x-5.0.config
sed -i 's/size_etc="6M"/size_etc="17M"/g' /opt/rt-n56u/trunk/user/scripts/dev_init.sh
sed -i 's/size_tmp="24M"/size_tmp="120M"/g' /opt/rt-n56u/trunk/user/scripts/dev_init.sh
sed -i 's/mtd_part_size=65536/mtd_part_size=17825792/g' /opt/rt-n56u/trunk/user/scripts/mtd_storage.sh
- name: Build Firmware
env:
TNAME: K2P-USB
KERNEL: 3.4
run: |
cd /opt/rt-n56u/trunk
if [ ! -f configs/templates/$TNAME.config ] ; then
echo "configs/templates/$TNAME.config 没有找到 "
exit 1
fi
cp -f configs/templates/$TNAME.config .config
sed -i 's/CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=n/CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=y/g' .config
################################################################################################
### 清除默认配置###
sed -i '/CONFIG_FIRMWARE_ENABLE_IPV6/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_USB/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_UFSD/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_FAT/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_EXFAT/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_EXT2/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_EXT3/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_EXT4/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_XFS/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_FUSE/d' .config
sed -i '/CONFIG_FIRMWARE_ENABLE_SWAP/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_UVC/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_HID/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SERIAL/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_AUDIO/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_XFRM/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_QOS/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_IMQ/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_IFB/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_IPSET/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_NFSD/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_NFSC/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_CIFS/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_NTFS_3G/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_LPRD/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_U2EC/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_TCPDUMP/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_HDPARM/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_PARTED/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SMBD/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SMBD36/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_WINS/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SMBD_SYSLOG/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_FTPD/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_RPL2TP/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_EAP_PEAP/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_DDNS_SSL/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_HTTPS/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SFTP/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_DROPBEAR/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_DROPBEAR_FAST_CODE/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_OPENSSH/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_OPENVPN/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SSWAN/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_OPENSSL_EC/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_XUPNPD/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_MINIDLNA/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_FIREFLY/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_FFMPEG_NEW/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_TRANSMISSION/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_TRANSMISSION_WEB_CONTROL/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_ARIA/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_ARIA_WEB_CONTROL/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_CURL/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_GDUT_DRCOM/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_DOGCOM/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_MINIEAP/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_NJIT_CLIENT/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_NAPT66/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SSSERVER/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_SERVER/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CLIENT/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CMD/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_VLMCSD/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_TTYD/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_LRZSZ/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_HTOP/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_NANO/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_IPERF3/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_DUMP1090/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_RTL_SDR/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_MTR/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SOCAT/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SRELAY/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_MENTOHUST/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_FRPC/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_FRPS/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_TUNSAFE/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_WIREGUARD/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_ZEROTIER/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_ALIDDNS/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_V2RAY/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_XRAY/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_TROJAN/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_SSOBFS/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_NPC/d' .config
sed -i '/CONFIG_FIRMWARE_WEBUI_HIDE_VPN/d' .config
sed -i '/CONFIG_FIRMWARE_INCLUDE_OPENVPN/d' .config
# 清除默认配置结束
######################################################################
#以下选项是定义你需要的功能,(y=集成,n=忽略),重新写入到.config文件
######################################################################
##系统组件
#启用 IPv6 支持
echo "CONFIG_FIRMWARE_ENABLE_IPV6=y" >> .config
#启用 USB 支持
echo "CONFIG_FIRMWARE_ENABLE_USB=y" >> .config
#通过 Paragon 的 "ufsd" 驱动启用 NTFS 文件系统支持。约 0.4MB
echo "CONFIG_FIRMWARE_ENABLE_UFSD=y" >> .config
#启用 FAT/FAT32 文件系统支持。约 0.1MB
echo "CONFIG_FIRMWARE_ENABLE_FAT=y" >> .config
#启用 exFAT(同时支持 FAT/FAT32)文件系统支持。约 0.12MB
echo "CONFIG_FIRMWARE_ENABLE_EXFAT=y" >> .config
#启用 EXT2 文件系统支持。约 0.1MB
echo "CONFIG_FIRMWARE_ENABLE_EXT2=y" >> .config
#启用 EXT3 文件系统支持。约 0.2MB
echo "CONFIG_FIRMWARE_ENABLE_EXT3=y" >> .config
#启用 EXT4(同时支持 EXT3/EXT2)文件系统支持。约 0.4MB
echo "CONFIG_FIRMWARE_ENABLE_EXT4=y" >> .config
##启用 XFS 文件系统支持。约 0.6MB
echo "CONFIG_FIRMWARE_ENABLE_XFS=n" >> .config
##启用 FUSE(用户空间文件系统)支持。约 0.1MB
echo "CONFIG_FIRMWARE_ENABLE_FUSE=y" >> .config
##启用交换文件/分区支持。约 0.05MB
echo "CONFIG_FIRMWARE_ENABLE_SWAP=y" >> .config
##包含 UVC 摄像头模块。约 0.2MB
echo "CONFIG_FIRMWARE_INCLUDE_UVC=n" >> .config
##包含 USB-HID 模块。约 0.2MB
echo "CONFIG_FIRMWARE_INCLUDE_HID=y" >> .config
##包含 USB-Serial 模块(例如 pl2303)。约 0.03MB
echo "CONFIG_FIRMWARE_INCLUDE_SERIAL=y" >> .config
##包含 USB-Audio 模块。约 0.46MB
echo "CONFIG_FIRMWARE_INCLUDE_AUDIO=n" >> .config
##包含 XFRM(IPsec)模块及 iptables 扩展。约 0.2MB
echo "CONFIG_FIRMWARE_INCLUDE_XFRM=y" >> .config
##包含网络 QoS 调度模块。约 0.2MB
echo "CONFIG_FIRMWARE_INCLUDE_QOS=y" >> .config
## 包含用于流量整形的 IMQ 模块(会略微降低性能)。约 0.02MB
echo "CONFIG_FIRMWARE_INCLUDE_IMQ=y" >> .config
##包含用于流量整形的 IFB 模块。约 0.03MB
echo "CONFIG_FIRMWARE_INCLUDE_IFB=y" >> .config
##包含 IPSet 工具和内核模块。约 0.4MB
#echo "CONFIG_FIRMWARE_INCLUDE_IPSET=y" >> .config
##包含 NFSv3 服务器。约 0.6MB 已删除 /trunk/user/httpd/common.h
echo "CONFIG_FIRMWARE_INCLUDE_NFSD=n" >> .config
## 包含 CIFS(SMB)客户端。约 0.2MB
echo "CONFIG_FIRMWARE_INCLUDE_CIFS=y" >> .config
##包含 NTFS-3G FUSE 驱动(替代 Paragon 的 "ufsd" 驱动)。约 0.4MB
echo "CONFIG_FIRMWARE_INCLUDE_NTFS_3G=n" >> .config
##包含 LPR 打印机守护程序。约 0.12MB
echo "CONFIG_FIRMWARE_INCLUDE_LPRD=y" >> .config
##包含 USB-over-Ethernet 打印机守护程序。约 0.05MB
echo "CONFIG_FIRMWARE_INCLUDE_U2EC=y" >> .config
##包含 "tcpdump" 工具。约 0.6MB
echo "CONFIG_FIRMWARE_INCLUDE_TCPDUMP=y" >> .config
## 包含 "hdparm" 工具(允许设置硬盘节能超时时间和 APM)。约 0.1MB
echo "CONFIG_FIRMWARE_INCLUDE_HDPARM=y" >> .config
##包含 "parted" 工具(允许创建 GPT 分区)。约 0.3MB
echo "CONFIG_FIRMWARE_INCLUDE_PARTED=y" >> .config
##包含 SMB(和 WINS)服务器。约 1.5MB
echo "CONFIG_FIRMWARE_INCLUDE_SMBD=y" >> .config
##使用 samba3.6 替代 samba3
echo "CONFIG_FIRMWARE_INCLUDE_SMBD36=y" >> .config
##包含 SMB 和 WINS 服务器的日志功能。约 0.3MB
echo "CONFIG_FIRMWARE_INCLUDE_SMBD_SYSLOG=n" >> .config
##包含 FTP 服务器。约 0.2MB
echo "CONFIG_FIRMWARE_INCLUDE_FTPD=y" >> .config
##包含替代的 L2TP 控制客户端 RP-L2TP。约 0.1MB
echo "CONFIG_FIRMWARE_INCLUDE_RPL2TP=n" >> .config
##包含 EAP-TTLS 和 EAP-PEAP 认证支持。openssl 约 1.2MB,wpa_supplicant 约 0.04MB
echo "CONFIG_FIRMWARE_INCLUDE_EAP_PEAP=y" >> .config
##为 DDNS 客户端包含 HTTPS 支持。openssl 约 1.2MB
echo "CONFIG_FIRMWARE_INCLUDE_DDNS_SSL=y" >> .config
##包含 HTTPS 支持。openssl 约 1.2MB
echo "CONFIG_FIRMWARE_INCLUDE_HTTPS=y" >> .config
##包含 sftp 服务器。openssl 约 1.2MB,sftp-server 约 0.06MB
echo "CONFIG_FIRMWARE_INCLUDE_SFTP=y" >> .config
##包含 dropbear SSH。约 0.3MB
echo "CONFIG_FIRMWARE_INCLUDE_DROPBEAR=y" >> .config
## 加速 dropbear 的对称加密和哈希运算。约 0.06MB
echo "CONFIG_FIRMWARE_INCLUDE_DROPBEAR_FAST_CODE=y" >> .config
##使用 OpenSSH 替代 dropbear。openssl 约 1.2MB,openssh 约 1.0MB
echo "CONFIG_FIRMWARE_INCLUDE_OPENSSH=y" >> .config
##包含 StrongSwan。XFRM 模块约 0.2MB,strongswan 约 0.7MB
echo "CONFIG_FIRMWARE_INCLUDE_SSWAN=n" >> .config
##为 openssl 库添加椭圆曲线(EC)支持。约 0.1MB
echo "CONFIG_FIRMWARE_INCLUDE_OPENSSL_EC=y" >> .config
##包含 "openssl" 可执行程序,用于生成证书。约 0.4MB
echo "CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=y" >> .config
##包含 xUPNPd IPTV 媒体服务器。约 0.3MB
echo "CONFIG_FIRMWARE_INCLUDE_XUPNPD=y" >> .config
##包含 Minidlna UPnP 媒体服务器。约 1.6MB
echo "CONFIG_FIRMWARE_INCLUDE_MINIDLNA=n" >> .config
##包含 Firefly iTunes 媒体服务器。约 1.0MB
echo "CONFIG_FIRMWARE_INCLUDE_FIREFLY=n" >> .config
##为 Minidlna 和 Firefly 包含 ffmpeg 0.11.x(替代 0.6.x)。约 0.1MB
echo "CONFIG_FIRMWARE_INCLUDE_FFMPEG_NEW=y" >> .config
##包含 Transmission 种子下载工具。openssl 约 1.2MB,transmission 约 1.5MB 已删除 /trunk/user/httpd/common.h
echo "CONFIG_FIRMWARE_INCLUDE_TRANSMISSION=n" >> .config
##包含 Transmission-Web-Control(高级 WebUI)。约 0.8MB 已删除 /trunk/user/httpd/common.h
echo "CONFIG_FIRMWARE_INCLUDE_TRANSMISSION_WEB_CONTROL=n" >> .config
##包含 Aria2 下载管理器。openssl 约 1.2MB,aria2 约 3.5MB
echo "CONFIG_FIRMWARE_INCLUDE_ARIA=y" >> .config
##包含 Aria2 WEB 控制界面。约 0.7MB。
echo "CONFIG_FIRMWARE_INCLUDE_ARIA_WEB_CONTROL=y" >> .config
##下载工具 curl 必备
echo "CONFIG_FIRMWARE_INCLUDE_CURL=y" >> .config
##校园网 已删除 /trunk/user/httpd/common.h
echo "CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT=n" >> .config
## OpenVPN。需要 IPv6 支持。openssl 约 1.2MB,openvpn 约 0.4MB
echo "CONFIG_FIRMWARE_INCLUDE_OPENVPN=y" >> .config
## 广东工业校园认证
echo "CONFIG_FIRMWARE_INCLUDE_GDUT_DRCOM=n" >> .config
## 哆点校园认证
echo "CONFIG_FIRMWARE_INCLUDE_DOGCOM=n" >> .config
## 锐捷认证
echo "CONFIG_FIRMWARE_INCLUDE_MINIEAP=n" >> .config
## 南京校园?
echo "CONFIG_FIRMWARE_INCLUDE_NJIT_CLIENT=n" >> .config
## IPV6中继
echo "CONFIG_FIRMWARE_INCLUDE_NAPT66=y" >> .config
## ss服务器
echo "CONFIG_FIRMWARE_INCLUDE_SSSERVER=n" >> .config
## SOFTETHERVPN服务器
echo "CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_SERVER=n" >> .config
## SOFTETHERVPN客户端
echo "CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CLIENT=n" >> .config
## SOFTETHERVPN
echo "CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CMD=n" >> .config
## DNS转发 已删除 /trunk/user/httpd/common.h
echo "CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER=n" >> .config
## KMS服务器 已删除 /trunk/user/httpd/common.h
echo "CONFIG_FIRMWARE_INCLUDE_VLMCSD=n" >> .config
## TTYD
echo "CONFIG_FIRMWARE_INCLUDE_TTYD=y" >> .config
## 文件传输工具
echo "CONFIG_FIRMWARE_INCLUDE_LRZSZ=y" >> .config
## 系统状态监控工具
echo "CONFIG_FIRMWARE_INCLUDE_HTOP=y" >> .config
## 文本编辑器
echo "CONFIG_FIRMWARE_INCLUDE_NANO=y" >> .config
## iperf3测速软件
echo "CONFIG_FIRMWARE_INCLUDE_IPERF3=y" >> .config
## DUMP1090
echo "CONFIG_FIRMWARE_INCLUDE_DUMP1090=y" >> .config
## RTL_SDR
echo "CONFIG_FIRMWARE_INCLUDE_RTL_SDR=y" >> .config
## MTR
echo "CONFIG_FIRMWARE_INCLUDE_MTR=y" >> .config
## ipv6端口转发工具
echo "CONFIG_FIRMWARE_INCLUDE_SOCAT=y" >> .config
## SRELAY代理
echo "CONFIG_FIRMWARE_INCLUDE_SRELAY=n" >> .config
## MENTOHUST校园认证 已删除 /trunk/user/httpd/common.h
echo "CONFIG_FIRMWARE_INCLUDE_MENTOHUST=n" >> .config
##################################
echo "CONFIG_FIRMWARE_INCLUDE_FRPC=y" >> .config ## FRPC 客户端 约8k
echo "CONFIG_FIRMWARE_INCLUDE_FRPS=y" >> .config ## FRPS 服务端 约8k
echo "CONFIG_FIRMWARE_INCLUDE_WIREGUARD=y" >> .config ## wireguard 约1M
echo "CONFIG_FIRMWARE_INCLUDE_TUNSAFE=y" >> .config ## tunsafe(wireguard的TCP方式)
echo "CONFIG_FIRMWARE_INCLUDE_ZEROTIER=y" >> .config ## zerotier 约 20k
echo "CONFIG_FIRMWARE_INCLUDE_ALIDDNS=y" >> .config #阿里DDNS ~20k
echo "CONFIG_FIRMWARE_INCLUDE_DDNSTO=n" >> .config #ddnsto 约800k 已删除 /trunk/user/httpd/common.h
echo "CONFIG_FIRMWARE_INCLUDE_TAILSCALE=y" >> .config #tailscale 约20k
echo "CONFIG_FIRMWARE_INCLUDE_NATPIERCE=y" >> .config #皎月连 约20k
echo "CONFIG_FIRMWARE_INCLUDE_VNTCLI=y" >> .config #vnt客户端 约80k
echo "CONFIG_FIRMWARE_INCLUDE_VNTS=y" >> .config #vnt服务端 约50k
echo "CONFIG_FIRMWARE_INCLUDE_CLOUDFLARED=y" >> .config #CF的隧道 约50k
echo "CONFIG_FIRMWARE_INCLUDE_LUCKY=y" >> .config #LUCKY 约50k
echo "CONFIG_FIRMWARE_INCLUDE_CLOUDFLARE=y" >> .config #CF-ddns 约50k
echo "CONFIG_FIRMWARE_INCLUDE_ALIST=y" >> .config #ALIST文件列表 约80k
echo "CONFIG_FIRMWARE_INCLUDE_WXSEND=y" >> .config #微信推送 约50k
echo "CONFIG_FIRMWARE_INCLUDE_UUPLUGIN=y" >> .config #网易UU加速器 约50k
echo "CONFIG_FIRMWARE_INCLUDE_ALDRIVER=y" >> .config #阿里云盘 约50k
echo "CONFIG_FIRMWARE_INCLUDE_WYY=y" >> .config #网易云解锁 约80k
echo "CONFIG_FIRMWARE_INCLUDE_CADDY=y" >> .config #在线文件管理服务不占空间(4.0kb左右)
echo "CONFIG_FIRMWARE_INCLUDE_SMARTDNS=y" >> .config #smartdns
echo "CONFIG_FIRMWARE_INCLUDE_ADGUARDHOME=y" >> .config #adguardhome不占空间(7.2kb左右)
echo "CONFIG_FIRMWARE_INCLUDE_NETCAT=y" >> .config #nc工具
echo "CONFIG_FIRMWARE_INCLUDE_MSD_LITE=y" >> .config #MSD_LITE工具
# 已删除 /trunk/user/httpd/common.h
#echo "CONFIG_FIRMWARE_INCLUDE_FIREFLY=n" >> .config #FIREFLY
#echo "CONFIG_FIRMWARE_INCLUDE_NVPPROXY=n" >> .config #NVPPROXY 已删除 /trunk/user/httpd/common.h
##科学上网## 已删除 /trunk/user/httpd/common.h
#echo "CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=n" >> .config #SS plus+ 科学上网插件
#echo "CONFIG_FIRMWARE_INCLUDE_V2RAY=n" >> .config #无需集成会在线下载
#echo "CONFIG_FIRMWARE_INCLUDE_XRAY=n" >> .config #无需集成会在线下载
#echo "CONFIG_FIRMWARE_INCLUDE_TROJAN=n" >> .config #无需集成会在线下载
#echo "CONFIG_FIRMWARE_INCLUDE_SSOBFS=n" >> .config # simple-obfs混淆插件
#########################################################################################
sudo ./clear_tree
sudo ./build_firmware_modify $TNAME 0
sudo mv -f images/*.trx /opt/images/K2P-USB-32M-512M_3.4.3.9-099.trx
cp -f .config /opt/images/${TNAME}-32M-512M.config
echo "build_time=$(date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
echo "tag=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
- name : Upload packages
uses: actions/upload-artifact@master
with:
name: K2P-USB-32M-512M
path: /opt/images
- name: Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
> ### 编译时间:${{ env.build_time }}
`型号.config` 是集成的插件模板
tag_name: ${{ env.tag }}
files: /opt/images/*