You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gdns/index.html

89 lines
3.5 KiB
HTML

<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Gdns by fangdingjun</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
</head>
<body>
<section class="page-header">
<h1 class="project-name">Gdns</h1>
<h2 class="project-tagline">a dns proxy server write by go</h2>
<a href="https://github.com/fangdingjun/gdns" class="btn">View on GitHub</a>
<a href="https://github.com/fangdingjun/gdns/zipball/master" class="btn">Download .zip</a>
<a href="https://github.com/fangdingjun/gdns/tarball/master" class="btn">Download .tar.gz</a>
</section>
<section class="main-content">
<h1>
<a id="gdns" class="anchor" href="#gdns" aria-hidden="true"><span class="octicon octicon-link"></span></a>gdns</h1>
<p>a dns proxy server write by go</p>
<p>gdns much like dnsmasq or chinadns, but it can run on windows.</p>
<h1>
<a id="features" class="anchor" href="#features" aria-hidden="true"><span class="octicon octicon-link"></span></a>Features</h1>
<p>support different domains use different upstream dns servers</p>
<p>support contact to the upstream dns server by tcp or udp</p>
<p>support blacklist list to block the fake ip</p>
<h1>
<a id="install" class="anchor" href="#install" aria-hidden="true"><span class="octicon octicon-link"></span></a>Install</h1>
<div class="highlight highlight-bash"><pre><span class="pl-c"># get the depended library</span>
go get github.com/miekg/dns
go get github.com/vharitonsky/iniflags
git clone https://github.com/fangdingjun/gdns
<span class="pl-c1">cd</span> gdns
go build
<span class="pl-c"># generate a sample config file</span>
./gdns -dumpflags <span class="pl-k">&gt;</span> dns.ini
<span class="pl-c"># edit the dns.ini and run, need root privileges to bind on port 53</span>
sudo ./gdns -config dns.ini
<span class="pl-c"># test it</span>
dig @localhost twitter.com</pre></div>
<h1>
<a id="arguments" class="anchor" href="#arguments" aria-hidden="true"><span class="octicon octicon-link"></span></a>Arguments</h1>
<p>use <code>gdns -h</code> to show the command line arguments.</p>
<p>all arguments can specialed in config file or in command line.</p>
<p>there is a sample file in the <code>config_sample/</code> directory.</p>
<h1>
<a id="third-part-library" class="anchor" href="#third-part-library" aria-hidden="true"><span class="octicon octicon-link"></span></a>Third-part library</h1>
<p>use
<a href="https://github.com/miekg/dns">dns</a>
library to parse the dns message</p>
<p>use
<a href="https://github.com/vharitonsky/iniflags">iniflags</a>
library to process the command line arguments and the config file</p>
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/fangdingjun/gdns">Gdns</a> is maintained by <a href="https://github.com/fangdingjun">fangdingjun</a>.</span>
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
</footer>
</section>
</body>
</html>