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)
- func (m *Cfg) GetNet4() []*Net4
- func (m *Cfg) GetNet6() []*Net6
- func (m *Cfg) GetRoutes4() []*Route4
- func (m *Cfg) GetRoutes6() []*Route6
- func (m *Cfg) GetServer4() uint32
- func (m *Cfg) GetServer6() *IPv6
- func (m *Cfg) GetTun4Endpoint() uint32
- func (m *Cfg) GetTun6Endpoint() *IPv6
- func (m *Cfg) GetTunPort() uint32
- func (m *Cfg) GetValidUntil() uint64
- func (*Cfg) ProtoMessage()
- func (m *Cfg) Reset()
- func (m *Cfg) String() string
- func (m *Cfg) XXX_DiscardUnknown()
- func (m *Cfg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Cfg) XXX_Merge(src proto.Message)
- func (m *Cfg) XXX_Size() int
- func (m *Cfg) XXX_Unmarshal(b []byte) error
- type CfgSolict
- func (*CfgSolict) Descriptor() ([]byte, []int)
- func (m *CfgSolict) GetPeerPubkey() []byte
- func (*CfgSolict) ProtoMessage()
- func (m *CfgSolict) Reset()
- func (m *CfgSolict) String() string
- func (m *CfgSolict) XXX_DiscardUnknown()
- func (m *CfgSolict) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CfgSolict) XXX_Merge(src proto.Message)
- func (m *CfgSolict) XXX_Size() int
- func (m *CfgSolict) XXX_Unmarshal(b []byte) error
- type IPv6
- func (ipv6 *IPv6) AsIP() net.IP
- func (*IPv6) Descriptor() ([]byte, []int)
- func (m *IPv6) GetHigh() uint64
- func (m *IPv6) GetLow() uint64
- func (*IPv6) ProtoMessage()
- func (m *IPv6) Reset()
- func (m *IPv6) String() string
- func (m *IPv6) XXX_DiscardUnknown()
- func (m *IPv6) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IPv6) XXX_Merge(src proto.Message)
- func (m *IPv6) XXX_Size() int
- func (m *IPv6) XXX_Unmarshal(b []byte) error
- type Message
- type MsgType
- type Nack
- func (*Nack) Descriptor() ([]byte, []int)
- func (m *Nack) GetDescription() []byte
- func (*Nack) ProtoMessage()
- func (m *Nack) Reset()
- func (m *Nack) String() string
- func (m *Nack) XXX_DiscardUnknown()
- func (m *Nack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Nack) XXX_Merge(src proto.Message)
- func (m *Nack) XXX_Size() int
- func (m *Nack) XXX_Unmarshal(b []byte) error
- type Net4
- func (n *Net4) AsIPNet() net.IPNet
- func (*Net4) Descriptor() ([]byte, []int)
- func (m *Net4) GetAddr() uint32
- func (m *Net4) GetPrefixLen() int32
- func (*Net4) ProtoMessage()
- func (m *Net4) Reset()
- func (m *Net4) String() string
- func (m *Net4) XXX_DiscardUnknown()
- func (m *Net4) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Net4) XXX_Merge(src proto.Message)
- func (m *Net4) XXX_Size() int
- func (m *Net4) XXX_Unmarshal(b []byte) error
- type Net6
- func (n *Net6) AsIPNet() net.IPNet
- func (*Net6) Descriptor() ([]byte, []int)
- func (m *Net6) GetAddr() *IPv6
- func (m *Net6) GetPrefixLen() int32
- func (*Net6) ProtoMessage()
- func (m *Net6) Reset()
- func (m *Net6) String() string
- func (m *Net6) XXX_DiscardUnknown()
- func (m *Net6) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Net6) XXX_Merge(src proto.Message)
- func (m *Net6) XXX_Size() int
- func (m *Net6) XXX_Unmarshal(b []byte) error
- type Route4
- func (*Route4) Descriptor() ([]byte, []int)
- func (m *Route4) GetDest() *Net4
- func (m *Route4) GetGateway() uint32
- func (m *Route4) GetSrc() uint32
- func (*Route4) ProtoMessage()
- func (m *Route4) Reset()
- func (m *Route4) String() string
- func (m *Route4) XXX_DiscardUnknown()
- func (m *Route4) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Route4) XXX_Merge(src proto.Message)
- func (m *Route4) XXX_Size() int
- func (m *Route4) XXX_Unmarshal(b []byte) error
- type Route6
- func (*Route6) Descriptor() ([]byte, []int)
- func (m *Route6) GetDest() *Net6
- func (m *Route6) GetSrc() *IPv6
- func (*Route6) ProtoMessage()
- func (m *Route6) Reset()
- func (m *Route6) String() string
- func (m *Route6) XXX_DiscardUnknown()
- func (m *Route6) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Route6) XXX_Merge(src proto.Message)
- func (m *Route6) XXX_Size() int
- func (m *Route6) XXX_Unmarshal(b []byte) error
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")
)
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Message type byte: 2
func (*Cfg) Descriptor ¶
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) XXX_DiscardUnknown ¶
func (m *Cfg) XXX_DiscardUnknown()
func (*Cfg) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Message type byte: 1
func (*CfgSolict) Descriptor ¶
func (*CfgSolict) GetPeerPubkey ¶
func (*CfgSolict) ProtoMessage ¶
func (*CfgSolict) ProtoMessage()
func (*CfgSolict) XXX_DiscardUnknown ¶
func (m *CfgSolict) XXX_DiscardUnknown()
func (*CfgSolict) XXX_Marshal ¶
func (*CfgSolict) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IPv6) Descriptor ¶
func (*IPv6) ProtoMessage ¶
func (*IPv6) ProtoMessage()
func (*IPv6) XXX_DiscardUnknown ¶
func (m *IPv6) XXX_DiscardUnknown()
func (*IPv6) XXX_Unmarshal ¶
type Nack ¶
type Nack struct { // Human-readable error description. Description []byte `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Message type byte: 3
func (*Nack) Descriptor ¶
func (*Nack) GetDescription ¶
func (*Nack) ProtoMessage ¶
func (*Nack) ProtoMessage()
func (*Nack) XXX_DiscardUnknown ¶
func (m *Nack) XXX_DiscardUnknown()
func (*Nack) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Net4) Descriptor ¶
func (*Net4) GetPrefixLen ¶
func (*Net4) ProtoMessage ¶
func (*Net4) ProtoMessage()
func (*Net4) XXX_DiscardUnknown ¶
func (m *Net4) XXX_DiscardUnknown()
func (*Net4) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Net6) Descriptor ¶
func (*Net6) GetPrefixLen ¶
func (*Net6) ProtoMessage ¶
func (*Net6) ProtoMessage()
func (*Net6) XXX_DiscardUnknown ¶
func (m *Net6) XXX_DiscardUnknown()
func (*Net6) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Route4) Descriptor ¶
func (*Route4) GetGateway ¶
func (*Route4) ProtoMessage ¶
func (*Route4) ProtoMessage()
func (*Route4) XXX_DiscardUnknown ¶
func (m *Route4) XXX_DiscardUnknown()
func (*Route4) XXX_Marshal ¶
func (*Route4) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Route6) Descriptor ¶
func (*Route6) ProtoMessage ¶
func (*Route6) ProtoMessage()
func (*Route6) XXX_DiscardUnknown ¶
func (m *Route6) XXX_DiscardUnknown()
func (*Route6) XXX_Marshal ¶
func (*Route6) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.