[PATCH] treewide: use CDN for downloads

Paul Spooren mail at aparcar.org
Sat Jan 30 17:11:56 EST 2021


Use CDN for opkg repositories.

Signed-off-by: Paul Spooren <mail at aparcar.org>
---
Tested with browser and opkg running on router.
HTTP works only for specific user-agents and `ipk` files, this is a
*limitation* (or security precaution) of the origin server not
influenced by the CDN.

 include/version.mk                 | 2 +-
 package/base-files/image-config.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/version.mk b/include/version.mk
index b7f42e13bb..e38d22bcd4 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -32,7 +32,7 @@ VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
 VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
 
 VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
-VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/snapshots)
+VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.cdn.openwrt.org/snapshots)
 
 VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
 VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in
index bfa3055cc8..71de5fd59f 100644
--- a/package/base-files/image-config.in
+++ b/package/base-files/image-config.in
@@ -183,7 +183,7 @@ if VERSIONOPT
 	config VERSION_REPO
 		string
 		prompt "Release repository"
-		default "https://downloads.openwrt.org/snapshots"
+		default "https://downloads.cdn.openwrt.org/snapshots"
 		help
 			This is the repository address embedded in the image, it defaults
 			to the trunk snapshot repo; the url may contain the following placeholders:
-- 
2.29.2




More information about the openwrt-devel mailing list