2024-03-11 15:34:06 +01:00
|
|
|
package proto
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type CreatePeerRequest struct {
|
|
|
|
UUID string `json:"uuid"`
|
|
|
|
PublicKey string `json:"public_key"`
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JSON returned for user to use. This means that the peer can connect with
|
|
|
|
these parameters as a wireguard peer */
|
|
|
|
type Peer struct {
|
|
|
|
MTU uint16 `json:"mtu"`
|
|
|
|
PublicKey string `json:"public_key"`
|
2024-03-13 23:46:05 +01:00
|
|
|
PublicKeyUrlSafe string `json:"public_key_url_safe"`
|
2024-03-11 15:34:06 +01:00
|
|
|
Endpoint string `json:"endpoint"`
|
|
|
|
AllowedIPs net.IP `json:"allowed_ips"`
|
|
|
|
PersistentKeepalive time.Duration `json:"presistent_keepalive"`
|
|
|
|
TX int64
|
|
|
|
RX int64
|
|
|
|
}
|
|
|
|
|