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.
208 lines
5.6 KiB
HTML
208 lines
5.6 KiB
HTML
<!DOCTYPE html>
|
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>gdns</title>
|
|
|
|
|
|
<link rel="shortcut icon" href="./img/favicon.ico">
|
|
|
|
|
|
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
|
|
|
<link rel="stylesheet" href="./css/theme.css" type="text/css" />
|
|
<link rel="stylesheet" href="./css/theme_extra.css" type="text/css" />
|
|
<link rel="stylesheet" href="./css/highlight.css">
|
|
|
|
|
|
<script>
|
|
// Current page data
|
|
var mkdocs_page_name = "None";
|
|
</script>
|
|
|
|
<script src="./js/jquery-2.1.1.min.js"></script>
|
|
<script src="./js/modernizr-2.8.3.min.js"></script>
|
|
<script type="text/javascript" src="./js/highlight.pack.js"></script>
|
|
<script src="./js/theme.js"></script>
|
|
|
|
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav" role="document">
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
|
<div class="wy-side-nav-search">
|
|
<a href="." class="icon icon-home"> gdns</a>
|
|
<div role="search">
|
|
<form id ="rtd-search-form" class="wy-form" action="./search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
<ul class="current">
|
|
|
|
<li>
|
|
<li class="toctree-l1 current">
|
|
<a class="current" href=".">Usage</a>
|
|
|
|
<ul>
|
|
|
|
<li class="toctree-l3"><a href="#gdns">gdns</a></li>
|
|
|
|
|
|
<li class="toctree-l3"><a href="#features">Features</a></li>
|
|
|
|
|
|
<li class="toctree-l3"><a href="#install">Install</a></li>
|
|
|
|
|
|
<li class="toctree-l3"><a href="#arguments">Arguments</a></li>
|
|
|
|
|
|
<li class="toctree-l3"><a href="#third-part-library">Third-part library</a></li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<li>
|
|
<li class="toctree-l1 ">
|
|
<a class="" href="command_line/">Command line options</a>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<li>
|
|
<li class="toctree-l1 ">
|
|
<a class="" href="ex_config/">Config example</a>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href=".">gdns</a>
|
|
</nav>
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
<div class="rst-content">
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
<ul class="wy-breadcrumbs">
|
|
<li><a href=".">Docs</a> »</li>
|
|
|
|
|
|
|
|
<li>Usage</li>
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
</div>
|
|
<div role="main">
|
|
<div class="section">
|
|
|
|
<h1 id="gdns">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 id="features">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 id="install">Install</h1>
|
|
<pre><code class="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
|
|
|
|
# generate a sample config file
|
|
./gdns -dumpflags > dns.ini
|
|
|
|
# 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
|
|
</code></pre>
|
|
|
|
<h1 id="arguments">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 id="third-part-library">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>
|
|
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
<a href="command_line/" class="btn btn-neutral float-right" title="Command line options"/>Next <span class="icon icon-circle-arrow-right"></span></a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<!-- Copyright etc -->
|
|
|
|
</div>
|
|
|
|
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<div class="rst-versions" role="note" style="cursor: pointer">
|
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
|
|
|
|
|
|
|
<span style="margin-left: 15px"><a href="command_line/" style="color: #fcfcfc">Next »</a></span>
|
|
|
|
</span>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
|
|
<!--
|
|
MkDocs version : 0.14.0
|
|
Build Date UTC : 2015-09-01 02:30:24.602000
|
|
-->
|