More documentation updates

This commit is contained in:
folbrich
2019-06-08 15:21:14 -06:00
parent ebe039df03
commit 0c7ab9ee45
3 changed files with 11 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ Features:
- Support for DNS-over-TLS (DoT)
- Support for DNS-over-HTTPS (DoH)
- Support for plain DNS, UDP and TCP for incoming and outgoing traffic
- Support for plain DNS, UDP and TCP for incoming and outgoing requests
- Connection reuse and pipelining queries for efficiency
- Multiple failover and load-balancing algorithms
- Routing of queries based on type and/or query name

8
doc.go
View File

@@ -27,5 +27,13 @@ Listeners
While resolvers handle outgoing queries to upstream servers, listeners are the receivers
of queries. Multiple listeners can be started for different protocols and on different ports.
Each listener forwards received queries to one resolver, group, or router.
This example starts a stub resolver on the local machine which will forward all queries
via DNS-over-TLS to provide privacy.
r := rdns.NewDoTClient("1.1.1.1:853")
l := rdns.NewDNSListener("127.0.0.1:53", "udp", r)
panic(l.Start())
*/
package rdns

View File

@@ -44,7 +44,8 @@ func (r *Router) Resolve(q *dns.Msg) (*dns.Msg, error) {
// Add a new route to the router. New routes are appended to the existing
// ones and are evaluated in the same order they're added. The default
// route (no name, no type) should be added last since subsequently added
// routes won't have any impact.
// routes won't have any impact. Name is a regular expression that is
// applied to the name in the first question section of the DNS message.
func (r *Router) Add(name, typ string, resolver Resolver) error {
t, err := stringToType(typ)
if err != nil {