File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # Update China Domain
4
+ # source: https://raw.githubusercontent.com/huifukejian/test/master/update-china-list.sh
5
+
6
+ # China Domain Download Link
7
+ # URL="https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf"
8
+ URL=" https://dragonuniform.sg/cnlist.php"
9
+
10
+ # DNS Server Group
11
+ PROXYDNS_NAME=" china"
12
+
13
+ # Smartdns Config File Path
14
+ CONFIG_FLODER=" /etc/smartdns"
15
+ CONFIG_FILE=" cnlist.conf"
16
+
17
+ INPUT_FILE=$( mktemp)
18
+ OUTPUT_FILE=" $CONFIG_FLODER /$CONFIG_FILE "
19
+
20
+ if [ " $1 " != " " ]; then
21
+ PROXYDNS_NAME=" $1 "
22
+ fi
23
+
24
+ wget -O $INPUT_FILE $URL
25
+
26
+ sed -i " s/^server=\/\(.*\)\/[^\/]*$/nameserver \/\1\/$PROXYDNS_NAME /g;/^nameserver/!d" $INPUT_FILE 2> /dev/null
27
+
28
+ mv -f $INPUT_FILE $OUTPUT_FILE
You can’t perform that action at this time.
0 commit comments