极路由1S刷机OpenWrt - SSB4455/ownArticleSome GitHub Wiki

获取设备Root权限开启ssh

http://192.168.199.1/local-ssh/ 获取local_token 打开后别关闭因为刷新后token会变

http://192.168.199.1/cgi-bin/turbo/proxy/router_info 获取uuid

拿着local_token和uuid到https://www.hiwifi.wtf/ 获取cloud_token

将获取的cloud_token填到刚才获取local_token的页面提交

如果提交后没有显示“Success: ssh port is 22”就刷新换一个local_token再试一次

注意这里只是开启了临时ssh关闭连接后需要重复上面的操作才能再次连接

也可以使用一下命令永久开启

/etc/init.d/dropbear enable && /etc/init.d/dropbear start

刷u-boot

下载对应的固件: https://breed.hackpascal.net/

把下载到的文件用弄到路由器的/tmp目录

scp 你的目录/breed-mt7628-hiwifi-hc5661a.bin [email protected]:/tmp/

然后执行

mtd -r write breed-mt7628-hiwifi-hc5661a.bin u-boot

也可以直接下载到路由器里

极1

cd /tmp
wget http://rssn.cn/roms/uboot/HC6361-uboot.bin
mtd -r write HC6361-uboot.bin u-boot

极1S 看具体型号

cd /tmp
wget http://rssn.cn/roms/uboot/HC5661-uboot.bin
mtd -r write HC5661-uboot.bin u-boot`

cd /tmp
wget http://rssn.cn/roms/uboot/HC5661A-uboot.bin
mtd -r write HC5661A-uboot.bin u-boot

极2

cd /tmp
wget http://rssn.cn/roms/uboot/HC5761-uboot.bin
mtd -r write HC5761-uboot.bin u-boot

极3

cd /tmp
wget http://rssn.cn/roms/uboot/HC5861-uboot.bin
mtd -r write HC5861-uboot.bin u-boot

macOS可能需要指定 rsh 协议

scp -o HostKeyAlgorithms=+ssh-rsa -O config.yaml ax6:/etc/test/config.yaml 你的目录/breed-mt7628-hiwifi-hc5661a.bin [email protected]:/tmp/

中间可能涉及到重置之后再次连接SSH报错

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
08:98:a9:cc:f8:37:20:6b:b4:b1:6c:3a:15:b9:a9:92.
Please contact your system administrator.
Add correct host key in /home/arnold/.ssh/known_hosts to get rid of this message.
Offending key in /home/arnold/.ssh/known_hosts:2
RSA host key for 10.18.46.111 has changed and you have requested strict checking.
Host key verification failed.

这是因为在于原系统建立首次连接时,双方相互记录了对方的公钥(ssh基于非对称密钥技术),在ssh服务主机重装系统后,公钥改变了,任以旧版本公钥的主机自然是无法与新系统连接的。

rm -f ~/.ssh/known_hosts

删掉记录公钥文件,或者如果你可以判断出known_hosts中原ssh服务器的公钥,删去那部分就可以了

刷OpenWrt固件

下载对应的固件: http://downloads.openwrt.org/releases/

拔掉路由器电源,按住reset键不要松开并插上电源,等3秒左右3个灯快闪几下松开按键,等待进入uboot模式。

然后使用浏览器访问http://192.168.1.1/进入刷机页面 恢复地址

点击固件,选择下载的OpenWrt固件,刷完重启

OpenWrt默认不开启Wi-Fi所以需要用网线连接

也可以用指令刷

cd /tmp 
#下载bin包#
wget http://downloads.openwrt.org/releases/18.06.9/targets/ramips/mt76x8/openwrt-18.06.9-ramips-mt76x8-hc5661a-squashfs-sysupgrade.bin
#刷入OpenWrt#
sysupgrade -F -n openwrt-18.06.9-ramips-mt76x8-hc5661a-squashfs-sysupgrade.bin

连上网之后可以用指令安装中文语言包

opkg update
opkg install luci-i18n-base-zh-cn

安装魔法🪄插件

请先安装好这些依赖:

#iptables
opkg update
opkg install coreutils-nohup bash iptables dnsmasq-full curl ca-certificates ipset ip-full iptables-mod-tproxy iptables-mod-extra libcap libcap-bin ruby ruby-yaml kmod-tun kmod-inet-diag unzip luci-compat luci luci-base


#nftables
opkg update
opkg install coreutils-nohup bash dnsmasq-full curl ca-certificates ipset ip-full libcap libcap-bin ruby ruby-yaml kmod-tun kmod-inet-diag unzip kmod-nft-tproxy luci-compat luci luci-base

可能会遇到libcap-bin这个依赖找不到

在这里libcap-bin_2.69-r1_mipsel_24kc.ipk下载然后传到设备上安装即可

OpenClash 依赖的是 dnsmasq-full,所以需要移除默认的dnsmasq,否则会导致 OpenClash 安装失败

opkg remove dnsmasq && opkg install dnsmasq-full

然后下载下载OpenClash的ipk 传到设备上安装

opkg install luci-app-openclash_0.46.003-beta_all.ipk

安装完之后要进入更新一下内核


查看设备架构

cat /etc/os-release |grep ARCH
OPENWRT_ARCH="mipsel_24kc"

OpenWrt 安装使用 OpenClash

OpenWrt安装OpenClash