felixonmars / dnsmasq-china-list

Chinese-specific configuration to improve your favorite DNS server. Best partner for chnroutes.
Other
5.56k stars 846 forks source link

dnsmasq-china-list

Chinese-specific configuration to improve your favorite DNS server. Best partner for chnroutes.

Details

Usage

Automatic Installation (recommended)

  1. Fetch the installer from github (or a mirror): wget https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/install.sh
  2. (Optional) Edit it to use your favorite DNS server and/or another mirror to download the list.
  3. Run it as root: sudo ./install.sh

You can save the installer and run it again to update the list regularly.

Manual Installation

  1. Place accelerated-domains.china.conf, bogus-nxdomain.china.conf (and optionally google.china.conf, apple.china.conf) under /etc/dnsmasq.d/ (Create the folder if it does not exist).
  2. Uncomment "conf-dir=/etc/dnsmasq.d" in /etc/dnsmasq.conf
  3. (Optional) Place dnsmasq-update-china-list into /usr/bin/
  4. (Optional) Make custom DNS server configuration and/or other services' configuration.

    # change the default DNS server to 202.96.128.86
    make SERVER=202.96.128.86 dnsmasq
    # generate unbound's configuration
    make unbound
    # generate bind's configuration
    make bind
    # full example of generating dnscrypt-proxy forwarding rules for Windows
    make SERVER=101.6.6.6 NEWLINE=DOS dnscrypt-proxy

License

Copyright © 2015 Felix Yan <felixonmars@archlinux.org>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENSE file for more details.