start mDNS

This commit is contained in:
vxclutch
2026-05-29 14:48:57 -04:00
parent 230e58c286
commit a93fa2f61f
5 changed files with 112 additions and 9 deletions

View File

@@ -9,14 +9,14 @@ import (
func GenerateShareLink(port int) string {
link := "http://"
link += getLocalIP()
link += GetLocalIP()
link += fmt.Sprintf(":%d", port)
link += "/"
link += lash.ShareLinkToken
return link
}
func getLocalIP() string {
func GetLocalIP() string {
conn, err := net.Dial("udp", "8.8.8.8:80")
if err != nil {
errx.FatalPerror(err)