因为最近经常需要用到网络代理,反复开启代理软件也并不方便。于是就想到了可以使用软路由进行自动代理。在互联网上参考几篇文章后发现都有一些漏洞或是不详细的地方,于是就有了这篇文章。
** 小米 R1C 刷 OpenWrt **
** 其他**
因为小米路由器需要在开发版系统下才可以刷入 SSH 工具,所以我们需要先给路由器刷入开发版系统。
(因为小米新版本的系统封堵了官方 SSH 工具,所以需要使用旧版本的开发版系统)
固件可以自行在网络上寻找。也可以使用我自己刷入成功的固件【下载】
完成以上步骤后,刷入开发版系统的步骤便完成了。若指示灯变为红色,则代表此固件刷入失败。需要更换其他固件。
接下来是开启 SSH 权限,用来操作路由器。
这里需要登录官方网站来获取所刷入的包。当然,也可以使用我申请的包。
为了防止刷入失败,首先需要备份 rom 文件。
此步骤需要用到两款软件,SSH 终端 PuTTY ,以及文件传输软件 WinSCP 。
(本人因为个人喜好,使用 FinalShell 代替 PuTTY 作为 SSH 工具)
cd /tmp
mkdir rom
dd if=/dev/mtd0 of=/tmp/rom/ALL.bin
dd if=/dev/mtd1 of=/tmp/rom/Bootloader.bin
dd if=/dev/mtd2 of=/tmp/rom/Config.bin
dd if=/dev/mtd3 of=/tmp/rom/Factory.bin
dd if=/dev/mtd4 of=/tmp/rom/OS1.bin
dd if=/dev/mtd5 of=/tmp/rom/rootfs.bin
dd if=/dev/mtd6 of=/tmp/rom/OS2.bin
dd if=/dev/mtd7 of=/tmp/rom/overlay.bin
dd if=/dev/mtd8 of=/tmp/rom/crash.bin
dd if=/dev/mtd9 of=/tmp/rom/reserved.bin
dd if=/dev/mtd10 of=/tmp/rom/Bdata.bin
以下为恢复命令,用于还原。
mtd write /tmp/rom/Bootloader.bin Bootloader
mtd write /tmp/rom/Config.bin Config
mtd write /tmp/rom/Factory.bin Factory
mtd write /tmp/rom/OS1.bin OS1
mtd write /tmp/rom/rootfs.bin rootfs
mtd write /tmp/rom/OS2.bin OS2
mtd write /tmp/rom/overlay.bin overlay
mtd write /tmp/rom/crash.bin crash
mtd write /tmp/rom/reserved.bin reserved
mtd write /tmp/rom/Bdata.bin Bdata
cd /tmp
mtb -r write breed-mt7620-xiaomi-mini.bin Bootloader
在完成 OpenWrt 的刷入以后,很多软件是需要进行更新的。可以参考如下的命令进行更新
opkg update
opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade
这里附上一些在使用OpenWrt的过程中遇到的问题和解决方案
使用 SSH 工具连接路由器(用户名密码与管理界面相同)
执行以下命令
opkg update
opkg install luci-i18n-base-zh-cn
进入 OpenWrt 管理界面。
点击顶部菜单 [系统]->[系统]
在“基本设置”中,更改时区为“Asia/Shanghai”即可。
本文仅为个人刷机步骤,不代表唯一方法。
以下附本文参考的其他 资料/博文 链接。
https://www.mydigit.cn/thread-260185-1-1.html
https://schaepher.github.io/2019/07/25/xiaomi_router_mini_openwrt/