Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSProtocol ¶
type DNSProtocol string
const ( DNSProtocolSYS DNSProtocol = "sys" DNSProtocolUDP DNSProtocol = "udp" DNSProtocolTCP DNSProtocol = "tcp" DNSProtocolDOH DNSProtocol = "doh" DNSProtocolQUIC DNSProtocol = "quic" )
type DNSResolver ¶
type DNSResolver struct { Protocol DNSProtocol Servers []string }
type EndpointConfig ¶
type FlatHopChains ¶
type FlatNetConfig ¶
type FlatNetConfig struct { BaseDomain string `yaml:"baseDomain"` DNSProvider string `yaml:"dnsProvider"` Description string `yaml:"description,omitempty"` DNSResolver DNSResolver Hops map[string]Hop `yaml:"hops,omitempty"` HopChains map[string]FlatHopChains `yaml:"hopChains,omitempty"` Endpoints map[string]EndpointConfig `yaml:"endpoints,omitempty"` }
type Hop ¶
type Hop struct { Role HopRole `yaml:"role"` Name string `yaml:"name"` Listen HopListen `yaml:"listen"` DNSResolver DNSResolver `yaml:"dnsResolver"` }
type HopListen ¶
type HopListen struct { Protocol HopProtocol `yaml:"protocol"` Key string `yaml:"key"` // pem or secretRef:keyName Cert string `yaml:"cert"` // pem or secretRef:keyName Local Address `yaml:"local"` Externals []Address `yaml:"externals"` }
type HopProtocol ¶
type HopProtocol string
const ( HTTP3 HopProtocol = "http3" HTTPS HopProtocol = "https" )
type HopRole ¶
type HopRole string
const ( EntryPoint HopRole = "entrypoint" // The first hop in the chain EntryFanout HopRole = "entryfanout" // The first hop in the chain that forwards directly Relay HopRole = "Relay" // A hop that Relays to a Relay or a Fanout Fanout HopRole = "fanout" // A hop that forwards to multiple other hops )
type KeyFileResolver ¶
type KeyFileResolver struct{}
type KeyResolver ¶
type NetConfig ¶
type NetConfig struct { BaseDomain string `yaml:"baseDomain"` DNSProvider string `yaml:"dnsProvider"` DNSResolver DNSResolver Description string `yaml:"description,omitempty"` Hops map[string]Hop `yaml:"hops,omitempty"` HopChains map[string]HopChains `yaml:"hopChains,omitempty"` Endpoints map[string]EndpointConfig `yaml:"endpoints,omitempty"` }
func NewNetConfigFromYaml ¶
func NewNetConfigFromYaml(yamlData []byte, krs ...KeyResolver) (nc NetConfig, err error)
Click to show internal directories.
Click to hide internal directories.