红米路由器AX6科学上网

红米路由器AX6是AX5的升级款,搭载与小米路由器AX3600同款的高通6核处理器,包括4核CPU与2核NPU,6路外置信号放大器,512MB的RAM,可与其他小米高端路由器一样,进行 OFDMA+MU-MIMO混合Mesh组网。好了,废话不多说,上硬货。

准备工作

Windows操作环境需要安装 Putty WinSCP丨MacOS使用终端行即可;
一台OpenWRT路由器;(将脚本写入系统,开启广播后自动破译小米路由器的SSH)
红路由器AX6 稳定版固件 以及 解锁脚本

第一步 · 刷入稳定版固件

首先,登陆红米路由器的后台。依次点击【常用设置】 – 【系统状态】,检查路由器的系统版本是否为 1.0.18 版。

若路由器当前版本为其他版本,请先点击【手动升级】,并将路由器 稳定版固件 上传至设备,进行手动升级/降级操作。

第二步 · 为 OpenWRT 设备预装解锁脚本

这个步骤的主要目的是将 解锁脚本 文件写入至OpenWRT设备中,以实现OpenWRT为小米路由器破解SSH秘钥。

  • 使用网线将OpenWRT设备与电脑相连。
  • 使用WinSCP的SCP登陆方式,将【解锁脚本】上传至OpenWRT设备的 /root 根目录中。
  • 一般OpenWRT设备使用SSH/SCP登录的账号为 root;密码为空。

我的OpenWRT设备后台地址为192.168.5.1,请根据自己的设备管理地址自行调整代码。

scp wireless.sh root@192.168.5.1:/root/wireless.sh

将【解锁脚本】上传至OpenWRT设备的根目录后,用Putty或CMD与设备建立SSH连接。(密码依旧为空)

ssh root@192.168.5.1

root@OpenWrt ~

ssh root@192.168.5.1

执行下面的脚本代码,为OpenWRT刷入红米路由器AX6所需的SSH破解程序包。

sh /root/wireless.sh

root@OpenWrt: ~

BusyBox V1.30.1 built-in shell (ash)           ┏━━┓      ┏┳┳┳━┳━━┓           ┃┏┓┣━┳━┳━┫┃┃┃┃┣┓┏┛           ┃┗┛┃┃┃┻┫┃┃     ┃  ┫┃┃           ┗━━┫┏┻━┻┻┻━━┻┻┛┗┛                   ┗┛ ——————————————————————————          https://www.homaton.com —————————————————————————— ===================== WARNING ===================== There is no root password defined on this device! Use the “passwd” command to set up a new password in order to prevebt unauthorized SSH logins. ===================== WARNING =====================
root@OpenWrt: ~ # sh /root/wireless.sh

当屏幕出现下图的提示信息时,按回车继续。

root@OpenWrt: ~

===================== WARNING ===================== There is no root password defined on this device! Use the “passwd” command to set up a new password in order to prevebt unauthorized SSH logins. ===================== WARNING =====================
[Warning] Please make sure your router has wireless support! [Warning] Please make sure your router is restored to factory settings (not configured)! [Warning] Please make sure you’ve backed up the network and wireless settings! [Warning] Please make sure you’ve connected the router via *wired ethernet*! [Warning] Running this script will change your *network* settings!
Use Ctrl+C to exit or press enter key to continue…

若出现如下图所示的提示信息,则表示解锁红米路由器AX6的OpenWRT设备已制作成功,等待设备重启

root@OpenWrt: ~

