v0.2.0
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user