mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 21:51:23 +08:00
22 lines
405 B
Go
22 lines
405 B
Go
package process
|
|
|
|
import (
|
|
"errors"
|
|
"net"
|
|
)
|
|
|
|
var (
|
|
ErrInvalidNetwork = errors.New("invalid network")
|
|
ErrPlatformNotSupport = errors.New("not support on this platform")
|
|
ErrNotFound = errors.New("process not found")
|
|
)
|
|
|
|
const (
|
|
TCP = "tcp"
|
|
UDP = "udp"
|
|
)
|
|
|
|
func FindProcessName(network string, srcIP net.IP, srcPort int) (string, error) {
|
|
return findProcessName(network, srcIP, srcPort)
|
|
}
|