Documentation
¶
Index ¶
- Constants
- func GetDevice(name string) (*wgtypes.Device, error)
- func SetLogging(v string)
- type CheckinData
- type ConnectivityData
- type DeviceUpdate
- type ErrorResponse
- type JoinRequest
- type JoinResponse
- type Key
- type KeyValue
- type LeaveRequest
- type LevelRequest
- type ListenPortRequest
- type ListenPortResponse
- type MessageResponse
- type NatsUser
- type Network
- type NetworkPeer
- type NetworkResponse
- type NetworkUpdate
- type Peer
- type PingResponse
- type PrivateEndpoint
- type RegisterRequest
- type ResetRequest
- type ServerJoinRequest
- type ServerRegisterRequest
- type User
- type VersionResponse
- type Wireguard
- func (wg *Wireguard) AddPeer(newPeer wgtypes.PeerConfig)
- func (wg *Wireguard) Apply() error
- func (wg *Wireguard) Attrs() *netlink.LinkAttrs
- func (wg *Wireguard) DeletePeer(key string)
- func (wg *Wireguard) Down() error
- func (wg *Wireguard) ReplacePeer(newPeer wgtypes.PeerConfig)
- func (wg *Wireguard) Type() string
- func (wg *Wireguard) Up() error
Constants ¶
View Source
const ( DeletePeer = ".deletePeer" AddRouter = ".addRouter" AddPeer = ".addPeer" UpdatePeer = ".updatePeer" UpdateNetworkPeer = ".updateNetworkPeer" UpdateListenPorts = ".updateListenPorts" AddRelay = ".addRelay" DeleteRelay = ".deleteRelay" DeleteRouter = ".deleteRouter" DeleteNetwork = ".deleteNetwork" JoinNetwork = ".join" LeaveNetwork = ".leaveNetwork" LeaveServer = ".leaveServer" LogLevel = ".loglevel" Ping = ".ping" Register = ".register" Reload = ".reload" Reset = ".reset" SetPrivateEndpoint = ".privateEndpoint" Status = ".status" Version = ".version" Checkin = ".checkin" SendListenPorts = ".listenPorts" Update = "update." Networks = "networks." )
nats topics.
Variables ¶
This section is empty.
Functions ¶
func SetLogging ¶
func SetLogging(v string)
Types ¶
type CheckinData ¶
type CheckinData struct {
ID string
Version string
ListenPort int
PublicListenPort int
Endpoint net.IP
PrivateEndpoints []PrivateEndpoint
Connections []ConnectivityData
}
type ConnectivityData ¶
type DeviceUpdate ¶
type ErrorResponse ¶
type JoinRequest ¶
type JoinResponse ¶
type KeyValue ¶
func DecodeToken ¶
type LeaveRequest ¶
type LeaveRequest struct {
Network string
}
type LevelRequest ¶
type LevelRequest struct {
Level string
}
type ListenPortRequest ¶
type ListenPortRequest struct {
Network string
}
type ListenPortResponse ¶
type MessageResponse ¶
type MessageResponse struct {
Message string
}
type Network ¶
type Network struct {
Name string `form:"name"`
Net net.IPNet
AddressString string `form:"addressstring"`
Peers []NetworkPeer
}
type NetworkPeer ¶
type NetworkPeer struct {
WGPublicKey string
HostName string
Address net.IPNet
ListenPort int
PublicListenPort int
Endpoint net.IP
PrivateEndpoint net.IP
UsePrivateEndpoint bool
NatsConnected bool
Connectivity float64
IsRelay bool
RelayedPeers []string
IsRelayed bool
IsSubnetRouter bool
Subnet net.IPNet
UseNat bool
UseVirtSubnet bool
VirtSubnet net.IPNet
}
type NetworkResponse ¶
type NetworkUpdate ¶
type NetworkUpdate struct {
Action string
Peer NetworkPeer
}
type PingResponse ¶
type PingResponse struct {
Message string
}
type PrivateEndpoint ¶ added in v0.2.1
type RegisterRequest ¶
type RegisterRequest struct {
Token string
}
type ResetRequest ¶
type ResetRequest struct {
Network string
}
type ServerJoinRequest ¶
type ServerJoinRequest struct {
Network Network
}
type ServerRegisterRequest ¶
type VersionResponse ¶
type Wireguard ¶ added in v0.3.1
Wireguard is a netlink compatible representation of Wireguard interface.
func (*Wireguard) AddPeer ¶ added in v0.3.1
func (wg *Wireguard) AddPeer(newPeer wgtypes.PeerConfig)
func (*Wireguard) DeletePeer ¶ added in v0.3.1
func (*Wireguard) ReplacePeer ¶ added in v0.3.1
func (wg *Wireguard) ReplacePeer(newPeer wgtypes.PeerConfig)
Click to show internal directories.
Click to hide internal directories.
