banner
miaoer

miaoer

喵二の小博客 https://www.miaoer.net xLog 分站
tg_channel
telegram
bilibili

If you can't use the CatWrt online source, then deploy one locally!

Many people are unable to use various download sources for their routers due to network issues, such as campus networks having detection or firewall blocks, and recently, isn't it because hub.docker.com was sanctioned?

I casually wrote a script that allows Windows to deploy a local copy of the software source by downloading a copy of the software source through domestic cloud disk download software.

Support for Win7 requires you to prepare your own decompression tool.

We need to download the tool first, then download the source, and finally select Extract Here.

Download Tool#

Download Tool

After downloading the tool, extract it to any directory, preferably one without Chinese characters in the directory or partition. I extracted it directly in downloads and used it.

Do not extract all, or it will create nested folders. Just select Extract Here. If nested folders appear, please pull the files out; just avoid nesting.

Current File Structure

C:\

├── Downloads\
│   ├── nginx-for-windows-catwrt-repo-main\  ## Directory where the tool is located
│   │   ├── conf\
|   |   |   ...
│   │   ├── html\
│   │   ├── start.bat
│   │   └── stop.bat

Download Source#

Here you can directly download the resources transferred to the cloud disk or visit Github to download. Both the main (main) and the so-called Source code(zip) in the releases can be recognized by the batch file.

Obtaining the Compressed Package#

Cloud Disk

123 Cloud Disk Extraction Code: miao | Baidu Cloud Disk Extraction Code: miao | Ugreen Extraction Code: GVV3

Or choose one of the following Github accelerated direct links:
GHProxy | DDLC | abskoop cfworker

Here, extract directly in the current directory under the tool, and you will get CatWrt-main, which contains various series of folders.

Do not extract all, or it will create nested folders. Just select Extract Here. If nested folders appear, please pull the files out.

Using Git to Obtain#

If you know how to use Git, you can clone it to your local machine directly in the tool's directory: git clone https://github.com/miaoermua/CatWrt.git


File Structure#

The file structure after extraction should look like this; do not have nested folders!

image

C:\

├── Downloads\
│   ├── nginx-for-windows-catwrt-repo-main\     ## Directory where the tool is located
│   │   ├── conf\
│   │   ├── CatWrt-xxxx.zip\     ## Extract the downloaded software compressed package here; it can be deleted after extraction
│   │   ├── CatWrt-xxxx\     ## Directory where the tool is located; the software package folder, open one layer to find the html files
|   |   |   |   ...
│   │   │   ├── x86_64\
│   │   │   ├── index.html\
|   |   |   |   ...
|   |   |   ...
│   │   ├── html\
│   │   ├── start.bat
│   │   └── stop.bat

Usage#

Double-click start.bat to start. The first time you use it, you need to grant administrator permissions. If there are network authorizations, you also need to check all of them. At that time, you will see that the local address has an http:// protocol header in CMD.

Select the URL, copy it, and open it in the browser to see the software source directory and related descriptions, which are similar to the online version.


Match the URL with the template in the blog [https://www.miaoer.net/posts/network/catwrt-install-application], for example:

src/gz openwrt_core https://repo.miaoer.xyz/targets/x86/64/packages
src/gz openwrt_base https://repo.miaoer.xyz/x86_64/base
src/gz openwrt_luci https://repo.miaoer.xyz/x86_64/luci
src/gz openwrt_packages https://repo.miaoer.xyz/x86_64/packages
src/gz openwrt_routing https://repo.miaoer.xyz/x86_64/routing
src/gz openwrt_telephony https://repo.miaoer.xyz/x86_64/telephony

Replace it with the URLs just outputted. If the IP address is incorrect, please use the actual IP of your computer.

image

src/gz openwrt_core http://10.0.0.100/targets/x86/64/packages
src/gz openwrt_base http://10.0.0.100/x86_64/base
src/gz openwrt_luci http://10.0.0.100/x86_64/luci
src/gz openwrt_packages http://10.0.0.100/x86_64/packages
src/gz openwrt_routing http://10.0.0.100/x86_64/routing
src/gz openwrt_telephony http://10.0.0.100/x86_64/telephony

Then click submit to update the software package list (opkg update), and the replacement is complete. If you have previously encountered issues with online software sources, you can refer to this blog for solutions.

1

image

BusyBox v1.36.0 (2023-07-05 11:34:20 UTC) built-in shell (ash)


     _____     _             _
    |     |___| |_ _ _ _ ___| |_
    |   --| .'|  _| | | |  _|  _|
    |_____|__,|_| |_____|_| |_|
   W I R E L E S S   F R E E D O M

======================================
         CatWrt.v24.3.x86_64
           Blog: miaoer.xyz
 OpenWrt: Lean source r6448-a61217134
======================================
root@CatWrt:~# opkg update
Downloading http://10.0.0.100/targets/x86/64/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://10.0.0.100/x86_64/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://10.0.0.100/x86_64/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://10.0.0.100/x86_64/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://10.0.0.100/x86_64/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://10.0.0.100/x86_64/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
root@CatWrt:~# 

About#

If you do not need to use it, just double-click stop.bat to stop the service. If you accidentally clicked start multiple times, you can go to the task manager to clean it up. It is not recommended to operate on a Windows server with deployed websites, as it will occupy port 80.

Q: Can I use other branches? A: Yes, as long as the name contains CatWrt and is not in Chinese.

Based on ngnix:1.27.0 open-source nginx-for-windows-catwrt-repo

If you have any questions, please leave a comment or join the group to ask.

This article was synchronized and updated to xLog by Mix Space. The original link is https://www.miaoer.net/posts/blog/windows-deploy-catwrt-repo

Footnotes#

  1. https://www.miaoer.net/posts/network/catwrt-applist

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.