前言

openwrt的服务器在国内访问速度比较慢,有时会失效或者地区原因无法连接,所以我们需要更换到国内的软件源,这样能更快的访问和下载到我们所以需要的软件。

步骤

目前系统为 openwrt 22.03.5

任意方式打开软件源配置文件:(这边以命令行模式编辑)

1
vim /etc/opkg/distfeeds.conf

将所有内容删除,替换以下任意一个软件源即可。

阿里云

1
2
3
4
5
6
src/gz openwrt_core https://mirrors.aliyun.com/openwrt/releases/22.03.5/targets/x86/64/packages
src/gz openwrt_base https://mirrors.aliyun.com/openwrt/releases/22.03.5/packages/x86_64/base
src/gz openwrt_luci https://mirrors.aliyun.com/openwrt/releases/22.03.5/packages/x86_64/luci
src/gz openwrt_packages https://mirrors.aliyun.com/openwrt/releases/22.03.5/packages/x86_64/packages
src/gz openwrt_routing https://mirrors.aliyun.com/openwrt/releases/22.03.5/packages/x86_64/routing
src/gz openwrt_telephony https://mirrors.aliyun.com/openwrt/releases/22.03.5/packages/x86_64/telephony

腾讯云

1
2
3
4
5
6
src/gz openwrt_core https://mirrors.cloud.tencent.com/openwrt/releases/22.03.5/targets/x86/64/packages
src/gz openwrt_base https://mirrors.cloud.tencent.com/openwrt/releases/22.03.5/packages/x86_64/base
src/gz openwrt_luci https://mirrors.cloud.tencent.com/openwrt/releases/22.03.5/packages/x86_64/luci
src/gz openwrt_packages https://mirrors.cloud.tencent.com/openwrt/releases/22.03.5/packages/x86_64/packages
src/gz openwrt_routing https://mirrors.cloud.tencent.com/openwrt/releases/22.03.5/packages/x86_64/routing
src/gz openwrt_telephony https://mirrors.cloud.tencent.com/openwrt/releases/22.03.5/packages/x86_64/telephony

清华大学

1
2
3
4
5
6
src/gz openwrt_core https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.5/targets/x86/64/packages
src/gz openwrt_base https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.5/packages/x86_64/base
src/gz openwrt_luci https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.5/packages/x86_64/luci
src/gz openwrt_packages https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.5/packages/x86_64/packages
src/gz openwrt_routing https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.5/packages/x86_64/routing
src/gz openwrt_telephony https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.5/packages/x86_64/telephony

中科大

1
2
3
4
5
6
src/gz openwrt_core http://mirrors.ustc.edu.cn/openwrt/releases/22.03.5/targets/x86/64/packages
src/gz openwrt_base http://mirrors.ustc.edu.cn/openwrt/releases/22.03.5/packages/x86_64/base
src/gz openwrt_luci http://mirrors.ustc.edu.cn/openwrt/releases/22.03.5/packages/x86_64/luci
src/gz openwrt_packages http://mirrors.ustc.edu.cn/openwrt/releases/22.03.5/packages/x86_64/packages
src/gz openwrt_routing http://mirrors.ustc.edu.cn/openwrt/releases/22.03.5/packages/x86_64/routing
src/gz openwrt_telephony http://mirrors.ustc.edu.cn/openwrt/releases/22.03.5/packages/x86_64/telephony

更改完成之后保存退出。

以上内容的系统版本和系统架构皆可以更换, 22.03.5 为系统版本, x86_64 为系统架构。如有不同之处更换成为自己的设备版本和架构即可。