feat: return device type on nodeinfo

This commit is contained in:
HeshamTB 2024-03-18 02:06:33 +03:00
parent 4c6e251247
commit 11340e4d7a
2 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ func HandleGetNodeInfo(wgLink *WGLink) http.HandlerFunc {
PublicKey: dev.PublicKey.String(), PublicKey: dev.PublicKey.String(),
UDPPort: dev.ListenPort, UDPPort: dev.ListenPort,
Endpoint: wgLink.Endpoint, Endpoint: wgLink.Endpoint,
Type: dev.Type.String(),
// TODO: Send endpoint for clients to connect // TODO: Send endpoint for clients to connect
}, },
) )

View File

@ -4,4 +4,5 @@ type NodePublicInfo struct {
PublicKey string `json:"public_key"` PublicKey string `json:"public_key"`
UDPPort int `json:"udp_port"` UDPPort int `json:"udp_port"`
Endpoint string `json:"endpoint"` Endpoint string `json:"endpoint"`
Type string
} }