From 89e7b6fe89ab99fb19e6cc1e1d6df36a2c1bf50b Mon Sep 17 00:00:00 2001 From: Dingjun Date: Mon, 31 Aug 2015 18:08:57 +0800 Subject: [PATCH] Update README.md --- README.md | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index f0da960..8fa245b 100644 --- a/README.md +++ b/README.md @@ -6,32 +6,34 @@ gdns much like dnsmasq or chinadns, but it can run on windows. Features ======== -support different domains use different upstream servers +support different domains use different upstream dns servers -support contact to the upstream server by tcp or udp +support contact to the upstream dns server by tcp or udp support blacklist list to block the fake ip Install ======= - # get the depended library - go get github.com/miekg/dns - go get github.com/vharitonsky/iniflags +```bash +# get the depended library +go get github.com/miekg/dns +go get github.com/vharitonsky/iniflags - git clone https://github.com/fangdingjun/gdns - cd gdns - go build +git clone https://github.com/fangdingjun/gdns +cd gdns +go build - # generate a sample config file - ./gdns -dumpflags > dns.ini +# generate a sample config file +./gdns -dumpflags > dns.ini - # edit the dns.ini - sudo ./gdns -config dns.ini - - # test it - dig @localhost twitter.com +# edit the dns.ini and run, need root privileges to bind on port 53 +sudo ./gdns -config dns.ini +# test it +dig @localhost twitter.com +``` + Arguments =========== @@ -39,4 +41,14 @@ use `gdns -h` to show the command line arguments. all arguments can specialed in config file or in command line. -this is a sample file in the config_sample directory. +there is a sample file in the `config_sample/` directory. + +Third-part library +================== +use +[dns](https://github.com/miekg/dns) +library to parse the dns message + +use +[iniflags](https://github.com/vharitonsky/iniflags) +library to process the command line arguments and the config file