Background#
Cattools is a powerful toolbox based on BASH for CatWrt, helping users easily achieve various practical functions. It is used to solve some modifications that are inconvenient, deeply adapted to CatWrt configuration, and compatible with older versions. Some functions may have bugs; if you encounter issues, please contact me for resolution!
User Guide#
- [Step 1] Indicates steps/progress
- (
[Enter]
Confirm /[0]
Exit) Indicates operation keys * - INFO Indicates content
- UPDATE Indicates update
- Warning Indicates warning
* Note: After entering the number key [1]
, you need to press [Enter]
to confirm
Install Cattools#
In version v24.9 (mt7621 & amd64), we have pre-installed Cattools, so no need to install it again!
We also welcome users of older versions, but the software package may be a bit outdated, and some configurations in the enhanced settings may not be configurable.
curl https://service.miaoer.xyz/cattools/install.sh | bash
After installation, enter cattools
to use it and display the following content
root@CatWrt:~# cattools
Please wait for the script to be updated.
cattools update downloaded from the second URL.
cattools updated successfully.
----------------------------------------------------------
CatTools
https://github.com/miaoermua/cattools
----------------------------------------------------------
1. SetIP - Set IP
2. Network_Wizard - Network Wizard
3. Apply_repo - Software Source Configuration
4. Diagnostics - Network Diagnostics
5. Debug - Capture Logs
6. Catwrt_update - Check for Updates
7. Sysupgrade - System Update
8. Restore - Restore Packages
9. Utilities(more) - Utilities
0. Exit - Exit
----------------------------------------------------------
Please enter a number and press Enter (Please enter your choice): _
Usage Method#
If you don't know how to use SSH, refer to this blog 👇
Virtual Machine/Physical Machine#
When running the code, you need to wait until [40.xxx] or more to press Enter and input cattools
for use. During use, it cannot read Chinese, so it displays square characters. If it prompts that it is not installed and the command is correct, it means it is not installed. You cannot install it using this method unless you can accurately input the installation command.
SSH#
For Windows 10 and above, use the system's default OpenSSH to execute [email protected]
and enter the password (the password is not visible when entering).
Enter cattools
to use it. If not installed, use the method below to install it.
::: gallery
:::
If you are using Windows 10 or above and it prompts that SSH is not available, please follow the official Microsoft documentation to install Getting Started with OpenSSH for Windows
Alternatively, use third-party SSH to connect, such as Putty (simple, in English, easy to understand), Termius (feature-rich, in English, easier to use), Finalshell (in Chinese, easy to use, not recommended).
TTYD#
Open CatWrt Backend, enter the password and press Enter, find System - TTYD Terminal, enter account root
, default password password
(the password is not visible when entering), and enter cattools
to use it. If not installed, use the method below to install it.
SetIP - Set IP#
Number item 1
You can manually configure the IP address to your desired subnet segment when creating a virtual machine, without fancy settings, more suitable for advanced users, and is a compromise solution to the network wizard below.
To operate, enter an IP address you need, and after execution, it will restart the network part without needing to restart CatWrt to configure.
This method is suitable for traditional users; after manually configuring the network, you need to restart CatWrt to obtain normal network access.
Please enter the IP Addr and press Enter /// 请输入 IP (default is 192.168.1.4): 10.0.0.4
Network_Wizard - Network Wizard (Bypass Gateway)#
Number item 2
The network wizard is a basic configuration that allows users to obtain recommended configurations without much intervention, saving time and effort, including the following content:
- [Step2] Bypass Gateway (Bypass Router)
- [Step3] Set IP
- [Step4] IPv6
- [Step5] Dial-up Internet (PPPoE) / Automatic Acquisition (DHCP)
- [Step6] DNS
- [Step7] IP Segment
- [Step8] Force DHCP
- [Step9] UPNP
- [Step10] Port Binding
Note: The bypass gateway setting currently only supports a single network port; the script will recognize single-port devices, and the bypass gateway setting will pop up only if you have a single network port. If you have multiple network ports, you will not see this.
Port binding makes eth0 the WAN port and eth1 the LAN port, which is the opposite of the default situation.
It is recommended for hosts with more than 3 network ports to perform this operation.
Bypass_gateway - Bypass Gateway#
Included in network_wizard - Network Wizard, cannot be directly called by number keys.
The design logic is to allow users to input the specified main router IP, automatically change the IP to .4 of that subnet, and enable or disable the following functions:
- [Step3] Get Main Router IP
- [Step4] Set Bypass Gateway IP
- [Step5] Set DNS
For example: If the user inputs the main router IP 192.168.31.1
, the script automatically generates IP 192.168.31.4
for use as a bypass gateway.
Note: Once the device is changed, it cannot be restored to router mode through the network wizard; it is not recommended to use the main router as a DNS server, although it can work, it is not standard.
Apply_repo - Software Source Configuration#
Number item 3
Allows users to automatically detect versions without selecting version numbers, selecting specified software source mirrors or main sites, to obtain a rich software package provided by CatWrt, compatible with old versions up to v22.12 of CatWrt.
Q: Why not integrate software source configuration but use the default Tencent Cloud? A: Because there is no money to operate; if integrated, it may lead to some scenarios being overloaded, causing the server to be overwhelmed.
Choose a non-main site; if you don't have high hopes for your network environment, choose the main site. I hope non-sponsoring users can choose the free mirrors provided; if you are willing to support us, you can choose the main site.
-
The main site
repo.miaoer.xyz
is a software source built on Alibaba Cloud's Guangzhou data center, and we adopt a sponsorship model for the post-Cattools era. -
Github Pages is a free project hosting mirror site.
-
Cloudflare provides free CDN acceleration with the above suffix, which may not be friendly to some regions but is usable.
-
Vercel provides a free serverless hosting mirror site.
-
Netlify provides a free serverless hosting mirror site.
Choose the corresponding service number, or do nothing and wait 5 seconds to default to using the Vercel mirror. After application, you can use opkg install
to install applications.
Diagnostics - Network Diagnostics#
Number item 4
Automated checks of known suspicious locations to prevent disconnection or network failure caused by misoperation.
- PING
- DNS
- LSLOOKUP
- IPv4
- IPv6
- Preferred IPv6
- WAN (Bypass Gateway)
- PPPoE (DHCP)
- WAN6
- Tcping
Debug - Capture Logs#
Number item 5
Captures all issues related to plugin configuration and can be accessed via a browser, useful for reporting bugs.
Users need to execute and use [CTRL]
+ [Left Mouse Button]
to open the logs, [CTRL]
+ [C]
to copy all text, create a file named logs.txt
to submit the issue.
- Distribution
- Online Time
- Memory Usage Status
- Disk Usage Status
- Installed Application List
- System Logs
- Kernel Logs
- Some Plugin Logs
- All Running Tasks
- Network Card Information
- Network Configuration (including dial-up information; if it offends, please erase it or send it directly via email)
- Firewall
- Routing Table
Submit Issue or email to [email protected] with the subject catwrt logs: + issue description
TG Group: t.me/miaoergroup // QQ Group: 669190476
CatWrt_update - Check for Updates#
Number item 6
The design logic is to check whether the checksum values of local files and the backend server of the blog are the same to implement the update check.
Current version on this machine
LOCAL =================================================
Current Version: v24.9
Current Architecture: amd64
Current Channel: Beta
========================================================
Latest version: Your CatWrt is the latest version!
Non-latest version: New CatWrt updates found!
UPDATE ================================================
New version found: v23.8 > v24.9 (Beta)
Version: CatWrt.v24.9.amd64
Blog: https://www.miaoer.xyz
========================================================
Sysupgrade - System Update#
Number item 7
The design logic is to automatically detect whether the upgrade conditions are met and automatically obtain the download link, without the hassle of going to the website to download.
Detection items
- EFI
- Total Space Size
- Whether it is x86_64 (AMD64), mt7621
Upgrading the system will cause all software installed via the software source to be overwritten by the new firmware.
The ROOT account password may be restored to the default password: (password)
During the upgrade process, plugin configurations and pre-installed plugins will be retained for the upgrade.
It will erase plugins installed via opkg or manually; you can obtain them later from the software source!
This update will also download the latest version; you should check for updates using catwrt_update
in Cattools before updating.
Download items
Whether to choose the accelerated download provided by ghproxy, originally downloaded directly from Github release.
Restore - Restore Packages#
Number item 8
This function is implemented to restore packages after system upgrades. As is well known, CatWrt (LEDE) loses manually installed plugins after an upgrade.
Used in conjunction with Sysupgrade - System Update, this function backs up the list of already installed packages before the system update, and after the update is completed, use the Configure Software Source function to obtain the latest software source.
After operating, use this function to read the package list; Cattools will automatically install the software and plugins from before the upgrade.
Utilities(more) - Utilities#
Number item 9
The design logic is to implement support and configuration for some applications, one-stop configuration.
-
1 Kernel Download, after downloading the kernel, you can enable plugin functions, which can only be activated by user-provided configuration files.
-
2 Tailscale Configuration, can automatically configure Tailscale for remote networking and intranet penetration.
-
3 Leigod Configuration, can install the Thunder Accelerator plugin to accelerate game consoles, PCs, and mobile phones.
-
4 TTYD Passwordless, suitable for SSH terminal debugging or new environment configuration in non-networked environments for convenience, as it is relatively dangerous, beginners should not enable it.
-
5 Import IPK Software Packages, to import and install software packages that are not in the CatWrt software source.
-
6 SSL/TLS Upload, configure Tencent Cloud and Alibaba Cloud's manually downloaded certificate zip packages, needs to be paired with DDNS domain resolution.
-
7 Reset root password, restore the password to password, suitable for x86_64 after screen connection operations, or simply when the SSH software saved the password but you forgot it.
-
8 Reset system, restore the system to factory settings (the original state of CatWrt firmware), will discard all configuration plugins and start over.
-
0 Return to the Cattools main menu.
This article is synchronized and updated to xLog by Mix Space. The original link is https://www.miaoer.net/posts/blog/cattools