[info] Please now disconnect from this router, and connect to your Xiaomi/Redmi router. [info] For Xiaomi AX6000/AX9000:       Open your browser, access the following URL:       http://192.168.31.1/cgi-bin/luci/;stok=/api/xqsystem/extendwifi_connect_inited_router?ssid=MEDIATEK-ARM-IS-GREAT&password=ARE-YOU-OK&admin_username=root&admin_password=admin&admin_nonce=xxx [info] For Redmi AX6/AX3000:       Open your browser, access the following URL:       http://192.168.31.1/cgi-bin/luci/;stok=/api/misystem/extendwifi_connect?ssid=MEDIATEK-ARM-IS-GREAT&password=ARE-YOU-OK       If the return code is 0, then access this URL:       http://192.168.31.1/cgi-bin/luci/;stok=/api/xqsystem/oneclick_get_remote_token?username=xxx&password=xxx&nonce=xxx [info] If the return code is 0, now you can connect to your router via SSH. [info] SSH login password is 5GHz wireless connection password. [Success] Thanks for usage. [Staff] Homaton Lee, Robert Marko, Tianling Shen
[Warning] Restarting network…

第三步 · 获取红米路由器SSH秘钥

使用路由器管理员密码登录小米路由器后台,获取STOK值并记录。STOK值为上图地址栏中蓝色部分数值。

