forward

package
v0.0.0-...-fc6e1cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package forward implements a forwarding proxy.

A cache is used to reduce load on the upstream servers. Cached items are only used for a short time, because otherwise, we would need to provide a feature for flushing the cache. The cache is most useful for taking the load from applications making very frequent repeated queries. The cache also doubles as a way to merge concurrent identical queries, since items are inserted into the cache before sending the query upstream (see also RFC 5452, Section 5).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forward

type Forward struct {
	DNSServers memory.Value[[]string]
	// contains filtered or unexported fields
}

Forward represents a plugin instance that can proxy requests to another (DNS) server. It has a list of proxies each representing one upstream proxy.

func New

func New() *Forward

New returns a new Forward.

func (*Forward) HandleDNS

func (f *Forward) HandleDNS(r *netDNS.Request)

func (*Forward) Run

func (f *Forward) Run(ctx context.Context) error

Directories

Path Synopsis
Package cache implements a cache.
Package cache implements a cache.
Package proxy implements a forwarding proxy.
Package proxy implements a forwarding proxy.
Package up is used to run a function for some duration.
Package up is used to run a function for some duration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL