mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2024-12-30 02:37:01 +00:00
fix lsof package importing
This commit is contained in:
+1
-3
@@ -4,8 +4,6 @@ import (
|
||||
"errors"
|
||||
"net"
|
||||
"strconv"
|
||||
|
||||
"github.com/eycorsican/go-tun2socks/common/lsof"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -16,6 +14,6 @@ var (
|
||||
func GetProcessName(addr net.Addr) string {
|
||||
localHost, localPortStr, _ := net.SplitHostPort(addr.String())
|
||||
localPortInt, _ := strconv.Atoi(localPortStr)
|
||||
process, _ := lsof.GetCommandNameBySocket(addr.Network(), localHost, uint16(localPortInt))
|
||||
process, _ := GetCommandNameBySocket(addr.Network(), localHost, uint16(localPortInt))
|
||||
return process
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user