Browse Source

fix lsof package importing

pull/15/head
Jason 5 years ago
parent
commit
cf3ebef78a
  1. 4
      common/lsof/lsof.go

4
common/lsof/lsof.go

@ -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
}

Loading…
Cancel
Save