Skip to content

Commit

Permalink
curl 命令加入 -L 支持重定向,更换 GitHub 代理为 ghp.ci
Browse files Browse the repository at this point in the history
  • Loading branch information
217heidai committed Oct 14, 2024
1 parent 5654c21 commit 017b402
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ COPY default /nestingdns/default

# 下载 site 文件
RUN mkdir -p /nestingdns/default/site && \
curl https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt > /nestingdns/default/site/direct-list.txt && \
curl https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/apple-cn.txt > /nestingdns/default/site/apple-cn.txt && \
curl https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/google-cn.txt > /nestingdns/default/site/google-cn.txt && \
curl https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt > /nestingdns/default/site/proxy-list.txt && \
curl https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt > /nestingdns/default/site/gfw.txt && \
curl https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/greatfire.txt > /nestingdns/default/site/greatfire.txt && \
curl https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/private.txt > /nestingdns/default/site/private.txt && \
curl https://mirror.ghproxy.com/https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/CN-ip-cidr.txt > /nestingdns/default/site/CN-ip-cidr.txt && \
curl https://www.cloudflare-cn.com/ips-v4/# > /nestingdns/default/site/cloudflare.txt
curl -sSL https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt -o /nestingdns/default/site/direct-list.txt && \
curl -sSL https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/apple-cn.txt -o /nestingdns/default/site/apple-cn.txt && \
curl -sSL https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/google-cn.txt -o /nestingdns/default/site/google-cn.txt && \
curl -sSL https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt -o /nestingdns/default/site/proxy-list.txt && \
curl -sSL https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt -o /nestingdns/default/site/gfw.txt && \
curl -sSL https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/greatfire.txt -o /nestingdns/default/site/greatfire.txt && \
curl -sSL https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/private.txt -o /nestingdns/default/site/private.txt && \
curl -sSL https://ghp.ci/https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/CN-ip-cidr.txt -o /nestingdns/default/site/CN-ip-cidr.txt && \
curl -sSL https://www.cloudflare-cn.com/ips-v4/# -o /nestingdns/default/site/cloudflare.txt

# 修正 private.txt 中 msftconnecttest.com、msftncsi.com 域名拦截,导致 windows 系统网络图标,显示网络不可用
RUN sed -i "/domain:msftncsi.com/d" /nestingdns/default/site/private.txt
Expand Down
4 changes: 2 additions & 2 deletions default/conf/adguardhome.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ statistics:
enabled: true
filters:
- enabled: true
url: https://mirror.ghproxy.com/https://raw.githubusercontent.com/217heidai/adblockfilters/main/rules/adblockdns.txt
url: https://ghp.ci/https://raw.githubusercontent.com/217heidai/adblockfilters/main/rules/adblockdns.txt
name: AdBlock DNS
id: 1
- enabled: true
url: https://mirror.ghproxy.com/https://raw.githubusercontent.com/217heidai/adblockfilters/main/rules/adblockfilters.txt
url: https://ghp.ci/https://raw.githubusercontent.com/217heidai/adblockfilters/main/rules/adblockfilters.txt
name: AdBlock Filter
id: 2
whitelist_filters: []
Expand Down
18 changes: 9 additions & 9 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function update_site(){
url=$2

echo `date "+%Y/%m/%d %H:%M:%S"`' [info] update site file: '${filename}
curl -s ${url} > /tmp/nestingdns/${filename}
curl -sSL ${url} -o /tmp/nestingdns/${filename}

if [ -f /tmp/nestingdns/${filename} ]; then
mini=2
Expand Down Expand Up @@ -35,17 +35,17 @@ mkdir -p /tmp/nestingdns

# site 文件下载
echo `date "+%Y/%m/%d %H:%M:%S"`' [info] update site file'
update_site direct-list.txt https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt
update_site apple-cn.txt https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/apple-cn.txt
update_site google-cn.txt https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/google-cn.txt
update_site direct-list.txt https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt
update_site apple-cn.txt https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/apple-cn.txt
update_site google-cn.txt https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/google-cn.txt

update_site proxy-list.txt https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt
update_site gfw.txt https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt
update_site greatfire.txt https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/greatfire.txt
update_site proxy-list.txt https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt
update_site gfw.txt https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt
update_site greatfire.txt https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/greatfire.txt

update_site private.txt https://mirror.ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/private.txt
update_site private.txt https://ghp.ci/https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/private.txt

update_site CN-ip-cidr.txt https://mirror.ghproxy.com/https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/CN-ip-cidr.txt
update_site CN-ip-cidr.txt https://ghp.ci/https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/CN-ip-cidr.txt

update_site cloudflare.txt https://www.cloudflare-cn.com/ips-v4/#

Expand Down

0 comments on commit 017b402

Please sign in to comment.