v5cfg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadHeterogeneousConfigFromRawJSON

func LoadHeterogeneousConfigFromRawJSON(ctx context.Context, interfaceType, name string, rawJSON json.RawMessage) (proto.Message, error)

LoadHeterogeneousConfigFromRawJSON private API

Types

type InboundConfig

type InboundConfig struct {
	Protocol       string                  `json:"protocol"`
	PortRange      *cfgcommon.PortRange    `json:"port"`
	ListenOn       *cfgcommon.Address      `json:"listen"`
	Settings       json.RawMessage         `json:"settings"`
	Tag            string                  `json:"tag"`
	SniffingConfig *sniffer.SniffingConfig `json:"sniffing"`
	StreamSetting  *StreamConfig           `json:"streamSettings"`
}

func (InboundConfig) BuildV5

func (c InboundConfig) BuildV5(ctx context.Context) (proto.Message, error)

type OutboundConfig

type OutboundConfig struct {
	Protocol       string                `json:"protocol"`
	SendThrough    *cfgcommon.Address    `json:"sendThrough"`
	Tag            string                `json:"tag"`
	Settings       json.RawMessage       `json:"settings"`
	StreamSetting  *StreamConfig         `json:"streamSettings"`
	ProxySettings  *proxycfg.ProxyConfig `json:"proxySettings"`
	MuxSettings    *muxcfg.MuxConfig     `json:"mux"`
	DomainStrategy string                `json:"domainStrategy"`
}

func (OutboundConfig) BuildV5

func (c OutboundConfig) BuildV5(ctx context.Context) (proto.Message, error)

type RootConfig

type RootConfig struct {
	LogConfig    json.RawMessage            `json:"log"`
	DNSConfig    json.RawMessage            `json:"dns"`
	RouterConfig json.RawMessage            `json:"router"`
	Inbounds     []InboundConfig            `json:"inbounds"`
	Outbounds    []OutboundConfig           `json:"outbounds"`
	Services     map[string]json.RawMessage `json:"services"`
	Extensions   []json.RawMessage          `json:"extension"`
}

func (RootConfig) BuildV5

func (c RootConfig) BuildV5(ctx context.Context) (proto.Message, error)

type StreamConfig

type StreamConfig struct {
	Transport         string                 `json:"transport"`
	TransportSettings json.RawMessage        `json:"transportSettings"`
	Security          string                 `json:"security"`
	SecuritySettings  json.RawMessage        `json:"securitySettings"`
	SocketSettings    socketcfg.SocketConfig `json:"socketSettings"`
}

func (StreamConfig) BuildV5

func (s StreamConfig) BuildV5(ctx context.Context) (proto.Message, error)

Jump to

Keyboard shortcuts

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