improve config

This commit is contained in:
ginuerzh
2022-01-26 18:29:48 +08:00
parent 713586729b
commit 44acdc9215
14 changed files with 160 additions and 119 deletions

View File

@ -93,9 +93,6 @@ type HandlerConfig struct {
Type string
Retries int `yaml:",omitempty"`
Chain string `yaml:",omitempty"`
Bypass string `yaml:",omitempty"`
Resolver string `yaml:",omitempty"`
Hosts string `yaml:",omitempty"`
Auths []*AuthConfig `yaml:",omitempty"`
TLS *TLSConfig `yaml:",omitempty"`
Metadata map[string]interface{} `yaml:",omitempty"`
@ -123,6 +120,9 @@ type ConnectorConfig struct {
type ServiceConfig struct {
Name string
Addr string `yaml:",omitempty"`
Bypass string `yaml:",omitempty"`
Resolver string `yaml:",omitempty"`
Hosts string `yaml:",omitempty"`
Handler *HandlerConfig `yaml:",omitempty"`
Listener *ListenerConfig `yaml:",omitempty"`
Forwarder *ForwarderConfig `yaml:",omitempty"`
@ -137,6 +137,9 @@ type ChainConfig struct {
type HopConfig struct {
Name string
Selector *SelectorConfig `yaml:",omitempty"`
Bypass string `yaml:",omitempty"`
Resolver string `yaml:",omitempty"`
Hosts string `yaml:",omitempty"`
Nodes []*NodeConfig
}
@ -144,6 +147,8 @@ type NodeConfig struct {
Name string
Addr string `yaml:",omitempty"`
Bypass string `yaml:",omitempty"`
Resolver string `yaml:",omitempty"`
Hosts string `yaml:",omitempty"`
Connector *ConnectorConfig `yaml:",omitempty"`
Dialer *DialerConfig `yaml:",omitempty"`
}