- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
相关信息:issue 3602 on GitHub
我正在从事一个收集和测试公共(public)/免费代理的项目,并注意到当我使用 curl_multi 接口(interface)测试这些代理时,有时我会遇到许多 28(timeout)
错误。如果我单独测试每个代理,这永远不会发生。
问题是这个问题的重现性不可靠,它不会总是出现,它可能是 curl 中的某些东西或其他东西。
不幸的是,我不是一个如此深入的网络调试器,我不知道如何在更深层次上调试这个问题,但是我写了 2 个 C 测试程序(其中一个最初是 written by Daniel Stenberg 但我修改了它输出为与其他 C 程序相同的格式)。这 2 个 C 程序使用 curl 测试了 407 个公共(public)代理
使用 curl_multi 接口(interface)(有问题)
在多个线程上使用 curl,每个 curl 在一个线程上运行。 (没问题)
These are the 2 C programs I wrote for testing我不是 C 语言开发人员,所以如果您在这 2 个程序中发现任何错误,请告诉我。
这是 original PHP class我一个月前用来重现问题的。
和these are the 2 C programs tests results .您可以注意到使用 curl_multi 超时完成的测试,而 curl-threads 的超时是稳定的(407 个代理中大约有 50 个在工作)。
这是测试结果的样本。 请注意第 4 列和第 5 列,了解 curl 线程如何超时大约 170 次并成功连接 40 次。其中,curl_multi 在 407 个代理中有 0 次成功连接和超时约 300 次。
column(1) : #
column(2) : time(UTC)
column(3) : total execution time (seconds)
column(4) : no error 0 (how many requests result in no error CURLE_OK)
column(5) : error 28 (how many requests result in error 28 CURLE_OPERATION_TIMEDOUT)
column(6) : error 7 (how many requests result in error 7 CURLE_COULDNT_CONNECT)
column(7) : error 35 (how many requests result in error 35 CURLE_SSL_CONNECT_ERROR)
column(8) : error 56 (how many requests result in error 56 CURLE_RECV_ERROR)
column(9) : other errors (how many requests result in errors other than the above)
column(10) : program that used the curl
column(11) : cURL version
c(1) c(2) c(3)c(4)c(5)c(6)c(7)c(8)c(9) c(10) c(11)
267 2019-3-28 01:58:01 40 43 176 183 1 4 0 C (curl - threads) (Linux Fedora) 7.59.0
268 2019-3-28 01:59:01 30 0 286 110 1 10 0 C (curl-multi one thread) (Linux Fedora) 7.59.0
269 2019-3-28 02:00:01 30 46 169 181 1 8 2 C (curl - threads) (Linux Fedora) 7.59.0
270 2019-3-28 02:01:01 31 0 331 74 1 1 0 C (curl-multi one thread) (Linux Fedora) 7.59.0
271 2019-3-28 02:02:01 30 42 173 186 1 4 1 C (curl - threads) (Linux Fedora) 7.59.0
272 2019-3-28 02:03:01 30 0 277 116 1 13 0 C (curl-multi one thread) (Linux Fedora) 7.59.0
为什么 curl_multi 超时与大多数连接不一致,而 curl-threads 从不这样做?
我下载了 Wireshark 并用它来捕获每个 2 C 程序运行时的流量,我也 filtered 2 个 C 程序使用的代理列表的流量,并保存了 files在 GitHub 上。
407 个代理中有 63 个成功连接和 158 个连接超时。
407 个代理中有 0 个成功连接和 272 个连接超时。
您可以使用 Wireshark 打开 .pcapng
文件,并在出现预期/意外行为时查看我计算机上记录的流量。我过滤了到 407 代理 IP 的流量,并在 30 秒的 curl 限制后让 Wireshark 打开了一会儿,因为我注意到一些数据包仍然出现。我不知道 Wireshark 和这种级别的网络,但我认为这可能会有用。
带宽注意事项:
在 wireshark 中打开 curl_threads 程序的 .pcapng
文件(正常行为)并转到 Statistics > Conversations 。你会看到这样的窗口
数据我已经复制保存了here在 GitHuB 上,现在计算从 A->B 和 B->A 发送的字节的 Sum
。
The ENTIRE bandwidth needed to work normally is about 692.8 KB.
最佳答案
我得到了可重现的行为,我正在等待 GitHub 上的 badger 回复。尝试运行 Ettercap 等程序以获取更多信息。
关于php - 如何在测试公共(public)代理时可靠地重现 curl_multi 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54827396/
这是在 https://stackoverflow.com/questions/12639454/make-scalacheck-tests-deterministic 中作为“奖金问题”提出的,但没
我的项目使用 Angular 6 和 Leaflet 1.2。 我想重现当用户在 Leaflet map 上保持右键或左键单击时的拖动效果。例如,我希望在不断按下空格键时能够开始拖动 map 。 我已
我们正在将我们的用户身份验证从提供的 .NET 实现迁移到我们自己的系统。 我们希望能够支持存在于 aspNet_Membership 表中的旧密码。 Password 和 Salt 位于该表中,因此
我有一个二进制文件,它在 99% 的时间里都运行良好。有时,我无法理解,它会因这个输出而崩溃。在我重新启动之后,一切正常。 二进制是一个模板系统。它读取了一些带有占位符的模板,例如{%foo%} 或
我试图在 c 中重现 strcpy 的行为,我的问题是该函数有效但它在末尾附加了额外的东西。 char *ft_strcpy(char * dst, const char * src) { in
我最近遇到了可怕的 UserPreferenceChanged 事件 UI 卡住问题,随后我解决了可能的原因,例如: 调用单个控件而不是主应用程序表单(参见 https://stackoverflow
在 Scala 编程中,我可以读到 ==运算符的行为就像是这样定义的: final def == (that: Any): Boolean = if (null eq this) {null eq t
我正在和我的 friend 一起开发 Django 项目。该项目依赖于一些 python 模块。我在 virtualenv 中安装了 django 和其他依赖项。 django 项目的代码位于一个存储
关于spark的大多数问题都使用show作为代码示例,没有生成数据帧的代码,如下所示: df.show() +-------+--------+----------+ |USER_ID|locatio
我正在尝试重现 java.lang.OutOfMemoryError: unable to create new native thread但是使用 -Xss VM 参数。我猜想如果我们有大量线程,并
我正在尝试在自定义 alertView 中插入表格 View 。我需要实现与默认警报相同的样式。从 Debug View Hierarchy 我几乎复制了样式,但我无法弄清楚 Apple 如何设置模糊
标准是否保证如果 std::mt19937 被相同的数字播种,它会在所有平台上产生相同的数字序列? 换句话说,它的实现是否由标准明确定义,或者像 std::rand() 一样被视为实现细节? 最佳答案
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的
我有一个网站可以从 BingPreview/1.0b* 获得访问,这很可能是 Bing 的机器人。 我收到一个错误,它似乎无法找到我非常确定应该存在的 DOM 元素。我没有从任何其他浏览器(在所有主要
有谁知道如何重现 new Notes new scanning feature在 iOS 11 中?? AVFoundation 是否用于相机? 摄像头如何检测纸张/文档/卡片的形状? 他们如何实时放
您好! 作为使用 Objective-C 开发 iPhone 应用程序的初学者,我想知道重新创建 iPhone SMS 应用程序 UI(带有消息气泡等的用户界面)的最简单方法是什么 我考虑过将 UIT
这个问题在这里已经有了答案: 关闭 10 年前。 Possible Duplicate: How can the built-in range function take a single argu
虽然这很可能是我自己犯的错误,但有人可以帮助我。我有一个包含 6 个数据点的极坐标图,在绘制时仅显示 5 个数据点。如果这是一个问题,我会在 GitHub 上打开 1,但我在想,如果它归结于我糟糕的代
我正在尝试使用 rCharts 重现简单的示例绘图库 sankey图表。我发现this example from scratch并尝试重现它,但是,我遇到了一些问题。 首先,我尝试在没有任何内容的情况
进入 Haskell,我试图重现 numpy's reshape 之类的东西与列表。具体来说,给定一个平面列表,将其 reshape 为一个 n 维列表: import numpy as np a =
我是一名优秀的程序员,十分优秀!