Is there a way to intercept TCP and UDP traffic that is inside localhost on Windows in C#? For example an app running on localhost sending messages through TCP and/or UDP on localhost... I need to intercept these to determine the efficiency of data of the program, for this I'm building an utility tool in C# (need a self build solution no product)

有帮助吗?

解决方案

Usually you have to use program like wireshark to capture loopback (127.0.0.1) traffic, but it's impossible for libpcap on Windows. (read this note)

You have to use Raw Cap if you want to sniff the loopback interface

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top