smartDNS is a smart DNS server/forwarder/dispatcher written in Go.
OTHER License
smartDNS is a smart DNS server/forwarder/dispatcher written in Go.
smartDNS based on overture.
Please note: If you are using the binary releases, please follow the instructions in the README file with corresponding git version tag. The README in master branch are subject to change and does not always reflect the correct instructions to your binary release version.
Overture can force custom domain DNS queries to use selected DNS when applicable.
For custom IP network, overture will query the domain with primary DNS firstly. If the answer is empty or the IP is not matched then overture will finally use the alternative DNS servers.
You can download binary releases from the release.
Start with the default config file -> ./config.json
$ ./smartDNS
Or use your own config file:
$ ./smartDNS -c /path/to/config.json
Verbose mode:
$ ./smartDNS -v
Log to file:
$ ./smartDNS -l /path/to/overture.log
For other options, please see help:
$ ./smartDNS -h
Tips:
Configuration file is "config.json" by default:
{
"BindAddress": ":53",
"DebugHTTPAddress": "127.0.0.1:5555",
"DNSBunch": {
"HK-DNS": [
{
"Name": "Microsoft-HK",
"Address": "47.91.128.195:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 6,
"EDNSClientSubnet": {
"Policy": "disable",
"ExternalIP": "",
"NoCookie": false
}
},
{
"Name": "Google-HK",
"Address": "8.8.8.8:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 3,
"EDNSClientSubnet": {
"Policy": "enable",
"ExternalIP": "",
"NoCookie": false
}
}
],
"CN-DNS": [
{
"Name": "ChinaTelecom-CN",
"Address": "114.114.114.114:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 6,
"EDNSClientSubnet": {
"Policy": "disable",
"ExternalIP": "",
"NoCookie": false
}
},
{
"Name": "Baidu-CN",
"Address": "180.76.76.76:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 6,
"EDNSClientSubnet": {
"Policy": "disable",
"ExternalIP": "",
"NoCookie": false
}
}
]
},
"DNSFilter": {
"HK-DNS": {
"IPNetworkFile": "",
"DomainFile": "configuration/hk.domain",
"Matcher": "regex-list"
},
"CN-DNS": {
"IPNetworkFile": "",
"DomainFile": "configuration/cn.domain",
"Matcher": "regex-list"
}
},
"IPv6UseAlternativeDNS": false,
"HostsFile": "./hosts",
"MinimumTTL": 0,
"DomainTTLFile": "./domain_ttl_sample",
"CacheSize": 0,
"RejectQType": [
255
]
}```
This project is under the MIT license. See the LICENSE file for the full license text.