use github.com/wlynxg/anet package

may fix #253
This commit is contained in:
nikk gitanes
2025-01-25 08:59:47 +03:00
parent f2ffd092ff
commit 95bbf831f5
6 changed files with 12 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/gin-contrib/cors"
"github.com/gin-contrib/location"
"github.com/gin-gonic/gin"
"github.com/wlynxg/anet"
"server/dlna"
"server/settings"
@@ -139,7 +140,7 @@ func echo(c *gin.Context) {
}
func getLocalIps() []string {
ifaces, err := net.Interfaces()
ifaces, err := anet.Interfaces()
if err != nil {
log.TLogln("Error get local IPs")
return nil