Documentation ¶
Index ¶
- Variables
- type IPAddress
- type IPPrefix
- func (*IPPrefix) Descriptor() ([]byte, []int)deprecated
- func (x *IPPrefix) GetAddr() []byte
- func (x *IPPrefix) GetPfxlen() uint32
- func (i *IPPrefix) Prefix() *net.IPNet
- func (*IPPrefix) ProtoMessage()
- func (x *IPPrefix) ProtoReflect() protoreflect.Message
- func (x *IPPrefix) Reset()
- func (x *IPPrefix) String() string
- type Interface
- func (*Interface) Descriptor() ([]byte, []int)deprecated
- func (i *Interface) Device() *wg.Interface
- func (i *Interface) Dump(wr io.Writer, level log.Level) error
- func (x *Interface) GetFirewallMark() uint32
- func (x *Interface) GetIce() *epdisc.Interface
- func (x *Interface) GetIfindex() uint32
- func (x *Interface) GetLastSyncTimestamp() *proto.Timestamp
- func (x *Interface) GetListenPort() uint32
- func (x *Interface) GetMtu() uint32
- func (x *Interface) GetName() string
- func (x *Interface) GetPeers() []*Peer
- func (x *Interface) GetPrivateKey() []byte
- func (x *Interface) GetPublicKey() []byte
- func (x *Interface) GetType() InterfaceType
- func (*Interface) ProtoMessage()
- func (x *Interface) ProtoReflect() protoreflect.Message
- func (i *Interface) Redact() *Interface
- func (x *Interface) Reset()
- func (x *Interface) String() string
- type InterfaceType
- func (InterfaceType) Descriptor() protoreflect.EnumDescriptor
- func (x InterfaceType) Enum() *InterfaceType
- func (InterfaceType) EnumDescriptor() ([]byte, []int)deprecated
- func (x InterfaceType) Number() protoreflect.EnumNumber
- func (x InterfaceType) String() string
- func (InterfaceType) Type() protoreflect.EnumType
- type Peer
- func (*Peer) Descriptor() ([]byte, []int)deprecated
- func (p *Peer) Dump(wr io.Writer, level log.Level) error
- func (x *Peer) GetAllowedIps() []string
- func (x *Peer) GetEndpoint() string
- func (x *Peer) GetIce() *epdisc.Peer
- func (x *Peer) GetLastHandshakeTimestamp() *proto.Timestamp
- func (x *Peer) GetLastReceiveTimestamp() *proto.Timestamp
- func (x *Peer) GetLastTransmitTimestamp() *proto.Timestamp
- func (x *Peer) GetName() string
- func (x *Peer) GetPersistentKeepaliveInterval() uint32
- func (x *Peer) GetPresharedKey() []byte
- func (x *Peer) GetProtocolVersion() uint32
- func (x *Peer) GetPublicKey() []byte
- func (x *Peer) GetReachability() ReachabilityType
- func (x *Peer) GetReceiveBytes() int64
- func (x *Peer) GetState() PeerState
- func (x *Peer) GetTransmitBytes() int64
- func (p *Peer) Peer() wgtypes.Peer
- func (*Peer) ProtoMessage()
- func (x *Peer) ProtoReflect() protoreflect.Message
- func (p *Peer) Redact() *Peer
- func (x *Peer) Reset()
- func (x *Peer) String() string
- type PeerState
- func (s PeerState) Color() string
- func (PeerState) Descriptor() protoreflect.EnumDescriptor
- func (x PeerState) Enum() *PeerState
- func (PeerState) EnumDescriptor() ([]byte, []int)deprecated
- func (s *PeerState) MarshalText() ([]byte, error)
- func (x PeerState) Number() protoreflect.EnumNumber
- func (x PeerState) String() string
- func (PeerState) Type() protoreflect.EnumType
- type ReachabilityType
- func (ReachabilityType) Descriptor() protoreflect.EnumDescriptor
- func (x ReachabilityType) Enum() *ReachabilityType
- func (ReachabilityType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ReachabilityType) Number() protoreflect.EnumNumber
- func (x ReachabilityType) String() string
- func (ReachabilityType) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InterfaceType_name = map[int32]string{ 0: "UNSPECIFIED_INTERFACE_TYPE", 1: "KERNEL_LINUX", 2: "KERNEL_OPENBSD", 3: "KERNEL_FREEBSD", 4: "KERNEL_WINDOWS", 5: "USERSPACE", } InterfaceType_value = map[string]int32{ "UNSPECIFIED_INTERFACE_TYPE": 0, "KERNEL_LINUX": 1, "KERNEL_OPENBSD": 2, "KERNEL_FREEBSD": 3, "KERNEL_WINDOWS": 4, "USERSPACE": 5, } )
Enum value maps for InterfaceType.
View Source
var ( PeerState_name = map[int32]string{ 0: "NEW", 1: "CONNECTING", 2: "CONNECTED", 3: "FAILED", 4: "CLOSED", } PeerState_value = map[string]int32{ "NEW": 0, "CONNECTING": 1, "CONNECTED": 2, "FAILED": 3, "CLOSED": 4, } )
Enum value maps for PeerState.
View Source
var ( ReachabilityType_name = map[int32]string{ 0: "UNSPECIFIED_REACHABILITY_TYPE", 1: "NONE", 2: "DIRECT", 3: "RELAYED", 4: "RELAYED_BIDIR", 5: "ROUTED", } ReachabilityType_value = map[string]int32{ "UNSPECIFIED_REACHABILITY_TYPE": 0, "NONE": 1, "DIRECT": 2, "RELAYED": 3, "RELAYED_BIDIR": 4, "ROUTED": 5, } )
Enum value maps for ReachabilityType.
View Source
var File_core_interface_proto protoreflect.FileDescriptor
View Source
var File_core_net_proto protoreflect.FileDescriptor
View Source
var File_core_peer_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type IPAddress ¶
type IPAddress struct { Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` // contains filtered or unexported fields }
func (*IPAddress) Descriptor
deprecated
func (*IPAddress) ProtoMessage ¶
func (*IPAddress) ProtoMessage()
func (*IPAddress) ProtoReflect ¶
func (x *IPAddress) ProtoReflect() protoreflect.Message
type IPPrefix ¶
type IPPrefix struct { Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` Pfxlen uint32 `protobuf:"varint,2,opt,name=pfxlen,proto3" json:"pfxlen,omitempty"` // contains filtered or unexported fields }
func (*IPPrefix) Descriptor
deprecated
func (*IPPrefix) ProtoMessage ¶
func (*IPPrefix) ProtoMessage()
func (*IPPrefix) ProtoReflect ¶
func (x *IPPrefix) ProtoReflect() protoreflect.Message
type Interface ¶
type Interface struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Type InterfaceType `protobuf:"varint,2,opt,name=type,proto3,enum=cunicu.core.InterfaceType" json:"type,omitempty"` PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` PrivateKey []byte `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` ListenPort uint32 `protobuf:"varint,5,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"` FirewallMark uint32 `protobuf:"varint,6,opt,name=firewall_mark,json=firewallMark,proto3" json:"firewall_mark,omitempty"` Peers []*Peer `protobuf:"bytes,7,rep,name=peers,proto3" json:"peers,omitempty"` Ice *epdisc.Interface `protobuf:"bytes,8,opt,name=ice,proto3" json:"ice,omitempty"` Ifindex uint32 `protobuf:"varint,9,opt,name=ifindex,proto3" json:"ifindex,omitempty"` Mtu uint32 `protobuf:"varint,10,opt,name=mtu,proto3" json:"mtu,omitempty"` LastSyncTimestamp *proto.Timestamp `protobuf:"bytes,11,opt,name=last_sync_timestamp,json=lastSyncTimestamp,proto3" json:"last_sync_timestamp,omitempty"` // contains filtered or unexported fields }
A WireGuard interface See: https://pkg.go.dev/golang.zx2c4.com/wireguard/wgctrl/wgtypes#Device
func (*Interface) Descriptor
deprecated
func (*Interface) Dump ¶
Dump writes a human readable version of the interface status to the supplied writer. The format resembles the one used by wg(8).
func (*Interface) GetFirewallMark ¶
func (*Interface) GetIfindex ¶
func (*Interface) GetLastSyncTimestamp ¶
func (*Interface) GetListenPort ¶
func (*Interface) GetPrivateKey ¶
func (*Interface) GetPublicKey ¶
func (*Interface) GetType ¶
func (x *Interface) GetType() InterfaceType
func (*Interface) ProtoMessage ¶
func (*Interface) ProtoMessage()
func (*Interface) ProtoReflect ¶
func (x *Interface) ProtoReflect() protoreflect.Message
type InterfaceType ¶
type InterfaceType int32
Type of the WireGuard interface implementation
const ( InterfaceType_UNSPECIFIED_INTERFACE_TYPE InterfaceType = 0 InterfaceType_KERNEL_LINUX InterfaceType = 1 InterfaceType_KERNEL_OPENBSD InterfaceType = 2 InterfaceType_KERNEL_FREEBSD InterfaceType = 3 InterfaceType_KERNEL_WINDOWS InterfaceType = 4 InterfaceType_USERSPACE InterfaceType = 5 )
func (InterfaceType) Descriptor ¶
func (InterfaceType) Descriptor() protoreflect.EnumDescriptor
func (InterfaceType) Enum ¶
func (x InterfaceType) Enum() *InterfaceType
func (InterfaceType) EnumDescriptor
deprecated
func (InterfaceType) EnumDescriptor() ([]byte, []int)
Deprecated: Use InterfaceType.Descriptor instead.
func (InterfaceType) Number ¶
func (x InterfaceType) Number() protoreflect.EnumNumber
func (InterfaceType) String ¶
func (x InterfaceType) String() string
func (InterfaceType) Type ¶
func (InterfaceType) Type() protoreflect.EnumType
type Peer ¶
type Peer struct { // A human readable name describing the peer Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The operating state of the peer State PeerState `protobuf:"varint,2,opt,name=state,proto3,enum=cunicu.core.PeerState" json:"state,omitempty"` // The reachability of the peer Reachability ReachabilityType `protobuf:"varint,3,opt,name=reachability,proto3,enum=cunicu.core.ReachabilityType" json:"reachability,omitempty"` // Public WireGuard X25519 key PublicKey []byte `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // List of allowed IPs AllowedIps []string `protobuf:"bytes,6,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"` PersistentKeepaliveInterval uint32 `` /* 145-byte string literal not displayed */ // Timestamps LastHandshakeTimestamp *proto.Timestamp `` /* 129-byte string literal not displayed */ LastReceiveTimestamp *proto.Timestamp `protobuf:"bytes,9,opt,name=last_receive_timestamp,json=lastReceiveTimestamp,proto3" json:"last_receive_timestamp,omitempty"` LastTransmitTimestamp *proto.Timestamp `` /* 127-byte string literal not displayed */ // Trafic counters TransmitBytes int64 `protobuf:"varint,11,opt,name=transmit_bytes,json=transmitBytes,proto3" json:"transmit_bytes,omitempty"` ReceiveBytes int64 `protobuf:"varint,12,opt,name=receive_bytes,json=receiveBytes,proto3" json:"receive_bytes,omitempty"` // WireGuard endpoint address Endpoint string `protobuf:"bytes,13,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // WireGuard protocol version ProtocolVersion uint32 `protobuf:"varint,14,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` Ice *epdisc.Peer `protobuf:"bytes,15,opt,name=ice,proto3" json:"ice,omitempty"` // contains filtered or unexported fields }
func (*Peer) Descriptor
deprecated
func (*Peer) GetAllowedIps ¶
func (*Peer) GetEndpoint ¶
func (*Peer) GetLastHandshakeTimestamp ¶
func (*Peer) GetLastReceiveTimestamp ¶
func (*Peer) GetLastTransmitTimestamp ¶
func (*Peer) GetPersistentKeepaliveInterval ¶
func (*Peer) GetPresharedKey ¶
func (*Peer) GetProtocolVersion ¶
func (*Peer) GetPublicKey ¶
func (*Peer) GetReachability ¶
func (x *Peer) GetReachability() ReachabilityType
func (*Peer) GetReceiveBytes ¶
func (*Peer) GetTransmitBytes ¶
func (*Peer) ProtoMessage ¶
func (*Peer) ProtoMessage()
func (*Peer) ProtoReflect ¶
func (x *Peer) ProtoReflect() protoreflect.Message
type PeerState ¶
type PeerState int32
const ( PeerState_NEW PeerState = 0 // Peer has been created PeerState_CONNECTING PeerState = 1 // Peer is connecting PeerState_CONNECTED PeerState = 2 // Connection to remote has been established PeerState_FAILED PeerState = 3 // Connection to remote has failed PeerState_CLOSED PeerState = 4 // Peer has been closed )
func (PeerState) Descriptor ¶
func (PeerState) Descriptor() protoreflect.EnumDescriptor
func (PeerState) EnumDescriptor
deprecated
func (*PeerState) MarshalText ¶
func (PeerState) Number ¶
func (x PeerState) Number() protoreflect.EnumNumber
func (PeerState) Type ¶
func (PeerState) Type() protoreflect.EnumType
type ReachabilityType ¶
type ReachabilityType int32
const ( ReachabilityType_UNSPECIFIED_REACHABILITY_TYPE ReachabilityType = 0 ReachabilityType_NONE ReachabilityType = 1 ReachabilityType_DIRECT ReachabilityType = 2 ReachabilityType_RELAYED ReachabilityType = 3 ReachabilityType_RELAYED_BIDIR ReachabilityType = 4 ReachabilityType_ROUTED ReachabilityType = 5 )
func (ReachabilityType) Descriptor ¶
func (ReachabilityType) Descriptor() protoreflect.EnumDescriptor
func (ReachabilityType) Enum ¶
func (x ReachabilityType) Enum() *ReachabilityType
func (ReachabilityType) EnumDescriptor
deprecated
func (ReachabilityType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ReachabilityType.Descriptor instead.
func (ReachabilityType) Number ¶
func (x ReachabilityType) Number() protoreflect.EnumNumber
func (ReachabilityType) String ¶
func (x ReachabilityType) String() string
func (ReachabilityType) Type ¶
func (ReachabilityType) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.