Adapter linux client for xinetd
Signed-off-by: Pin <wf6DJd8a3xSSCZbn@protonmail.com>
This commit is contained in:
@@ -6,7 +6,14 @@ import (
|
||||
)
|
||||
|
||||
func GetAdapter() string {
|
||||
return "ens160"
|
||||
inetReturn := ""
|
||||
inetInterfaces, _ := net.Interfaces()
|
||||
if inetInterfaces[0].Name == "lo" { // Return second interface if first is loopback
|
||||
inetReturn = inetInterfaces[1].Name
|
||||
} else {
|
||||
inetReturn = inetInterfaces[0].Name
|
||||
}
|
||||
return inetReturn
|
||||
}
|
||||
|
||||
func ConnectBack(ip string, connectbackPort string) {
|
||||
|
||||
Reference in New Issue
Block a user