fastforward

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const PluginType = "fast_forward"

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 {
	Upstream    []*UpstreamConfig `yaml:"upstream"`
	Deduplicate bool              `yaml:"deduplicate"`
	CA          []string          `yaml:"ca"` // certificate paths, used by "dot", "doh" as ca root.
}

type UpstreamConfig added in v0.21.0

type UpstreamConfig struct {
	// Protocol: upstream protocol, can be:
	// "", "udp" -> udp upstream
	// "tcp" -> tcp upstream
	// "dot", "tls" -> dns over tls upstream
	// "doh", "https" -> dns over https (rfc 8844) upstream
	Protocol string `yaml:"protocol"`

	Addr       string `yaml:"addr"`
	Trusted    bool   `yaml:"trusted"` // If an upstream is "trusted", it's err rcode response will be accepted.
	Socks5     string `yaml:"socks5"`
	ServerName string `yaml:"server_name"`
	URL        string `yaml:"url"`

	Timeout int `yaml:"timeout"`

	IdleTimeout        int  `yaml:"idle_timeout"`
	MaxConns           int  `yaml:"max_conns"`
	InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
}

Jump to

Keyboard shortcuts

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