Main Course of the Week#
Before I begin, I apologize for the delay in writing for so many weeks. It's been a while, so this week I will write a tutorial.
Introduction#
Last year, I purchased a NAS, but my router still only had a single gigabit Ethernet port. I needed a gigabit router for internal network data exchange. So, I took advantage of a promotional offer and bought a Redmi AX6S router. Before buying it, I didn't read any guides or expect that a router priced at around 200 RMB would have a killer feature hidden inside. Here, I will document the specific operation process. This process should theoretically work for various types of routers, provided you can find the corresponding unlockable firmware and a method to calculate the root password. By 2023, I believe these won't be difficult problems anymore. I will use the Redmi AX6S as an example here.
Preparation#
Hardware: Router, Ethernet cable, PC/Mac with internet access
Software: Browser, download and install Termius, firmware for unlocking
Knowledge: Experience with independent scientific internet access, basic understanding of airport and VPS server usage.
Unlock SSH#
The steps are as follows:
- Flash the development version firmware
Download the installation version firmware in advance. The filename for my Redmi AX6S is miwifi_rb03_firmware_stable_1.2.7.
Enter the router's backend in a browser window. The default address for Xiaomi routers is: 192.168.31.1. Enter the backend administrator account and password. Each brand of router may be different.
Click on the username in the upper right corner and select "System Upgrade".
In the upgrade detection section, select manual upgrade, choose the firmware file downloaded to your computer, click start upgrade, and don't worry about bricking the router.
Wait for the upgrade to complete and the router to restart, then reconnect to WiFi.
- Calculate the router's root password
Now the router's system actually has SSH functionality. We need to calculate the login password based on the router's unique SN number to obtain the highest level of system permissions.
The password calculation method can be done online or using a local HTML file. Common router models will have experts sharing methods on GitHub or related forums. I used the local HTML method here. You can directly download it: Xiaomi SN
Open the HTML file and enter the SN to calculate the password.
- Use Termius to enable SSH
Termius is a well-known cross-platform SSH client that is beginner-friendly and offers all the features we need for free. Advanced users can use the computer terminal directly for this step.
Installation is not described here, this is the official website.
Termius - SSH platform for Mobile and Desktop
Open Termius, skip the beginner steps, select "Hosts" in the left column, and click "NEW HOST".
Other parameters are shown in the figure below. You can write any label you want, fill in the router's IP address for the address, select Telnet as the connection method, and then click on the blank space on the left to save.
Then double-click on the saved Host to establish a Telnet connection. (Telnet is also a network communication protocol)
- login: root
- password: Paste the calculated root password here (it won't be displayed, just press enter)
Copy the code below to enable the SSH function module.
nvram set ssh_en=1 & nvram set uart_en=1 & nvram set boot_wait=on & nvram set bootdelay=3 & nvram set flag_try_sys1_failed=0 & nvram set flag_try_sys2_failed=1
nvram set flag_boot_rootfs=0 & nvram set "boot_fw1=run boot_rd_img;bootm"
nvram set flag_boot_success=1 & nvram commit & /etc/init.d/dropbear enable & /etc/init.d/dropbear start
- Login to SSH
Create a new Host
- Fill in the address: 192.168.31.1
- Check SSH and disable Telnet
- Fill in SSH username: root
- Paste the previously calculated root password in the Password field
Click the arrow in the upper right corner, then select the newly created Host and choose to connect using SSH.
If you see this interface, you are halfway to success!
Installing and Configuring ShellClash#
ShellClash is a variant version of Clash that can run on various router systems and Linux environments. For specific information, see here:
ShellClash/README_CN.md at master · juewuy/ShellClash
Installation#
In the SSH Host, paste the following command to install ShellClash.
export url='https://raw.fastgit.org/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
- Select "2" for the stable version
- Then enter "1" to confirm the installation (I won't overwrite the installation this time)
Configure Clash#
After installation, continue by entering Clash and pressing enter.
- Select 1 for the main host or side router
- Select 1 to not proxy UDP
To avoid having to open Termius every time you want to configure Clash, you need to install a software interface, which is the local Dashboard panel.
- Select 1 to install the Dashboard panel
- Select YACD panel (the number here may be different)
- Select 1 to install in the /data/clash/ui directory
After installation, select 1 to start the public access service
- Select 1 to start importing
- Select 1 to generate the configuration file online
- Paste your subscription link (provided by your airport or VPS service provider)
If you've made it this far, I believe you also have some understanding of airports and VPS servers.
- Select 1 to start generating the configuration file
- Select 1 to start Clash service immediately
- Select 0 to exit the script
If everything goes well, your ShellClash should be working properly now.
Open http://192.168.31.1:9999/ui in a browser to access your router's Clash backend.
If you don't have any other requirements, I recommend disabling firmware updates for the router.
Summary#
Now, as long as your devices in the house connect to the internet through this router, your device will have a "scientific" connection. You can also switch between different nodes at any time using the browser on your phone or tablet. This is the most scientific way of accessing the internet that I have used so far.
Good luck!
Weekly Highlight#
This week, I started trying the TimeBlock time management method. I have read various introductions to time management online, and my impression has always been:
"Wow... I don't need to go to such extremes, do I?"
"I feel like I'm living like a robot."
However, after experiencing frequent anxiety and restlessness due to my own business projects and various life matters, I decided to give it a try, and it's really good. I referred to this article for the specific method:
The Complete Guide to Time Blocking
I created my own version using iCloud Calendar based on my own situation and then synced this calendar to all my devices.
Of course, you can create your own version according to your habits. The tool you use is not important. You can even start with the calendar on your phone.
I forgot where I saw this sentence:
If you don't try to control your time, you will be controlled by time.