Background#
Cattools is a powerful toolbox based on BASH, designed to help users easily achieve various practical functions. It is used to solve some inconvenient modifications and is deeply adapted to CatWrt configurations while being compatible with older versions. Some features may have bugs; if you encounter issues, please reach out to me for assistance!
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
Installing Cattools#
In version v24.9 (mt7621 & amd64), we have pre-installed Cattools, so no further installation is needed!
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 available.
curl https://service.miaoer.xyz/cattools/install.sh | bash
After installation, enter cattools
to use it, which will 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 Instructions#
If you are not familiar with using SSH, please refer to this blog 👇
Virtual Machine/Physical Machine#
If running code, you need to wait until [40.xxx] or more before pressing Enter to input cattools
. During use, Chinese characters cannot be read, so they will display as square boxes. 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 will not be visible when typing).
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 Microsoft's official documentation to install Getting Started with OpenSSH for Windows.
Alternatively, you can use third-party SSH clients to connect, such as Putty (simple, in English, easy to understand), Termius (feature-rich, in English, more user-friendly), or 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
, and the default password is password
(the password will not be visible when typing). Enter cattools
to use it; if not installed, use the method below to install it.
SetIP - Set IP#
Numeric item 1
You can manually configure the IP address to your desired subnet segment when creating a virtual machine, without complicated settings. This is more suitable for advanced users and is a compromise solution for the network wizard below.
To operate, enter the desired IP address; after execution, the network part will restart 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 functionality.
Please enter the IP Addr and press Enter /// 请输入 IP (默认为 192.168.1.4): 10.0.0.4
Network_Wizard - Network Wizard (Bypass Gateway)#
Numeric item 2
The network wizard is a basic configuration that requires minimal user intervention to obtain recommended configurations, making it convenient and efficient. It includes 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 single network ports; the script will recognize single port devices, and the bypass gateway setting will only pop up if you have a single port. If you have multiple ports, you will not see this option.
Port binding allows eth0 to act as the WAN port and eth1 as 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 changing the IP to .4 of that subnet and enabling or disabling the following features:
- [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 the DNS server, although it works, it is not standard.
Apply_repo - Software Source Configuration#
Numeric item 3
This allows users to automatically detect the version without selecting a version number, and select a specified software source mirror or main site 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 do not have high hopes for your network environment, select the main site. I hope non-sponsoring users can choose the free mirror 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 in Alibaba Cloud's Guangzhou data center, and for the post-Cattools era, we adopt a sponsorship model. -
Github Pages is a free project hosting mirror site.
-
Cloudflare provides free CDN acceleration; the suffix above may not be friendly to some regions, but it works.
-
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 applying, you can use opkg install
to install applications.
Diagnostics - Network Diagnostics#
Numeric item 4
Automated checks of known suspicious locations to prevent disconnections or network failures caused by misoperations.
- PING
- DNS
- LSLOOKUP
- IPv4
- IPv6
- Preferred IPv6
- WAN (Bypass Gateway)
- PPPoE (DHCP)
- WAN6
- Tcping
Debug - Capture Logs#
Numeric item 5
Capture all issues related to plugin configuration and can be accessed via a browser; it can be used to report bugs.
Users need to execute and use [CTRL]
+ [Left Mouse Button]
to open the logs, [CTRL]
+ [C]
to copy all text, and create a file named logs.txt
to submit issues.
- 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 Issues or email [email protected] with the subject catwrt logs: + issue description
.
TG Group: t.me/miaoergroup // QQ Group: 669190476
CatWrt_update - Check for Updates#
Numeric 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 update checks.
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#
Numeric item 7
The design logic is to automatically detect whether the upgrade conditions are met and automatically obtain the download link, eliminating the need to go 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 options:
Whether to choose the accelerated download provided by ghproxy, originally downloaded directly from Github release.
Restore - Restore Packages#
Numeric item 8
This function is implemented to restore packages after a system upgrade. As is well known, CatWrt (LEDE) loses manually installed plugins after an upgrade.
It works in conjunction with Sysupgrade - System Update; before the system update, this function will back up the list of already installed packages, and after the update is complete, 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 that were present before the upgrade.
Utilities(more) - Utilities#
Numeric item 9
The design logic is to provide support and configuration for some applications in a one-stop configuration.
-
1 Kernel Download: After downloading the kernel, you can enable plugin functionality, which can only be activated with user-provided configuration files.
-
2 Tailscale Configuration: Can automatically configure Tailscale for remote networking and internal network penetration.
-
3 Leigod Configuration: Can install the Leigod accelerator plugin to speed up gaming consoles, PCs, and mobile phones.
-
4 TTYD No Password: Suitable for SSH terminal debugging in non-networked environments or for convenient operation during new environment configuration; it is dangerous, so beginners should not enable it.
-
5 Import IPK Software Packages: Import packages that are not available in the CatWrt software source.
-
6 SSL/TLS Upload: Configure manually downloaded certificate packages for Tencent Cloud and Alibaba Cloud, which need to be paired with DDNS domain resolution.
-
7 Reset Root Password: Restore the password to password, suitable for operations after connecting x86_64 screens 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), which will discard all configurations and plugins and start over.
-
0 Return to Cattools Main Menu
This article was synchronized and updated to xLog by Mix Space. The original link is https://www.miaoer.net/posts/blog/cattools