mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
UI fixes RIVM-8
This commit is contained in:
parent
7cee94e5cb
commit
f84f0a5f19
5 changed files with 54 additions and 8 deletions
|
@ -12,6 +12,7 @@ type GetSelfResponse struct {
|
|||
BuildName string `json:"build_name"`
|
||||
BuildVersion string `json:"build_version"`
|
||||
PublicKey string `json:"key"`
|
||||
PrivateKey string `json:"private_key"`
|
||||
IPAddress string `json:"address"`
|
||||
Coords []uint64 `json:"coords"`
|
||||
Subnet string `json:"subnet"`
|
||||
|
@ -23,6 +24,7 @@ func (a *AdminSocket) getSelfHandler(req *GetSelfRequest, res *GetSelfResponse)
|
|||
res.BuildName = version.BuildName()
|
||||
res.BuildVersion = version.BuildVersion()
|
||||
res.PublicKey = hex.EncodeToString(self.Key[:])
|
||||
res.PrivateKey = hex.EncodeToString(self.PrivateKey[:])
|
||||
res.IPAddress = a.core.Address().String()
|
||||
res.Subnet = snet.String()
|
||||
res.Coords = self.Coords
|
||||
|
|
|
@ -21,9 +21,10 @@ import (
|
|||
)
|
||||
|
||||
type SelfInfo struct {
|
||||
Key ed25519.PublicKey
|
||||
Root ed25519.PublicKey
|
||||
Coords []uint64
|
||||
Key ed25519.PublicKey
|
||||
Root ed25519.PublicKey
|
||||
PrivateKey ed25519.PrivateKey
|
||||
Coords []uint64
|
||||
}
|
||||
|
||||
type PeerInfo struct {
|
||||
|
@ -60,6 +61,7 @@ func (c *Core) GetSelf() SelfInfo {
|
|||
var self SelfInfo
|
||||
s := c.PacketConn.PacketConn.Debug.GetSelf()
|
||||
self.Key = s.Key
|
||||
self.PrivateKey = c.secret
|
||||
self.Root = s.Root
|
||||
self.Coords = s.Coords
|
||||
return self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue