hvpn-node3/proto/peer.go

26 lines
588 B
Go
Raw Normal View History

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"`
PublicKeyUrlSafe string `json:"public_key_url_safe"`
Endpoint string `json:"endpoint"`
AllowedIPs net.IP `json:"allowed_ips"`
PersistentKeepalive time.Duration `json:"presistent_keepalive"`
TX int64
RX int64
}