检查OpenWRT设备是否已经正常开机,且开启了WiFi广播功能。(广播SSID为:MEDIATEK-ARM-IS-GREAT

第一次请求

打开浏览器,在浏览器地址栏中输入以下代码,将代码中的<STOK>替换成刚刚获取的STOK值,并按回车,等待路由器主动请求OPENWRT为其破译SSH。

http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/misystem/extendwifi_connect?ssid=MEDIATEK-ARM-IS-GREAT&password=ARE-YOU-OK

如上图所示,若出现 code”:0 的提示,则表示第一步破解已经成功。

第二次请求

http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/xqsystem/oneclick_get_remote_token?username=xxx&password=xxx&nonce=xxx

如上图所示,若出现 code”:0 的提示,则表示红米路由器AX6已被成功经开启SSH。

查看SSH秘钥

登录小米路由器管理后台,出现在5G或2.4G频段WiFi密码中的,与你设置的密码不同的字符,就是此设备的SSH密码。

请记录并保存好该密码。随后可自行更改所有频段的密码,修改WiFi密码的操作并不会修改设备的SSH密码。

第四步 · 执行备份固化等操作

Windows 操作系统可以使用命令提示符;MacOS可以使用终端,进行命令操作。执行下面命令即可使用SSH连接到红米路由器。

SSH root@192.168.31.1

ssh root@192.168.31.1

SSH登陆密码:admin

SSH root@192.168.31.1

BusyBox V1.30.1 built-in shell (ash) ——————————————————————————————— ∞ https://www.homaton.com ► V1.30.1 built-in shell ◄ ———————————————————————————————     $$$   $$$$$$$$ $$$$$$$$   $$$   $$      $$$$$  $$$  $$$$      $$$$  $$$   $$ $$$        $$$   $$     $$$  $$$$$$ $$$        $$$$  $$$   $$$$$$        $$$   $$    $$$   $$$$$$$$$        $$$$$$ $$$   $$ $$$        $$$   $$    $$$    $$$$$$$         $$ $$$ $$$$$$$  $$$$$$$$   $$$   $$    $$     $$$$$$$$        $$  $$ $$$  $$$ $$$        $$$   $$    $$$    $$$$$$$$       $$$$$$$$$$$  $$$ $$$        $$$   $$    $$$   $$$$$$ $$$      $$   $$$$$$   $$ $$$         $$$ $$$     $$$  $$$$$$  $$$    $$$    $$$$$   $$$$$$$$$$$     $$$$$       $$$$$  $$$  $$$$ 
root@XiaoQiang: ~ #

创建备份文件

mkdir /tmp/syslogbackup/
dd if=/dev/mtd9 of=/tmp/syslogbackup/mtd9

SSH root@192.168.31.1

BusyBox V1.30.1 built-in shell (ash) ——————————————————————————————— ∞ https://www.homaton.com ► V1.30.1 built-in shell ◄ ———————————————————————————————     $$$   $$$$$$$$ $$$$$$$$   $$$   $$      $$$$$  $$$  $$$$      $$$$  $$$   $$ $$$        $$$   $$     $$$  $$$$$$ $$$        $$$$  $$$   $$$$$$        $$$   $$    $$$   $$$$$$$$$        $$$$$$ $$$   $$ $$$        $$$   $$    $$$    $$$$$$$         $$ $$$ $$$$$$$  $$$$$$$$   $$$   $$    $$     $$$$$$$$        $$  $$ $$$  $$$ $$$        $$$   $$    $$$    $$$$$$$$       $$$$$$$$$$$  $$$ $$$        $$$   $$    $$$   $$$$$$ $$$      $$   $$$$$$   $$ $$$         $$$ $$$     $$$  $$$$$$  $$$    $$$    $$$$$   $$$$$$$$$$$     $$$$$       $$$$$  $$$  $$$$  root@XiaoQiang: ~ # mkdir /tmp/syslogbackup/
                    dd if=/dev/mtd9 of=/tmp/syslogbackup/mtd9

浏览器请求该地址下载备份:http://192.168.31.1/backup/log/mtd9

固化SSH

将fuckax3000文件通过SCP上传至红米AX6的根目录。

Windows OS可以使用命令提示符(CMD);MacOS 可以使用终端。

代码中的 fuckax3000 需要替换绝对地址;

例如:scp C:\Users\ALIENWARE\Desktop\fuckax3000 root@192.168.31.1:/tmp

scp fuckax3000 root@192.168.31.1:/tmp

返回至红米路由器AX6并执行:

chmod +x /tmp/fuckax3000
/tmp/fuckax3000 unlock

这时,系统会自动重启。

重新SCP上传一遍脚本(因为重启后,tmp文件会被清空)

scp fuckax3000 root@192.168.31.1:/tmp

SSH重新连接上红米AX6后,执行:

chmod +x /tmp/fuckax3000
/tmp/fuckax3000 hack
/tmp/fuckax3000 lock

这会设置永久的ssh、telnet、uart权限,也会计算出默认密码记得保存

如果升级后丢失SSH权限,你也可以telnet连接上AX6后执行,即可恢复SSH。密码依旧为上一步计算出的默认密码

telnet 192.168.31.1

如果你的设备提示没有 telnet,请参考:Windows OS 打开 telnet 教程;MacOS需要安装brew后,通过brew安装telnet。

sed -i 's/channel=.*/channel="debug"/g' /etc/init.d/dropbear
/etc/init.d/dropbear start

第六步 · 安装 ShellClash 面板

在SSH进入红米路由器系统后,输入以下代码安装ShellClash面板,用于管理和分配外网节点。

sh -c "$(curl -kfsSl https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master/install.sh)" && source /etc/profile &> /dev/nul
fastgit.org
export url='https://raw.fastgit.org/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
GitHub
export url='https://raw.githubusercontent.com/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
jsDelivrCDN
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellClash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
作者私人源
export url='https://shellclash.cf' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null

备用源

近期国内封停了大量域名,若你无法使用上述代码安装,可尝试其他安装源。

输入 CLASH 安装面板。

这里建议安装 Yacd 面板。该面板具有自动测速,分配最佳节点功能。

在此选择导入CLASH配置文件和链接

若你的订阅链接为 SS/SSR/VMESS 格式,可在此进行 订阅链接转换

CLASH面板管理地址:http://192.168.31.1:9999/ui

到这里,红米AX6的科学上网之路就已经开启了,赶快连接WiFi,畅享网络世界吧!

推荐指数

我曾使用过华硕/网件等路由器刷入梅林固件已达到科学上网目的,虽然魔改的固件可以实现更多插件应用及管理,但同时也带来了系统的崩溃异常。得益于红米AX6 超强的 CPU + NPU 组合,跑代理速度没问题,但重度用户会感受到延迟,并且在游戏代理模式中,会有明显卡顿。ShellClash 这种方案虽然没有图形化UI操作方便,但好在不需要刷麻烦也不稳定的OpenWRT固件,直接小米官方固件也能享受到网络「加速」的福利。