diff --git a/README.md b/README.md
index bb456b30..20f60249 100644
--- a/README.md
+++ b/README.md
@@ -276,6 +276,13 @@ make build
Hoàng Đức Hiếu
+
+
+
+
+ Deon Thomas
+
+ |
@@ -283,6 +290,8 @@ make build
Mevan Samaratunga
|
+
+
@@ -290,8 +299,6 @@ make build
Michael G.
|
-
-
@@ -327,6 +334,8 @@ make build
Stefan Majer
|
+
+
@@ -334,8 +343,6 @@ make build
lachy2849
|
-
-
@@ -371,6 +378,8 @@ make build
Arthur Woimbée
|
+
+
@@ -378,8 +387,6 @@ make build
Bryan Stenson
|
-
-
@@ -415,6 +422,8 @@ make build
Jamie Greeff
|
+
+
@@ -422,8 +431,6 @@ make build
Jim Tittsler
|
-
-
@@ -459,6 +466,8 @@ make build
Shaanan Cohney
|
+
+
@@ -466,8 +475,6 @@ make build
Tanner
|
-
-
@@ -503,6 +510,8 @@ make build
Yang Bin
|
+
+
@@ -510,8 +519,6 @@ make build
Zakhar Bessarab
|
-
-
@@ -547,6 +554,8 @@ make build
ignoramous
|
+
+
@@ -554,8 +563,6 @@ make build
lion24
|
-
-
diff --git a/cmd/headscale/cli/nodes.go b/cmd/headscale/cli/nodes.go
index 12021f43..fa8b1b2c 100644
--- a/cmd/headscale/cli/nodes.go
+++ b/cmd/headscale/cli/nodes.go
@@ -13,6 +13,7 @@ import (
"github.com/pterm/pterm"
"github.com/spf13/cobra"
"google.golang.org/grpc/status"
+ "inet.af/netaddr"
"tailscale.com/types/key"
)
@@ -496,12 +497,23 @@ func nodesToPtables(
// Shared into this namespace
namespace = pterm.LightYellow(machine.Namespace.Name)
}
+
+ var IpV4Address string
+ var IpV6Address string
+ for _, addr := range machine.IpAddresses {
+ if netaddr.MustParseIP(addr).Is4() {
+ IpV4Address = addr
+ } else {
+ IpV6Address = addr
+ }
+ }
+
nodeData := []string{
strconv.FormatUint(machine.Id, headscale.Base10),
machine.Name,
nodeKey.ShortString(),
namespace,
- strings.Join(machine.IpAddresses, ", "),
+ strings.Join([]string{IpV4Address, IpV6Address}, ", "),
strconv.FormatBool(ephemeral),
lastSeenTime,
online,
diff --git a/docs/remote-cli.md b/docs/remote-cli.md
index 3b1dc845..c9d19680 100644
--- a/docs/remote-cli.md
+++ b/docs/remote-cli.md
@@ -24,7 +24,7 @@ To create a API key, log into your `headscale` server and generate a key:
headscale apikeys create --expiration 90d
```
-Copy the output of the command and save it for later. Please not that you can not retrieve a key again,
+Copy the output of the command and save it for later. Please note that you can not retrieve a key again,
if the key is lost, expire the old one, and create a new key.
To list the keys currently assosicated with the server:
|