Last active
January 4, 2024 15:06
-
-
Save nikotung/d250b6fa8ced67b5ea7f8387c5fe7016 to your computer and use it in GitHub Desktop.
geoip-cn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
## From https://github.com/Loyalsoldier/geoip 少了 MaxMind GeoLite2 | |
# 主要是给mosdns 用,text 格式 | |
urls=("https://raw.githubusercontent.com/gaoyifan/china-operator-ip/ip-lists/china6.txt" "https://raw.githubusercontent.com/gaoyifan/china-operator-ip/ip-lists/china.txt" "https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt") | |
## Download each file | |
for url in "${urls[@]}"; do | |
wget -P .temp/ "$url" | |
done | |
# Merge the files | |
cat .temp/china_ip_list.txt .temp/china.txt .temp/china6.txt > geoip-cn.txt | |
rm -rf .temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment