Github Action 编译 VPS 使用的 Openwrt 固件
- 平台: Windows 10 Pro
- 工具: Github Action
预计耗时 2h, 清理 Action 机子腾出足够的空间,只编译直出 liveCD image .iso 格式的文件,支持自定义的 VPS 商家,比如 Vultr。修改防火墙规则、上网方式默认改为 DHCP ,确定需要定制的插件,滥用 jsdelivr 高速下载,合并分卷压缩包。
lean 源码
Cannot load image on this device.
none.blue
feeds.conf.default 添加 hello-word,预设 firewall 和 network 规则,
cat <<EOF > files/etc/config/firewall
config zone
option name 'wan'
option network 'wan wan6'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option masq '1'
option mtu_fix '1'
EOF
cat <<EOF > files/etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
config interface 'wan6'
option ifname 'eth0'
option proto 'dhcpv6'
EOF
分卷压缩
Cannot load image on this device.
none.blue
7z 分卷压缩,每个包 20MB,解压后大概 110MB.
7z -v20m a img-$(date +"%Y-%m-%d").7z ./lede/bin/targets/x86/64/openwrt-x86-64-generic-image-efi.iso
rm -rf lede
Loading ...
无广告!