mirror of
https://github.com/folbricht/routedns.git
synced 2025-12-17 15:45:21 -06:00
More documentation updates
This commit is contained in:
@@ -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
8
doc.go
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user