Browse Source

update: assets download links

v1.x.x
Dnomd343 2 years ago
parent
commit
70840576c4
  1. 4
      Dockerfile
  2. 14
      README.md
  3. 4
      cmd/config/default.go

4
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

14
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"
```
用户需要根据实际需求更改配置文件,保存以后重启容器即可生效:

4
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",
},
},
},

Loading…
Cancel
Save