Optimize Linux process finder

This commit is contained in:
世界
2026-03-23 15:54:29 +08:00
parent 60c8e40386
commit 828c324b18
9 changed files with 462 additions and 144 deletions

View File

@@ -24,6 +24,10 @@ func NewSearcher(_ Config) (Searcher, error) {
return &darwinSearcher{}, nil
}
func (d *darwinSearcher) Close() error {
return nil
}
func (d *darwinSearcher) FindProcessInfo(ctx context.Context, network string, source netip.AddrPort, destination netip.AddrPort) (*adapter.ConnectionOwner, error) {
processName, err := findProcessName(network, source.Addr(), int(source.Port()))
if err != nil {