c# - 如何从网络流量中获取 URL
问题描述
我正在尝试获取网络流量的 URL,即用户通过使用 c# 中的 NetworkInterface 浏览的网站。我能够通过以下代码获得总字节数:
我正在寻找通过 URL 获取网络流量的方法。
if (!NetworkInterface.GetIsNetworkAvailable())
return;
NetworkInterface[] interfaces
= NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface ni in interfaces)
{
Console.WriteLine(" Bytes Sent: {0}",
ni.GetIPv4Statistics().BytesSent);
Console.WriteLine(" Bytes Received: {0}",
ni.GetIPv4Statistics().BytesReceived);
}
解决方案
推荐阅读
- gitlab - 从 GitLab 调用 Webhook 会返回 SSL 错误
- python-3.x - 根据索引或列组合行
- redis - 脚本冲洗 - 如何?
- python - keras 如何添加 Lambda 层以将张量的值四舍五入为 0 或 1
- java - 原因:java.lang.ClassCastException:java.lang.Class 无法在 android studio 中转换为 java.util.ArrayList
- aws-cli - 尝试使用 aws cli 调整实例组大小时出错
- firebase - 如果不链接 Fabric 应用,Firebase 不会向我显示 Crashlytics 详细信息
- python - sql ALTER 和 INSERT 都具有相同的 python 占位符
- git - 如何从詹金斯管道中的git克隆远程仓库的特定文件夹?
- r - 正则表达式 UTM 谷歌