From 70840576c408913a0fb6eb2df95490586609a5fc Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Wed, 29 Mar 2023 08:54:28 +0800 Subject: [PATCH] update: assets download links --- Dockerfile | 4 ++-- README.md | 14 ++++++++++---- cmd/config/default.go | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index d0415f0..e3b20d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ RUN mv cmd /tmp/xproxy FROM ${ALPINE} AS geo-data RUN apk add xz -RUN wget "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" -RUN wget "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" +RUN wget "https://cdn.dnomd343.top/v2ray-rules-dat/geoip.dat" +RUN wget "https://cdn.dnomd343.top/v2ray-rules-dat/geosite.dat" RUN tar cJf /tmp/assets.tar.xz geoip.dat geosite.dat FROM ${ALPINE} AS build diff --git a/README.md b/README.md index 5ea1a0b..9591b03 100644 --- a/README.md +++ b/README.md @@ -171,8 +171,8 @@ asset: cron: "0 5 6 * * *" # 每天凌晨06点05分更新 proxy: "socks5://192.168.2.4:1080" # 通过 socks5 代理更新资源 url: - geoip.dat: "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" - geosite.dat: "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" + geoip.dat: "https://cdn.dnomd343.top/v2ray-rules-dat/geoip.dat" + geosite.dat: "https://cdn.dnomd343.top/v2ray-rules-dat/geosite.dat" ``` + `disable` :是否关闭路由资源文件载入,默认为 `false` @@ -183,6 +183,12 @@ asset: + `url` :更新的文件名及下载地址,文件保存至 `assets` 中,默认为空 +> 默认下载链接为 `Loyalsoldier/v2ray-rules-dat` 镜像,如果您的网络可以正常访问 Github 资源,可以换用以下 URL: +> +> + `https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat` +> +> + `https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat` + ### 自定义脚本 ```yaml @@ -435,8 +441,8 @@ asset: update: cron: "0 5 6 * * *" url: - geoip.dat: "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" - geosite.dat: "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" + geoip.dat: "https://cdn.dnomd343.top/v2ray-rules-dat/geoip.dat" + geosite.dat: "https://cdn.dnomd343.top/v2ray-rules-dat/geosite.dat" ``` 用户需要根据实际需求更改配置文件,保存以后重启容器即可生效: diff --git a/cmd/config/default.go b/cmd/config/default.go index 2efe54b..e777cd4 100644 --- a/cmd/config/default.go +++ b/cmd/config/default.go @@ -27,8 +27,8 @@ var defaultConfig = map[string]interface{}{ "update": map[string]interface{}{ "cron": "0 5 6 * * *", "url": map[string]string{ - "geoip.dat": "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat", - "geosite.dat": "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat", + "geoip.dat": "https://cdn.dnomd343.top/v2ray-rules-dat/geoip.dat", + "geosite.dat": "https://cdn.dnomd343.top/v2ray-rules-dat/geosite.dat", }, }, },