hvpn-node3/proto/peer.go
HeshamTB 1a611616bd
init:
- Working basic wg controls
    - Working ip_pool allocation
    - Working basic HTTP API

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-11 17:34:06 +03:00

27 lines
568 B
Go

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 {
Address net.IP `json:"address"`
MTU uint16 `json:"mtu"`
PublicKey string `json:"public_key"`
Endpoint string `json:"endpoint"`
AllowedIPs net.IP `json:"allowed_ips"`
PersistentKeepalive time.Duration `json:"presistent_keepalive"`
TX int64
RX int64
}