{"action":"created","issue":{"url":"https://api.github.com/repos/aa65535/openwrt-chinadns/issues/33","labels_url":"https://api.github.com/repos/aa65535/openwrt-chinadns/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/aa65535/openwrt-chinadns/issues/33/comments","events_url":"https://api.github.com/repos/aa65535/openwrt-chinadns/issues/33/events","html_url":"https://github.com/aa65535/openwrt-chinadns/issues/33","id":117160011,"number":33,"title":"chindns配合pdnsd的问题","user":{"login":"diaochaju","id":10000000,"avatar_url":"https://avatars.githubusercontent.com/u/10000000?v=3","gravatar_id":"","url":"https://api.github.com/users/diaochaju","html_url":"https://github.com/diaochaju","followers_url":"https://api.github.com/users/diaochaju/followers","following_url":"https://api.github.com/users/diaochaju/following{/other_user}","gists_url":"https://api.github.com/users/diaochaju/gists{/gist_id}","starred_url":"https://api.github.com/users/diaochaju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaochaju/subscriptions","organizations_url":"https://api.github.com/users/diaochaju/orgs","repos_url":"https://api.github.com/users/diaochaju/repos","events_url":"https://api.github.com/users/diaochaju/events{/privacy}","received_events_url":"https://api.github.com/users/diaochaju/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-16T16:14:04Z","updated_at":"2015-11-16T23:51:41Z","closed_at":null,"body":"发现pdnsd配合chinadns用udp方式查询dns的速度很快，请问用udp方式查询好国外非53端口的dns服务器会被污染dns吗？(服务器是用pdnsd搭建的)"},"comment":{"url":"https://api.github.com/repos/aa65535/openwrt-chinadns/issues/comments/157212032","html_url":"https://github.com/aa65535/openwrt-chinadns/issues/33#issuecomment-157212032","issue_url":"https://api.github.com/repos/aa65535/openwrt-chinadns/issues/33","id":157212032,"user":{"login":"mysteriouss","id":985230,"avatar_url":"https://avatars.githubusercontent.com/u/985230?v=3","gravatar_id":"","url":"https://api.github.com/users/mysteriouss","html_url":"https://github.com/mysteriouss","followers_url":"https://api.github.com/users/mysteriouss/followers","following_url":"https://api.github.com/users/mysteriouss/following{/other_user}","gists_url":"https://api.github.com/users/mysteriouss/gists{/gist_id}","starred_url":"https://api.github.com/users/mysteriouss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysteriouss/subscriptions","organizations_url":"https://api.github.com/users/mysteriouss/orgs","repos_url":"https://api.github.com/users/mysteriouss/repos","events_url":"https://api.github.com/users/mysteriouss/events{/privacy}","received_events_url":"https://api.github.com/users/mysteriouss/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T23:51:41Z","updated_at":"2015-11-16T23:51:41Z","body":"query_method=tcp_only; 查询国外的DNS 可以保证无污染；\r\n在ss速度还可以情况下，可以直接使用ss server的UDP Forward（ss-tunnel好像只支持dig +tcp的）；\r\n采用dnsmasq -> pdnsd -> redsocks sock5 -> shadowsocks-libev（不是spec），这样应该就可以替掉ChinaDNS了；\r\n\r\n以下pdnsd.conf仅供参考\r\n\r\nglobal {\r\n\tperm_cache=102400;\r\n\tcache_dir=\"/var/pdnsd\";\r\n#\tpid_file = /var/run/pdnsd.pid;\r\n\trun_as=\"nobody\";\r\n\tserver_ip = 0.0.0.0;  # Use eth0 here if you want to allow other\r\n\t\t\t\t# machines on your network to query pdnsd.\r\n\tserver_port = 5555;\r\n\tstatus_ctl = on;\r\n\tparanoid=on;       # This option reduces the chance of cache poisoning\r\n\t                   # but may make pdnsd less efficient, unfortunately.\r\n\tquery_method=tcp_only;\r\n\tmin_ttl=15m;       # Retain cached entries at least 15 minutes.\r\n\tmax_ttl=1w;        # One week.\r\n\ttimeout=10;        # Global timeout option (10 seconds).\r\n\tneg_domain_pol=on;\r\n\tudpbufsize=10240;   # Upper limit on the size of UDP messages.\r\n}\r\n\r\nserver{\r\n label = \"114\";\r\n ip = 114.114.114.114,1.2.4.8;\r\n proxy_only = on;\r\n policy = included;\r\n exclude = .gmail.com,\r\n .google-analytics.com,\r\n .google.cn,\r\n .google.com,\r\n .facebook.com,\r\n .instagram.com,\r\n .youtube.com,\r\n .cdninstagram.com,\r\n .google.com.hk,\r\n .google.co.jp;\r\n}\r\n\r\n# The following section is most appropriate if you have a fixed connection to\r\n# the Internet and an ISP which provides good DNS servers.\r\nserver {\r\n\tlabel= \"dns\";\r\n\tip = 127.0.0.1;  # Put your ISP's DNS-server address(es) here.\r\n\tport = 5000; //Shadowsocks UDP Forward (ss-tunnel)\r\n\tproxy_only=on;     # Do not query any name servers beside your ISP's.\r\n\t                   # This may be necessary if you are behind some\r\n\t                   # kind of firewall and cannot receive replies\r\n\t                   # from outside name servers.\r\n\ttimeout=3;         # Server timeout; this may be much shorter\r\n\t\t\t   # that the global timeout option.\r\n\tuptest=if;         # Test if the network interface is active.\r\n\tinterface=eth0;    # The name of the interface to check.\r\n\tinterval=10m;      # Check every 10 minutes.\r\n\tpurge_cache=off;   # Keep stale cache entries in case the ISP's\r\n\t\t\t   # DNS servers go offline.\r\n\tedns_query=no;    # Use EDNS for outgoing queries to allow UDP messages\r\n\t\t\t   # larger than 512 bytes. May cause trouble with some\r\n\t\t\t   # legacy systems.\r\n\texclude=.baidu.com,.weibo.com,.taobao.com,.jd.com;\r\n}"}}