TypeInterfaceType`gorm:"column:iface_type"`// the interface type (server, client, any)
Addresses[]Cidr`gorm:"many2many:peer_addresses;"`// the interface ip addresses
CheckAliveAddressstring`gorm:"column:check_alive_address"`// optional ip address or DNS name that is used for ping checks
DnsStrStringConfigOption`gorm:"embedded;embeddedPrefix:iface_dns_str_"`// the dns server that should be set if the interface is up, comma separated
DnsSearchStrStringConfigOption`gorm:"embedded;embeddedPrefix:iface_dns_search_str_"`// the dns search option string that should be set if the interface is up, will be appended to DnsStr
MtuIntConfigOption`gorm:"embedded;embeddedPrefix:iface_mtu_"`// the device MTU
FirewallMarkInt32ConfigOption`gorm:"embedded;embeddedPrefix:iface_firewall_mark_"`// a firewall mark
RoutingTableStringConfigOption`gorm:"embedded;embeddedPrefix:iface_routing_table_"`// the routing table
PreUpStringConfigOption`gorm:"embedded;embeddedPrefix:iface_pre_up_"`// action that is executed before the device is up
PostUpStringConfigOption`gorm:"embedded;embeddedPrefix:iface_post_up_"`// action that is executed after the device is up
PreDownStringConfigOption`gorm:"embedded;embeddedPrefix:iface_pre_down_"`// action that is executed before the device is down
PostDownStringConfigOption`gorm:"embedded;embeddedPrefix:iface_post_down_"`// action that is executed after the device is down
}
func(p*PeerInterfaceConfig)AddressStr()string{
returnCidrsToString(p.Addresses)
}
typePhysicalPeerstruct{
IdentifierPeerIdentifier// peer unique identifier
Endpointstring// the endpoint address
AllowedIPs[]Cidr// all allowed ip subnets
KeyPair// private/public Key of the peer, for imports it only contains the public key as the private key is not known to the server
PresharedKeyPreSharedKey// the pre-shared Key of the peer
PersistentKeepaliveint// the persistent keep-alive interval
LastHandshaketime.Time
ProtocolVersionint
BytesUploaduint64// upload bytes are the number of bytes that the remote peer has sent to the server
BytesDownloaduint64// upload bytes are the number of bytes that the remote peer has received from the server