Files
v2ray/config/hosts.sh
2018-01-28 22:25:52 +08:00

9 lines
336 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 生成要屏蔽的域名... MVPS HOSTS....
curl "http://winhelp2002.mvps.org/hosts.txt" -o hosts.txt
sed -i '/^#/d; /localhost/d; /^$/d; s/0.0.0.0 //g; s/ //' hosts.txt
sed -i 's/#\(.*\)//g' hosts.txt
sed -i '/^\s*$/d' hosts.txt
sed -i 's/^/"/; s/\s*$/",/' hosts.txt
sed -i '$s/,//' hosts.txt