ADDED:
* The ability to show both IPv4 and IPv6 addresses (if the client has
  dual-stack and either the server does as well or a separate ClientInfo
  is running on the "other" net family).
This commit is contained in:
brent saner
2025-12-13 04:19:05 -05:00
parent eb5c44e1c3
commit 9f97fcaf81
12 changed files with 244 additions and 93 deletions

View File

@@ -2,9 +2,22 @@ package server
import (
`fmt`
`net/netip`
`strings`
`html/template`
)
func getIpver(a netip.Addr) (verStr string) {
if a.Is4() {
verStr = "v4"
} else if a.Is6() {
verStr = "v6"
}
return
}
func getTitle(subPage string) (title string) {
if subPage == "" || subPage == "index" {
@@ -16,3 +29,10 @@ func getTitle(subPage string) (title string) {
return
}
func safeUrl(urlStr string) (u template.URL) {
u = template.URL(urlStr)
return
}