一.编译openwrt固件
首先去官网编译一个固件:https://firmware-selector.openwrt.org/
输入型号D-Team Newifi D2,右边选择需要的版本(当前最新24.10.2) (编译命令添加:luci-i18n-base-zh-cn)
点击下载即可

ps:为什么不预安装软件包?因为选择多了会报错。。。可能空间超过最大空间,或者官方源没有热门软件。
推荐预装中文包,但是没测试过,或者看下面安装。
二.安装固件
路由器断电,电脑关闭WiFi,用网线连接电脑和路由器的lan口(4个同颜色的口任选其一)。
然后一直长按reset键(就是电源口旁边的按钮),再插上电源,10s后停止长按reset键(此时电源灯闪烁)。
电脑打开网址:192.168.1.1
进入breed,先进入恢复出厂设置-公版config,进行重置。
再刷写新openwrt固件。
三.初始化设置
如图上传并安装汉化包:

软件源配置:如图打开界面,然后直接复制粘贴替换即可。
一键配置命令:(ssh中输入)
sed -i 's_https\?://downloads.openwrt.org_https://mirrors.aliyun.com/openwrt_' /etc/opkg/distfeeds.conf

src/gz openwrt_core https://mirrors.aliyun.com/openwrt/releases/24.10.2/targets/ramips/mt7621/packages
src/gz openwrt_base https://mirrors.aliyun.com/openwrt/releases/24.10.2/packages/mipsel_24kc/base
src/gz openwrt_kmods https://mirrors.aliyun.com/openwrt/releases/24.10.2/targets/ramips/mt7621/kmods/6.6.93-1-ae7dcdf01cb63b83c64f5cb8d8960511
src/gz openwrt_luci https://mirrors.aliyun.com/openwrt/releases/24.10.2/packages/mipsel_24kc/luci
src/gz openwrt_packages https://mirrors.aliyun.com/openwrt/releases/24.10.2/packages/mipsel_24kc/packages
src/gz openwrt_routing https://mirrors.aliyun.com/openwrt/releases/24.10.2/packages/mipsel_24kc/routing
src/gz openwrt_telephony https://mirrors.aliyun.com/openwrt/releases/24.10.2/packages/mipsel_24kc/telephony
四.安装热门软件
1.安装openclash:https://github.com/vernesong/OpenClash/releases
打开链接,往下滑注意事项处,安装好依赖。
opkg update
opkg install bash iptables dnsmasq-full curl ca-bundle ipset ip-full iptables-mod-tproxy iptables-mod-extra ruby ruby-yaml kmod-tun kmod-inet-diag unzip luci-compat luci luci-base
把2行代码依次执行完后,再手动把ipk结尾的文件下载下来,手动上传安装。安装后进行重启即可。
依赖安装时可能会出问题,问ai后解决:
解决问题 1:dnsmasq-full 与 dnsmasq 的冲突
- 卸载
dnsmasq:dnsmasq是默认安装的轻量级 DNS 和 DHCP 服务。- 如果你需要
dnsmasq-full的增强功能(例如支持 DNS 加密等),需要先卸载dnsmasq:opkg remove dnsmasq
- 安装
dnsmasq-full:- 卸载
dnsmasq后,安装dnsmasq-full:opkg install dnsmasq-full
- 卸载
- 验证安装:
- 确保
dnsmasq-full安装成功:opkg list-installed | grep dnsmasq
- 确保
进入界面后,提示下载内核,选择linux-mipsle-softfloat (因为是硬路由,本来应该是hardfloat,结果更新失败),分支默认master。
自定义链接地址:https://gh-proxy.com/
实测可以下载。或者自行下载后通过ssh传进去。https://github.com/vernesong/OpenClash/releases/tag/Clash
路由器的/etc/openclash/core目录中,并通过下面命令解压缩。
cd /etc/openclash/core
tar -zxvf clash-linux-arm64.tar.gz

参考资料:https://www.cnblogs.com/dingshaohua/p/17988955
2.crash更好用
一键搭建脚本:
export url='https://gh-proxy.com/https://raw.githubusercontent.com/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null



Comments | NOTHING