Merge pull request #187 from Loyalsoldier/speedtest

Automatically generate ookla-speedtest sub-list from source
This commit is contained in:
Richard Chen 2020-01-25 21:28:48 +08:00 committed by GitHub
commit 491c1b5cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 9380 deletions

View File

@ -21,12 +21,21 @@ jobs:
echo "::set-env name=NAME::$(date +%Y%m%d%H%M)"
echo "::set-env name=TAG_NAME::$(date +%Y%m%d%H%M)"
echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)"
echo "::set-env name=REPO_URL::github.com/v2ray/domain-list-community"
echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin"
shell: bash
- name: Get geosite code
run: |
go get -u -v -insecure github.com/v2ray/domain-list-community
go get -u -v -insecure $REPO_URL
- 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/$REPO_URL/data/ookla-speedtest
echo "include:ookla-speedtest-ads" >> $GOPATH/src/$REPO_URL/data/ookla-speedtest
- name: Build geosite.dat file
run: |

File diff suppressed because it is too large Load Diff