From 11340e4d7ac09fc4c5f1f2665a27b1e59829dc41 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Mon, 18 Mar 2024 02:06:33 +0300 Subject: [PATCH] feat: return device type on nodeinfo --- handlers.go | 1 + proto/node.go | 1 + 2 files changed, 2 insertions(+) diff --git a/handlers.go b/handlers.go index 40744b7..c8a70cc 100644 --- a/handlers.go +++ b/handlers.go @@ -32,6 +32,7 @@ func HandleGetNodeInfo(wgLink *WGLink) http.HandlerFunc { PublicKey: dev.PublicKey.String(), UDPPort: dev.ListenPort, Endpoint: wgLink.Endpoint, + Type: dev.Type.String(), // TODO: Send endpoint for clients to connect }, ) diff --git a/proto/node.go b/proto/node.go index a6bed7d..f9e5041 100644 --- a/proto/node.go +++ b/proto/node.go @@ -4,4 +4,5 @@ type NodePublicInfo struct { PublicKey string `json:"public_key"` UDPPort int `json:"udp_port"` Endpoint string `json:"endpoint"` + Type string }