forward_must_edns0

package
v0.0.0-...-5ef9333 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

README

forward_must_edns0

这个插件会发送包含 EDNS0 的 UDP 报文,然后过滤掉没有 EDNS0 回应的报文。

如果服务器支持 EDNS0,则会回应 EDNS0。过滤掉没有 EDNS0 报文可以过滤掉某些有问题的回应。

参数:

tag: ''
type: 'forward_must_edns0'
args:
  upstream:
    - addr: 8.8.8.8   # 上游 UDP 地址。省略端口号会用 53 默认值。
    - addr: 1.1.1.1   # 可配置多个。

Documentation

Index

Constants

View Source
const PluginType = "forward_must_edns0"

Variables

This section is empty.

Functions

func Init

func Init(bp *handler.BP, args interface{}) (p handler.Plugin, err error)

Types

type Args

type Args struct {
	UpstreamConfig []UpstreamConfig `yaml:"upstream"`
}

type Upstream

type Upstream struct {
	// contains filtered or unexported fields
}

func NewUpstream

func NewUpstream(addr string) *Upstream

func (*Upstream) Exchange

func (u *Upstream) Exchange(m *dns.Msg) (*dns.Msg, error)

type UpstreamConfig

type UpstreamConfig struct {
	Addr    string `yaml:"addr"`
	Trusted bool   `yaml:"trusted"`
}

Jump to

Keyboard shortcuts

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