diff --git a/cmd/serverFunc.go b/cmd/serverFunc.go index 67e7d10..795b8ff 100644 --- a/cmd/serverFunc.go +++ b/cmd/serverFunc.go @@ -174,7 +174,7 @@ func getClient(conn net.Conn) (int, error) { for i, v := range clientList { sameClient := basicC.Username == v.ClientBasicInfo.Username && basicC.PublicIP == v.ClientBasicInfo.PublicIP && - basicC.Hostname == v.ClientBasicInfo.Hostname + basicC.Hostname == v.ClientBasicInfo.Hostname && basicC.LocalIP == v.ClientBasicInfo.LocalIP if sameClient == true { clientList[i].IsOnline = true diff --git a/cmd/structs.go b/cmd/structs.go index 43d7ffe..2a38346 100644 --- a/cmd/structs.go +++ b/cmd/structs.go @@ -24,6 +24,7 @@ type ClientBasicInfo struct { OperatingSystem string Hostname string PublicIP string + LocalIP string } type Instructions struct { diff --git a/cmd/templates/index.html b/cmd/templates/index.html index d54f661..3229b02 100644 --- a/cmd/templates/index.html +++ b/cmd/templates/index.html @@ -35,7 +35,8 @@ ID Status - IP + Remote IP + Local IP Username Hostname Operating System @@ -60,6 +61,7 @@ {{ end }} {{ .ClientBasicInfo.PublicIP }} + {{ .ClientBasicInfo.LocalIP }} {{ .ClientBasicInfo.Username }} {{ .ClientBasicInfo.Hostname }} {{ .ClientBasicInfo.OperatingSystem }}