From f8bb1017c6ab96455197227219e96997bf0e2974 Mon Sep 17 00:00:00 2001 From: Loyalsoldier Date: Sun, 26 Jan 2020 22:16:41 +0800 Subject: [PATCH] Automatically generate ookla-speedtest sub-list from source --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3cb5b9..147cf2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,6 +62,14 @@ jobs: - name: Download geosite project run: | go get -u -v -insecure $GEOSITE_REPO + + - name: Automatically generate ookla-speedtest sub-list from source + run: | + curl -L -o servers-source.xml "https://c.speedtest.net/speedtest-servers-static.php" + cat servers-source.xml | sed -nEe 's/.+host="(.+):[0-9]+".+/\L\1/p' | sort -u > hosts-with-ip.txt + sed -E '/^([0-9]{1,3}\.){3}[0-9]{1,3}$/d' hosts-with-ip.txt > hosts-without-ip.txt + cat hosts-without-ip.txt | awk '{printf "full:%s\n", $0}' > $GOPATH/src/$GEOSITE_REPO/data/ookla-speedtest + echo "include:ookla-speedtest-ads" >> $GOPATH/src/$GEOSITE_REPO/data/ookla-speedtest - name: Get and add direct domains into temp-direct.txt file run: |