Clash.Meta/component/process/process.go

27 lines
550 B
Go
Raw Normal View History

package process
import (
"errors"
2022-04-20 01:52:51 +08:00
"net/netip"
2023-11-17 19:39:57 +08:00
"github.com/metacubex/mihomo/constant"
)
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"
)
2023-01-14 02:23:30 +08:00
func FindProcessName(network string, srcIP netip.Addr, srcPort int) (uint32, string, error) {
return findProcessName(network, srcIP, srcPort)
}
2023-11-17 19:39:57 +08:00
func FindPackageName(metadata *constant.Metadata) (string, error) {
return "", nil
}