mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-21 20:09:10 +00:00
.
This commit is contained in:
parent
570032484f
commit
5175636d36
@ -109,7 +109,7 @@ func main() {
|
||||
case "status":
|
||||
authTokenRequired(authToken)
|
||||
cli.Status(basePath, authToken, cmdArgs, *jflag)
|
||||
case "peers":
|
||||
case "peers", "listpeers":
|
||||
authTokenRequired(authToken)
|
||||
cli.Peers(basePath, authToken, cmdArgs)
|
||||
case "roots":
|
||||
@ -121,7 +121,7 @@ func main() {
|
||||
case "removeroot":
|
||||
authTokenRequired(authToken)
|
||||
cli.RemoveRoot(basePath, authToken, cmdArgs)
|
||||
case "networks":
|
||||
case "networks", "listnetworks":
|
||||
authTokenRequired(authToken)
|
||||
cli.Networks(basePath, authToken, cmdArgs)
|
||||
case "join":
|
||||
|
@ -126,7 +126,7 @@ func (id *Identity) String() string {
|
||||
switch id.idtype {
|
||||
case IdentityTypeC25519:
|
||||
if len(id.publicKey) == IdentityTypeC25519PublicKeySize {
|
||||
return fmt.Sprintf("%.10x:0:%x", id.address, id.publicKey)
|
||||
return fmt.Sprintf("%.10x:0:%x", uint64(id.address), id.publicKey)
|
||||
}
|
||||
case IdentityTypeP384:
|
||||
if len(id.publicKey) == IdentityTypeP384PublicKeySize {
|
||||
@ -148,7 +148,11 @@ func (id *Identity) UnmarshalJSON(j []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println(s)
|
||||
nid, err := NewIdentityFromString(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*id = *nid
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user