forked from hugcabbage/shared-lede
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path51_smartdns-config
109 lines (105 loc) · 2.58 KB
/
51_smartdns-config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
app_smartdns=$(opkg find luci-app-smartdns)
[ -z "$app_smartdns" ] && exit 0
#增加smartdns上游服务器
cat << EOF > /etc/config/smartdns
config smartdns
option server_name 'smartdns'
option tcp_server '1'
option ipv6_server '1'
option serve_expired '0'
option rr_ttl_min '300'
option seconddns_tcp_server '1'
option seconddns_no_rule_addr '0'
option seconddns_no_rule_nameserver '0'
option seconddns_no_rule_ipset '0'
option coredump '0'
option dualstack_ip_selection '0'
option port '6053'
option cache_size '2048'
option seconddns_enabled '1'
option seconddns_server_group 'abroad'
option force_aaaa_soa '0'
option seconddns_port '5335'
option enabled '0'
option redirect 'none'
option seconddns_no_speed_check '1'
option seconddns_no_rule_soa '0'
option seconddns_no_dualstack_selection '1'
option seconddns_no_cache '1'
option prefetch_domain '1'
list old_redirect 'none'
list old_port '6053'
list old_enabled '1'
config server
option enabled '1'
option blacklist_ip '0'
option port '853'
option server_group 'abroad'
option type 'tls'
option ip 'dns.google'
option name '谷歌DNS'
config server
option enabled '1'
option ip '1.1.1.1'
option port '853'
option type 'tls'
option name 'Cloudflare DNS'
option server_group 'abroad'
option blacklist_ip '0'
config server
option enabled '1'
option ip '114.114.114.114'
option port '53'
option type 'udp'
option name '114DNS'
config server
option enabled '1'
option type 'udp'
option port '53'
option ip '223.5.5.5'
option name '阿里DNS'
config server
option enabled '1'
option type 'udp'
option port '53'
option name '阿里DNS'
option ip '223.6.6.6'
config server
option enabled '1'
option type 'udp'
option ip '1.2.4.8'
option port '53'
option name 'CNNIC DNS'
config server
option enabled '1'
option type 'udp'
option ip '210.2.4.8'
option port '53'
option name 'CNNIC DNS'
EOF
#增加smartdns address netflix列表,禁止ipv6返回
cat << EOF > /etc/smartdns/address.conf
address /fast.com/#6
address /netflix.ca/#6
address /netflix.com/#6
address /netflix.net/#6
address /netflixinvestor.com/#6
address /netflixtechblog.com/#6
address /nflxext.com/#6
address /nflximg.com/#6
address /nflximg.net/#6
address /nflxsearch.net/#6
address /nflxso.net/#6
address /nflxvideo.net/#6
address /netflixdnstest0.com/#6
address /netflixdnstest1.com/#6
address /netflixdnstest2.com/#6
address /netflixdnstest3.com/#6
address /netflixdnstest4.com/#6
address /netflixdnstest5.com/#6
address /netflixdnstest6.com/#6
address /netflixdnstest7.com/#6
address /netflixdnstest8.com/#6
address /netflixdnstest9.com/#6
EOF
exit 0