fastforward

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: GPL-3.0 Imports: 19 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"`
}

type UpstreamConfig added in v0.21.0

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

	// Addr: upstream network "host:port" addr, "port" can be omitted.
	// Addr can not be empty.
	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"`      // used by "tcp", "dot", "doh" as Socks5 server addr.
	ServerName string `yaml:"server_name"` // used by "dot" as server certificate name. It can not be empty.
	URL        string `yaml:"url"`         // used by "doh" as server endpoint url. It can not be empty.

	// Timeout: used by all protocols.
	// In "udp", "tcp", "dot", it's read timeout.
	// In "doh", it's a time limit for the query, including dial connection.
	// Default is generalReadTimeout.
	Timeout uint `yaml:"timeout"`

	// IdleTimeout used by all protocols to control connection idle timeout.
	// If IdleTimeout == 0, connection reuse will be disabled.
	IdleTimeout        uint     `yaml:"idle_timeout"`
	InsecureSkipVerify bool     `yaml:"insecure_skip_verify"` // used by "dot", "doh". Skip tls verification.
	CA                 []string `yaml:"ca"`                   // certificate path, used by "dot", "doh" as ca root.
}

UpstreamConfig: Note: It is not reusable.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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