From 76328271776388ba2c1e34f6b8bc67e074e39aa3 Mon Sep 17 00:00:00 2001 From: H1JK Date: Thu, 20 Jul 2023 23:24:48 +0800 Subject: [PATCH] chore: Use Meta-geoip for default --- Dockerfile | 6 +++--- config/config.go | 2 +- constant/path.go | 2 +- docs/config.yaml | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index f5dcc307..6c5a91f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,9 @@ RUN echo "I'm building for $TARGETPLATFORM" RUN apk add --no-cache gzip && \ mkdir /clash-config && \ - wget -O /clash-config/Country.mmdb https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb && \ - wget -O /clash-config/geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat && \ - wget -O /clash-config/geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat + wget -O /clash-config/geoip.metadb https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.metadb && \ + wget -O /clash-config/geosite.dat https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat && \ + wget -O /clash-config/geoip.dat https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat COPY docker/file-name.sh /clash/file-name.sh WORKDIR /clash diff --git a/config/config.go b/config/config.go index c7ae0fe1..ba61070c 100644 --- a/config/config.go +++ b/config/config.go @@ -419,7 +419,7 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) { StoreSelected: true, }, GeoXUrl: RawGeoXUrl{ - Mmdb: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/country.mmdb", + Mmdb: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.metadb", GeoIp: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat", GeoSite: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat", }, diff --git a/constant/path.go b/constant/path.go index e23ae886..d7477e0e 100644 --- a/constant/path.go +++ b/constant/path.go @@ -99,7 +99,7 @@ func (p *path) MMDB() string { } } } - return P.Join(p.homeDir, "Country.mmdb") + return P.Join(p.homeDir, "geoip.metadb") } func (p *path) OldCache() string { diff --git a/docs/config.yaml b/docs/config.yaml index 0cec9a04..6ae3910e 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -19,9 +19,9 @@ mode: rule #自定义 geodata url geox-url: - geoip: "https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat" - geosite: "https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat" - mmdb: "https://cdn.jsdelivr.net/gh/Loyalsoldier/geoip@release/Country.mmdb" + geoip: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat" + geosite: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat" + mmdb: "https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.metadb" log-level: debug # 日志等级 silent/error/warning/info/debug