Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 2.07 KB

README.md

File metadata and controls

63 lines (49 loc) · 2.07 KB

ChinaDNS-C for OpenWrt

简介

本项目是 ChinaDNS-C 在 OpenWrt 上的移植
当前版本: 1.2.0-1
预编译 IPK 下载

编译

  • 从 OpenWrt 的 SDK 编译

    # 以 ar71xx 平台为例
    tar xjf OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2
    cd OpenWrt-SDK-ar71xx-*
    # 获取 Makefile
    git clone https://github.com/aa65535/openwrt-chinadns.git package/chinadns-c
    # 选择要编译的包 Network -> ChinaDNS-C
    make menuconfig
    # 开始编译
    make package/chinadns-c/compile V=99

配置

  • 默认 DNS 服务器端口为 5353, 可使用 LuCI 进行配置

  • 可搭配路由器自带的 Dnsmasq 使用 借助其 DNS 缓存提升查询速度

    LuCI 中定位至「网络 - DHCP/DNS」
    「基本设置」 本地服务器 填写 127.0.0.1#5353
    「HOSTS和解析文件」勾选 忽略解析文件

  • /etc/chinadns_chnroute.txt 可以使用下面命令更新

     wget -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv4/ { printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > /etc/chinadns_chnroute.txt

Name Description
openwrt-dnsmasq Dnsmasq Patch & Makefile for OpenWrt
openwrt-shadowsocks Shadowsocks-libev for OpenWrt
openwrt-shadowvpn ShadowVPN for OpenWrt
openwrt-dist-luci LuCI Applications for OpenWrt-dist
openwrt-redsocks2 RedSocks2 for OpenWrt