Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEF_WG_IFACE string = "wg0" DEF_WG_ETH string = "eth" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type AgentConfig struct { AgentType uint8 `yaml:"agent_type"` // pop or connector, WG_AGENT_TYPE_POP = 1; WG_AGENT_TYPE_CONNECTOR = 2; WG_AGENT_TYPE_CLIENT = 3 AgentId string `yaml:"agent_id"` // pop id or connector Api ApiConfig `yaml:"api"` // server api Log *logger.LogModule `yaml:"log,omitempty"` // Version string `yaml:"version"` // Env string `yaml:"env"` // HostName string `yaml:"host_name"` // MqCfg *AgentMqConfig `yaml:"mq,omitempty"` // mq 不用放在mtls之后的register里返回,register只是返回wg 信息,mq和api配置信息一样,配置了通常不会变化 Wg AgentWgCommonConfig `yaml:"wg"` // common info no need to response in register, register 只是为了获取ip等动态信息(当然也可以固定),另外拿到证书不能register成功也不能直接连 }
config can be downloaded from web ui
func (*AgentConfig) GetWgAgentLogCfg ¶
func (c *AgentConfig) GetWgAgentLogCfg() *logger.LogModule
type AgentMqConfig ¶
type AgentWgCommonConfig ¶ added in v0.0.36
type AgentWgConfig ¶
type AgentWgConfig struct { WgInterfaces string `yaml:"interfaces"` // EthName string `yaml:"eth"` // Forward bool `yaml:"forward"` // Iptables bool `yaml:"iptables"` // }
func (*AgentWgConfig) GetEth ¶
func (c *AgentWgConfig) GetEth() string
func (*AgentWgConfig) GetWgInterface ¶
func (c *AgentWgConfig) GetWgInterface() string
func (*AgentWgConfig) GetWgInterface4Connector ¶ added in v0.0.32
func (c *AgentWgConfig) GetWgInterface4Connector() string
func (*AgentWgConfig) GetWgInterface4Pop ¶ added in v0.0.32
func (c *AgentWgConfig) GetWgInterface4Pop() string
func (*AgentWgConfig) GetWgInterfaces ¶
func (c *AgentWgConfig) GetWgInterfaces() []string
type ApiConfig ¶
type ApiConfig struct { Host string `yaml:"host"` // API host, controller(hostname), maybe use websocket Port int `yaml:"port"` // Register port on API host, 8081 SSL SSLCfg `yaml:"ssl"` // ssl config of api/mtls RegEndpoint string `yaml:"reg_endpoint"` // =/ws/agent DataEndpoint string `yaml:"data_endpoint"` // =/ws/data, or other api }
type SSLCfg ¶
type SSLCfg struct { // Enable bool `yaml:"enable"` MTLS bool `yaml:"mtls"` RootCaPath string `yaml:"root_ca_path"` // root ca pem AgentCertPath string `yaml:"agent_cert_path"` // cert pem, agent could be pop/connector AgentKeyPath string `yaml:"agent_key_path"` // cert key, agent could be pop/connector }
Click to show internal directories.
Click to hide internal directories.