由于OpenWrt官方软件源服务器在国外,会遇到国内访问速度慢甚至无法访问的情况。 我们可以将软件源切换为国内镜像软件源,以提升软件下载速度。
更换方法
打开 系统 -> 软件包 点击 配置opkg 来修改opkg使用到的各个配置文件。 将 /etc/opkg/distfeeds.conf 文件原有的内容注释或删除,然后增加国内镜像软件源地址。
中科大OpenWrt源
src/gz openwrt_core https://mirrors.ustc.edu.cn/openwrt/releases/21.02.0/targets/rockchip/armv8/packages
src/gz openwrt_base https://mirrors.ustc.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/base
src/gz openwrt_luci https://mirrors.ustc.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/luci
src/gz openwrt_packages https://mirrors.ustc.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/packages
src/gz openwrt_routing https://mirrors.ustc.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/routing
src/gz openwrt_telephony https://mirrors.ustc.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/telephony
参考资料: http://mirrors.ustc.edu.cn/help/openwrt.html
同样按照上面的方法替换域名即可。可以使用如下命令操作:
sed -i 's/downloads.openwrt.org/mirrors.ustc.edu.cn\/openwrt/g' /etc/opkg/distfeeds.conf
之后运行 opkg update
更新软件索引,注意检查是否出现错误。
清华OpenWrt源
src/gz openwrt_core https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.0/targets/rockchip/armv8/packages
src/gz openwrt_base https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/base
src/gz openwrt_luci https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/luci
src/gz openwrt_packages https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/packages
src/gz openwrt_routing https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/routing
src/gz openwrt_telephony https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.0/packages/aarch64_generic/telephony
参考资料: https://mirrors.tuna.tsinghua.edu.cn/help/openwrt/
执行如下命令自动替换
sed -i 's/downloads.openwrt.org/mirrors.tuna.tsinghua.edu.cn\/openwrt/g' /etc/opkg/distfeeds.conf
手工替换
登录到路由器,并编辑 /etc/opkg/distfeeds.conf
文件,将其中的 downloads.openwrt.org
替换为 mirrors.tuna.tsinghua.edu.cn/openwrt
即可
OpenWrt官方源
src/gz openwrt_core https://downloads.openwrt.org/releases/21.02.0/targets/rockchip/armv8/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/21.02.0/packages/aarch64_generic/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/21.02.0/packages/aarch64_generic/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/21.02.0/packages/aarch64_generic/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/21.02.0/packages/aarch64_generic/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/21.02.0/packages/aarch64_generic/telephony
没有回复内容