Documentation ¶
Index ¶
Constants ¶
View Source
const (
AGENT_CMD_REGISTER uint8 = 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentCmdReq ¶
type AgentCmdResp ¶
type ConnectorRegisterReq ¶
type ConnectorRegisterResp ¶
type ConnectorRegisterResp struct { // pop's info PopId string `json:"pop_id"` // pop id PopPublicKey string `json:"pop_public_key"` // pop's public_key PopIP string `json:"pop_ip"` // pop's wg IP PopNetwork string `json:"pop_network"` // pop's network, cidr format: 10.0.0.1/24 PopEndpoint string `json:"pop_endpoint"` // pop's Endpoint PopListenPort int `json:"pop_port"` // pop's listen port PopAllowedIPs string `json:"pop_allowed_ips,omitempty"` // PopDNS string `json:"pop_dns,omitempty"` // // connector's info WgPublicKey string `json:"wg_public_key,omitempty"` // [optional][connector]agent's, controller 分配 WgPrivateKey string `json:"wg_private_key,omitempty"` // [optional][connector]agent's, controller 分配 WgPSK string `json:"wg_psk"` // [optional]connector's, WgIP string `json:"wg_ip"` // [required]connector's, controller 分配给 connector 的 wg IP // connector's non-wg info ConnectorId string `json:"connector_id"` // [required]connector's Error string `json:"error,omitempty"` // }
type PopRegisterIfaceResp ¶
type PopRegisterIfaceResp struct { WgEndpoint string `json:"endpoint"` // required, public-ip:listen-port WgPort int `json:"port"` // required, pop's listen-port WgNetwork string `json:"network"` // required, wg ip pool, generate by pop-controller WgAllowedIps string `json:"allowed_ips"` // required, generate by pop-controller WgDns string `json:"dns"` // ? WgIP string `json:"wg_ip"` // required, internal wg ip for wg client to connect, should be consist with Network }
type PopRegisterReq ¶
type PopRegisterResp ¶
type PopRegisterResp struct { PopId string `json:"pop_id,omitempty"` WgPublicKey string `json:"public_key,omitempty"` // pop's, all the interfaces share the same key WgPrivateKey string `json:"private_key,omitempty"` // pop's WgInterfaces map[string]PopRegisterIfaceResp `json:"interfaces,omitempty"` // pop's }
type WgClientRegisterReq ¶
Click to show internal directories.
Click to hide internal directories.