Documentation ¶
Index ¶
- Constants
- Variables
- func IPv4(a uint32) net.IP
- func Pack(msg proto.Message) ([]byte, error)
- func Unpack(b []byte) (proto.Message, error)
- type Cfg
- func (*Cfg) Descriptor() ([]byte, []int)deprecated
- func (x *Cfg) GetNet4() []*Net4
- func (x *Cfg) GetNet6() []*Net6
- func (x *Cfg) GetRoutes4() []*Route4
- func (x *Cfg) GetRoutes6() []*Route6
- func (x *Cfg) GetServer4() uint32
- func (x *Cfg) GetServer6() *IPv6
- func (x *Cfg) GetTun4Endpoint() uint32
- func (x *Cfg) GetTun6Endpoint() *IPv6
- func (x *Cfg) GetTunPort() uint32
- func (x *Cfg) GetValidUntil() uint64
- func (*Cfg) ProtoMessage()
- func (x *Cfg) ProtoReflect() protoreflect.Message
- func (x *Cfg) Reset()
- func (x *Cfg) String() string
- type CfgSolict
- type IPv6
- type Message
- type MsgType
- type Nack
- type Net4
- type Net6
- type Route4
- type Route6
Constants ¶
View Source
const ( MsgSolict MsgType = 1 MsgCfg MsgType = 2 MsgNack MsgType = 3 Version byte = 1 )
Variables ¶
View Source
var (
ErrUnknownVersion = errors.New("proto: unknown protocol version")
)
View Source
var File_protocol_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Cfg ¶
type Cfg struct { // The UNIX timestamp the configuration is valid until. ValidUntil uint64 `protobuf:"varint,2,opt,name=valid_until,json=validUntil,proto3" json:"valid_until,omitempty"` // IPv6 network configuration. Server6 *IPv6 `protobuf:"bytes,7,opt,name=server6,proto3" json:"server6,omitempty"` Net6 []*Net6 `protobuf:"bytes,3,rep,name=net6,proto3" json:"net6,omitempty"` Routes6 []*Route6 `protobuf:"bytes,4,rep,name=routes6,proto3" json:"routes6,omitempty"` // IPv4 network configuration. Server4 uint32 `protobuf:"fixed32,8,opt,name=server4,proto3" json:"server4,omitempty"` Net4 []*Net4 `protobuf:"bytes,16,rep,name=net4,proto3" json:"net4,omitempty"` Routes4 []*Route4 `protobuf:"bytes,17,rep,name=routes4,proto3" json:"routes4,omitempty"` // The WireGuard tunnel endpoint client should switch to. // Can be empty if the client should reuse the configuration tunnel. // tun6_endpoint - Publicly routable IPv6 address of server. // tun_endpoint - Publicly routable IPv4 address of server. // (at least one should be non-empty) // // tun_port - UDP port to use. Tun6Endpoint *IPv6 `protobuf:"bytes,5,opt,name=tun6_endpoint,json=tun6Endpoint,proto3" json:"tun6_endpoint,omitempty"` Tun4Endpoint uint32 `protobuf:"fixed32,18,opt,name=tun4_endpoint,json=tun4Endpoint,proto3" json:"tun4_endpoint,omitempty"` TunPort uint32 `protobuf:"varint,6,opt,name=tun_port,json=tunPort,proto3" json:"tun_port,omitempty"` // contains filtered or unexported fields }
Message type byte: 2
func (*Cfg) Descriptor
deprecated
func (*Cfg) GetRoutes4 ¶
func (*Cfg) GetRoutes6 ¶
func (*Cfg) GetServer4 ¶
func (*Cfg) GetServer6 ¶
func (*Cfg) GetTun4Endpoint ¶
func (*Cfg) GetTun6Endpoint ¶
func (*Cfg) GetTunPort ¶
func (*Cfg) GetValidUntil ¶
func (*Cfg) ProtoMessage ¶
func (*Cfg) ProtoMessage()
func (*Cfg) ProtoReflect ¶
func (x *Cfg) ProtoReflect() protoreflect.Message
type CfgSolict ¶
type CfgSolict struct { // ed25519 public key of the client. MUST be 32 bytes. PeerPubkey []byte `protobuf:"bytes,1,opt,name=peer_pubkey,json=peerPubkey,proto3" json:"peer_pubkey,omitempty"` // contains filtered or unexported fields }
Message type byte: 1
func (*CfgSolict) Descriptor
deprecated
func (*CfgSolict) GetPeerPubkey ¶
func (*CfgSolict) ProtoMessage ¶
func (*CfgSolict) ProtoMessage()
func (*CfgSolict) ProtoReflect ¶
func (x *CfgSolict) ProtoReflect() protoreflect.Message
type IPv6 ¶
type IPv6 struct { High uint64 `protobuf:"fixed64,1,opt,name=high,proto3" json:"high,omitempty"` Low uint64 `protobuf:"varint,2,opt,name=low,proto3" json:"low,omitempty"` // contains filtered or unexported fields }
func (*IPv6) Descriptor
deprecated
func (*IPv6) ProtoMessage ¶
func (*IPv6) ProtoMessage()
func (*IPv6) ProtoReflect ¶
func (x *IPv6) ProtoReflect() protoreflect.Message
type Nack ¶
type Nack struct { // Human-readable error description. Description []byte `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
Message type byte: 3
func (*Nack) Descriptor
deprecated
func (*Nack) GetDescription ¶
func (*Nack) ProtoMessage ¶
func (*Nack) ProtoMessage()
func (*Nack) ProtoReflect ¶
func (x *Nack) ProtoReflect() protoreflect.Message
type Net4 ¶
type Net4 struct { Addr uint32 `protobuf:"fixed32,1,opt,name=addr,proto3" json:"addr,omitempty"` PrefixLen int32 `protobuf:"varint,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` // contains filtered or unexported fields }
func (*Net4) Descriptor
deprecated
func (*Net4) GetPrefixLen ¶
func (*Net4) ProtoMessage ¶
func (*Net4) ProtoMessage()
func (*Net4) ProtoReflect ¶
func (x *Net4) ProtoReflect() protoreflect.Message
type Net6 ¶
type Net6 struct { Addr *IPv6 `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` PrefixLen int32 `protobuf:"varint,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` // contains filtered or unexported fields }
func (*Net6) Descriptor
deprecated
func (*Net6) GetPrefixLen ¶
func (*Net6) ProtoMessage ¶
func (*Net6) ProtoMessage()
func (*Net6) ProtoReflect ¶
func (x *Net6) ProtoReflect() protoreflect.Message
type Route4 ¶
type Route4 struct { Dest *Net4 `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"` Src uint32 `protobuf:"fixed32,2,opt,name=src,proto3" json:"src,omitempty"` Gateway uint32 `protobuf:"fixed32,3,opt,name=gateway,proto3" json:"gateway,omitempty"` // contains filtered or unexported fields }
func (*Route4) Descriptor
deprecated
func (*Route4) GetGateway ¶
func (*Route4) ProtoMessage ¶
func (*Route4) ProtoMessage()
func (*Route4) ProtoReflect ¶
func (x *Route4) ProtoReflect() protoreflect.Message
type Route6 ¶
type Route6 struct { Dest *Net6 `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"` Src *IPv6 `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"` // contains filtered or unexported fields }
func (*Route6) Descriptor
deprecated
func (*Route6) ProtoMessage ¶
func (*Route6) ProtoMessage()
func (*Route6) ProtoReflect ¶
func (x *Route6) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.