Documentation ¶
Index ¶
Constants ¶
View Source
const PluginType = "forward"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Args struct { Upstreams []UpstreamConfig `yaml:"upstreams"` Concurrent int `yaml:"concurrent"` // Global options. Socks5 string `yaml:"socks5"` SoMark int `yaml:"so_mark"` BindToDevice string `yaml:"bind_to_device"` Bootstrap string `yaml:"bootstrap"` BootstrapVer int `yaml:"bootstrap_version"` }
type Forward ¶
type Forward struct {
// contains filtered or unexported fields
}
func NewForward ¶
NewForward inits a Forward from given args. args must contain at least one upstream.
func (*Forward) QuickConfigureExec ¶
QuickConfigureExec format: [upstream_tag]...
func (*Forward) RegisterMetricsTo ¶
func (f *Forward) RegisterMetricsTo(r prometheus.Registerer) error
type UpstreamConfig ¶
type UpstreamConfig struct { Tag string `yaml:"tag"` Addr string `yaml:"addr"` // Required. DialAddr string `yaml:"dial_addr"` IdleTimeout int `yaml:"idle_timeout"` // Deprecated: This option has no affect. // TODO: (v6) Remove this option. MaxConns int `yaml:"max_conns"` EnablePipeline bool `yaml:"enable_pipeline"` EnableHTTP3 bool `yaml:"enable_http3"` InsecureSkipVerify bool `yaml:"insecure_skip_verify"` Socks5 string `yaml:"socks5"` SoMark int `yaml:"so_mark"` BindToDevice string `yaml:"bind_to_device"` Bootstrap string `yaml:"bootstrap"` BootstrapVer int `yaml:"bootstrap_version"` }
Click to show internal directories.
Click to hide internal directories.