Sign inSign up

idssc/immortalwrt

By idssc

•Updated about 1 month ago

基于官方 ImmortalWrt 镜像,修复CPU占用率

Image
4

6.0K

idssc/immortalwrt repository overview

An opensource OpenWrt variant for mainland China users.

支持的架构:amd64 arm64 armv7
基于官方 imagebuilder 构建的最小化版本,默认 argon 主题,已补齐中文界面,更新源后可以正常安装应用。
官方 25.12 之后包管理工具旧的 opkg 命令已弃用,请使用新的 apk⁠ 命令。
测试 25.12.2 / 24.10.6 / 23.05.7 卸载 procd-ujail 后占用与温度正常。
测试 21.02.7 / 18.06-k5.4-SNAPSHOT (armv8) 在4核心 A55 CPU 几乎无占用,温度正常。

1.网络结构
主路由: 192.168.123.1
旁路由: 192.168.123.10
ImmortalWrt:192.168.123.11
查看网口

ip a | grep -oE " e(n|th)[0-9a-z]+:" | cut -d: -f1 | sed 's/ //g'

2. 打开网卡的混杂模式,假如网口为 eth0 (请把以下命令中的 eth0 替换为你的实际网口)

ip link set eth0 promisc on

3. 创建网络
子网 192.168.123.0/24 根据实际情况修改网关 192.168.123.1 根据实际情况修改

docker network create -d macvlan \
	--subnet=192.168.123.0/24 \
	--gateway=192.168.123.1 \
	-o parent=eth0 \
	macnet

4. 启动 ImmortalWrt

docker run -d \
	--name immortalwrt \
	--hostname immortalwrt \
	--restart unless-stopped \
	--privileged \
	--network macnet \
	--mac-address d0:16:f0:01:02:0f \
	--ip 192.168.123.11 \
	-v /mnt:/mnt \
	idssc/immortalwrt:25.12.2-arm64 \
	/sbin/init

5. 进入容器

docker exec -it immortalwrt ash

6. 修改 ip
假设固件默认后台 192.168.1.1, 我要修改为 192.168.123.11

uci set network.lan.proto='static'
uci set network.lan.ipaddr='192.168.123.11'
uci set network.lan.netmask='255.255.255.0'
uci set network.lan.gateway='192.168.123.1'
uci set network.lan.dns='192.168.123.1'
uci commit network && sleep 1
service network restart

7. Armbian 和 ImmortalWrt 网络互通
按照上面设置完旁路由发现 Docker 的宿主机 Armbian 系统和 ImmortalWrt 无法互相访问。需要修改 Armbian 在 ImmortalWrt 启动后添加以下命令

ip link add macnet link eth0 type macvlan mode bridge 
ip addr add 192.168.123.11/24 dev macnet
ip link set macnet up
ip route add 192.168.123.10 dev macnet
ip route del default via 192.168.123.10 dev eth0
ip route add default via 192.168.123.10 dev macnet

8. 安装 argon 主题,补齐中文界面


25.12 ~ 执行


apk add -U \
	luci-i18n-package-manager-zh-cn \
	luci-i18n-firewall-zh-cn \
	luci-i18n-argon-config-zh-cn

24.10 执行


opkg update && opkg install \
	luci-i18n-package-manager-zh-cn \
	luci-i18n-firewall-zh-cn \
	luci-i18n-argon-config-zh-cn

23.05 执行


opkg update && opkg install \
	luci-i18n-opkg-zh-cn \
	luci-i18n-firewall-zh-cn \
	luci-i18n-argon-config-zh-cn

21.02 执行


opkg update && opkg install \
	luci-i18n-opkg-zh-cn \
	luci-i18n-filetransfer-zh-cn \
	luci-i18n-turboacc-zh-cn \
	luci-i18n-firewall-zh-cn \
	luci-i18n-argon-config-zh-cn

18.06 执行


opkg update && opkg install \
	luci-i18n-base-zh-cn \
	luci-i18n-filetransfer-zh-cn \
	luci-i18n-turboacc-zh-cn \
	luci-i18n-firewall-zh-cn \
	luci-i18n-argon-config-zh-cn

9. 安装爱学习
25.12 ~ 执行

apk add -U luci-i18n-homeproxy-zh-cn ip-full

24.10 ~ 23.05 执行

opkg update && opkg install luci-i18n-homeproxy-zh-cn ip-full

21.02 ~ 18.06 执行

opkg update && opkg install luci-i18n-ssr-plus-zh-cn

10. 修改管理密码为复杂密码,给 ssh 添加密钥并关闭密码登录,提高系统安全


Tag summary

Content type

Image

Digest

sha256:275b6c288…

Size

10.7 MB

Last updated

about 1 month ago

docker pull idssc/immortalwrt:25.12.2-amd64