1.80测试版

我观察了下我的客户端统计分类,,,确实和你有一样的问题,本地ip这里 0.0.0.0和192.168.1.2这样一直来回跳动

感谢反馈,已发现原因,下一版修复

感谢分享。。

崩溃报告好像又发不出去了

Start collecting information about the crash...
[taking_screenshot]
Desktop screenshot generation disabled; skipping.
Creating crash dump file...
[creating_dump]
Dumping info for module C:\Users\Administrator\Desktop\BitComet Stable (build 1.78.7.27) 比特彗星全功能解锁豪华版\BitComet_x64.exe
Dumping info for module C:\Windows\System32\ntdll.dll
Dumping info for module C:\Windows\System32\kernel32.dll
Dumping info for module C:\Windows\System32\KERNELBASE.dll
Dumping info for module C:\Windows\System32\user32.dll
Dumping info for module C:\Windows\System32\win32u.dll
Dumping info for module C:\Windows\System32\gdi32.dll
Dumping info for module C:\Windows\System32\gdi32full.dll
Dumping info for module C:\Windows\System32\msvcp_win.dll
Dumping info for module C:\Windows\System32\ucrtbase.dll
Dumping info for module C:\Windows\System32\advapi32.dll
Dumping info for module C:\Windows\System32\msvcrt.dll
Dumping info for module C:\Windows\System32\sechost.dll
Dumping info for module C:\Windows\System32\rpcrt4.dll
Dumping info for module C:\Windows\System32\shell32.dll
Dumping info for module C:\Windows\System32\cfgmgr32.dll
Dumping info for module C:\Windows\System32\SHCore.dll
Dumping info for module C:\Windows\System32\combase.dll
Dumping info for module C:\Windows\System32\bcryptPrimitives.dll
Dumping info for module C:\Windows\System32\windows.storage.dll
Dumping info for module C:\Windows\System32\profapi.dll
Dumping info for module C:\Windows\System32\powrprof.dll
Dumping info for module C:\Windows\System32\shlwapi.dll
Dumping info for module C:\Windows\System32\kernel.appcore.dll
Dumping info for module C:\Windows\System32\cryptsp.dll
Dumping info for module C:\Windows\System32\ole32.dll
Dumping info for module C:\Windows\System32\winmm.dll
Dumping info for module C:\Windows\System32\winmmbase.dll
Dumping info for module C:\Windows\System32\ws2_32.dll
Dumping info for module C:\Windows\System32\comdlg32.dll
Dumping info for module C:\Windows\System32\IPHLPAPI.DLL
Dumping info for module C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17763.1790_none_de76e418534623b9\comctl32.dll
Dumping info for module C:\Windows\System32\msimg32.dll
Dumping info for module C:\Windows\System32\oleaut32.dll
Dumping info for module C:\Windows\System32\version.dll
Dumping info for module C:\Windows\System32\winspool.drv
Dumping info for module C:\Windows\System32\bcrypt.dll
Dumping info for module C:\Windows\System32\uxtheme.dll
Dumping info for module C:\Windows\System32\oleacc.dll
Dumping info for module C:\Windows\System32\propsys.dll
Dumping info for module C:\Windows\System32\imm32.dll
Dumping info for module C:\Windows\System32\msctf.dll
Dumping info for module C:\Windows\System32\mswsock.dll
Dumping info for module C:\Windows\System32\wshqos.dll
Dumping info for module C:\Windows\System32\WSHTCPIP.DLL
Dumping info for module C:\Windows\System32\wship6.dll
Dumping info for module C:\Windows\System32\rsaenh.dll
Dumping info for module C:\Windows\System32\CRYPTBASE.dll
Dumping info for module C:\Windows\System32\dwmapi.dll
Dumping info for module C:\Windows\System32\crypt32.dll
Dumping info for module C:\Windows\System32\msasn1.dll
Dumping info for module C:\Windows\System32\clbcatq.dll
Dumping info for module C:\Windows\System32\ieframe.dll
Dumping info for module C:\Windows\System32\netapi32.dll
Dumping info for module C:\Windows\System32\iertutil.dll
Dumping info for module C:\Windows\System32\userenv.dll
Dumping info for module C:\Windows\System32\winhttp.dll
Dumping info for module C:\Windows\System32\netutils.dll
Dumping info for module C:\Windows\System32\wkscli.dll
Dumping info for module C:\Windows\System32\sxs.dll
Dumping info for module C:\Windows\System32\dataexchange.dll
Dumping info for module C:\Windows\System32\d3d11.dll
Dumping info for module C:\Windows\System32\dcomp.dll
Dumping info for module C:\Windows\System32\dxgi.dll
Dumping info for module C:\Windows\System32\twinapi.appcore.dll
Dumping info for module C:\Windows\System32\rmclient.dll
Dumping info for module C:\Windows\System32\urlmon.dll
Dumping info for module C:\Windows\System32\WindowsCodecs.dll
Dumping info for module C:\Windows\System32\nsi.dll
Dumping info for module C:\Windows\System32\dhcpcsvc6.DLL
Dumping info for module C:\Windows\System32\dhcpcsvc.dll
Dumping info for module C:\Windows\System32\dnsapi.dll
Dumping info for module C:\Windows\System32\edputil.dll
Dumping info for module C:\Windows\System32\sspicli.dll
Dumping info for module C:\Windows\System32\cldapi.dll
Dumping info for module C:\Windows\System32\fltLib.dll
Dumping info for module C:\Windows\System32\WinTypes.dll
Dumping info for module C:\Windows\System32\appresolver.dll
Dumping info for module C:\Windows\System32\Bcp47Langs.dll
Dumping info for module C:\Windows\System32\slc.dll
Dumping info for module C:\Windows\System32\sppc.dll
Dumping info for module C:\Windows\System32\FirewallAPI.dll
Dumping info for module C:\Windows\System32\fwbase.dll
Dumping info for module C:\Windows\System32\FWPolicyIOMgr.dll
Dumping info for module C:\Windows\System32\linkinfo.dll
Dumping info for module C:\Windows\System32\msIso.dll
Dumping info for module C:\Windows\System32\wininet.dll
Dumping info for module C:\Windows\System32\ondemandconnroutehelper.dll
Dumping info for module C:\Windows\System32\winnsi.dll
Dumping info for module C:\Windows\System32\mshtml.dll
Dumping info for module C:\Windows\System32\srpapi.dll
Dumping info for module C:\Windows\System32\mlang.dll
Dumping info for module C:\Windows\System32\wldp.dll
Dumping info for module C:\Windows\System32\wintrust.dll
Dumping info for module C:\Windows\System32\ieapfltr.dll
Dumping info for module C:\Windows\System32\jscript9.dll
Dumping info for module C:\Windows\System32\thumbcache.dll
Dumping info for module C:\Windows\System32\TextInputFramework.dll
Dumping info for module C:\Windows\System32\CoreUIComponents.dll
Dumping info for module C:\Windows\System32\CoreMessaging.dll
Dumping info for module C:\Windows\System32\ntmarta.dll
Dumping info for module C:\Windows\System32\ntshrui.dll
Dumping info for module C:\Windows\System32\srvcli.dll
Dumping info for module C:\Windows\System32\cscapi.dll
Dumping info for module C:\Windows\System32\policymanager.dll
Dumping info for module C:\Windows\System32\msvcp110_win.dll
Dumping info for module C:\Windows\System32\msimtf.dll
Dumping info for module C:\Windows\System32\d2d1.dll
Dumping info for module C:\Windows\System32\DWrite.dll
Dumping info for module C:\Windows\System32\d3d10warp.dll
Dumping info for module C:\Windows\System32\secur32.dll
Dumping info for module C:\Windows\System32\explorerframe.dll
Dumping info for module C:\Windows\System32\psapi.dll
Dumping info for module C:\Windows\System32\rasadhlp.dll
Dumping info for module C:\Windows\System32\FWPUCLNT.DLL
Dumping info for module C:\Windows\System32\uiautomationcore.dll
Dumping info for module C:\Windows\System32\shdocvw.dll
Dumping info for module C:\Windows\System32\msctfuimanager.dll
Dumping info for module C:\Windows\System32\dui70.dll
Dumping info for module C:\Windows\System32\duser.dll
Dumping info for module C:\Windows\System32\UIAnimation.dll
Dumping info for module C:\Windows\System32\directmanipulation.dll
Dumping info for module C:\Windows\System32\xmllite.dll
Dumping info for module C:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll
Dumping info for module C:\Windows\System32\coml2.dll
Dumping info for module C:\Windows\System32\apphelp.dll
Dumping info for module C:\ProgramData\Microsoft\Windows Defender\Platform\4.18.2108.7-0\MpOAV.dll
Dumping info for module C:\Windows\System32\gpapi.dll
Dumping info for module C:\Windows\System32\MMDevAPI.dll
Dumping info for module C:\Windows\System32\devobj.dll
Dumping info for module C:\Windows\System32\schannel.dll
Dumping info for module C:\Windows\System32\mskeyprotect.dll
Dumping info for module C:\Windows\System32\ncrypt.dll
Dumping info for module C:\Windows\System32\ntasn1.dll
Dumping info for module C:\Windows\System32\dpapi.dll
Dumping info for module C:\Windows\System32\cryptnet.dll
Dumping info for module C:\Windows\System32\ncryptsslp.dll
Dumping info for module C:\Windows\System32\webio.dll
Dumping info for module C:\Windows\System32\winsta.dll
Dumping info for module C:\Windows\System32\msacm32.dll
Dumping info for module C:\Windows\System32\wdmaud.drv
Dumping info for module C:\Windows\System32\avrt.dll
Dumping info for module C:\Windows\System32\ksuser.dll
Dumping info for module C:\Windows\System32\AudioSes.dll
Dumping info for module C:\Windows\System32\msacm32.drv
Dumping info for module C:\Windows\System32\t2embed.dll
Dumping info for thread 0x1200
Dumping info for thread 0x18FC
Dumping info for thread 0x1A2C
Dumping info for thread 0x1364
Dumping info for thread 0xD18
Dumping info for thread 0x1170
Dumping info for thread 0xA6C
Dumping info for thread 0xAFC
Dumping info for thread 0x11B0
Dumping info for thread 0x11A4
Dumping info for thread 0x1500
Dumping info for thread 0x11CC
Dumping info for thread 0x1B04
Dumping info for thread 0x92C
Dumping info for thread 0x5AC
Dumping info for thread 0x1780
Dumping info for thread 0x198C
Dumping info for thread 0xADC
Dumping info for thread 0x1648
Dumping info for thread 0x11E8
Dumping info for thread 0x1288
Dumping info for thread 0x13A8
Dumping info for thread 0x19EC
Dumping info for thread 0xF88
Dumping info for thread 0xC24
Dumping info for thread 0x59C
Dumping info for thread 0x1664
Dumping info for thread 0x1218
Dumping info for thread 0x13FC
Dumping info for thread 0x1704
Dumping info for thread 0x1410
Dumping info for thread 0xB90
Dumping info for thread 0x1688
Dumping info for thread 0xE10
Dumping info for thread 0x1AAC
Dumping info for thread 0x1B44
Dumping info for thread 0xF38
Dumping info for thread 0x18C
Dumping info for thread 0x2A8
Dumping info for thread 0x1468
Dumping info for thread 0xF34
Dumping info for thread 0x19B4
Dumping info for thread 0x304
Dumping info for thread 0x1AB8
Dumping info for thread 0x1964
Dumping info for thread 0x91C
Dumping info for thread 0x41C
Dumping info for thread 0x132C
Dumping info for thread 0x934
Dumping info for thread 0x1690
Dumping info for thread 0x5BC
Dumping info for thread 0x5B8
Dumping info for thread 0x17F8
Dumping info for thread 0x1250
Dumping info for thread 0x76C
Dumping info for thread 0x1B30
Dumping info for thread 0x5F8
Dumping info for thread 0xF60
Dumping info for thread 0x1BD8
Dumping info for thread 0x940
Dumping info for thread 0x1A60
Dumping info for thread 0xC64
Dumping info for thread 0x1960
Dumping info for thread 0x924
Dumping info for thread 0x1A80
Dumping info for thread 0x1380
Dumping info for thread 0x1438
Dumping info for thread 0x1244
Dumping info for thread 0x420
Dumping info for thread 0xA84
Dumping info for thread 0x14C0
Dumping info for thread 0xD88
Dumping info for thread 0x67C
Dumping info for thread 0x1AC4
Dumping info for thread 0x204
Dumping info for thread 0x15DC
Dumping info for thread 0xD54
Dumping info for thread 0x188
Dumping info for thread 0x1C60
Finished creating dump.
[copying_files]
Finished copying files.
[encoding_video]
Desktop video recording disabled; skipping.
[confirm_send_report]
Restarting the application...
Application restarted OK.
[compressing_files]
Total file size for compression is 396305 bytes
Creating ZIP archive file C:\Users\Administrator\AppData\Roaming\BitComet\crash_report\d6056e61-52c2-481b-bdf4-b1b5247db996.zip
Compressing file crashdump.dmp
Compressing file crashrpt.xml
Calculating MD5 hash for file C:\Users\Administrator\AppData\Roaming\BitComet\crash_report\d6056e61-52c2-481b-bdf4-b1b5247db996.zip
Finished compressing files...OK
[end_compressing_files]
[sending_report]
[sending_attempt]
Sending error report over HTTP...
Preparing HTTP request data...
Calculating size of data to send.
Opening Internet connection.
Connecting to server
Opening HTTP request...
Sending HTTP request...
HttpSendRequestEx has failed.
Error sending HTTP request.
[sending_attempt]
Sending error report over SMTP is disabled (negative priority); skipping.
[sending_attempt]
Sending error report over SMAPI is disabled (negative priority); skipping.
[status_failed]

1.79这个修正,是有什么bep规范要求吗,不知道其它BT软件逻辑是怎么样的?这样改会影响PT下载吧?因为是私有种子本身就会强制禁用PEX交换他人的用户列表,此时没有还未进交换自身的IPV4/IPV6的话,网络连接性和双栈传输速率会降低?
核心修正:任务未启用PEX时,不再自动连接peer返回的自身IPv4/IPv6地址

这样改了后
PT种子,建立于ipv4通讯的情况,会导致始终无法得知对方的ipv4或ipv6地址
个人觉得,应当交互自己的IPV4 IPV6地址信息,但是禁止交互用户列表中其他用户的任何信息

好吧,我做了下测试,不受影响,因为1.78版本也是没有交互ipv4等信息的

两版本对比,表现一致
1.78

1.80beta1

"自动连接peer返回的自身IPv4/IPv6地址"可以换成单独的高级选项来控制,以避免和PEX选项混到一起


长效种子多线程情况各位能最快多少。。全是1MB/S很疑惑,可能家里移动宽带被识别出来导致QOS限速了,毕竟长效无加密

Beta 2 发布了,用爱快做网关进行了测试,两个NAT1后面的peer可以借助外网的peer进行UDP打洞成功建立uTP连接。

1個讚

外网服务器A
NAT1下载机器B
NAT4下载机器C
测试C连接B打洞成功了,,不过不是借助服务器A来实现的,,C还未连接上A,C直接获取到了DHT网络返回的列表,直接连入了B(等会我把任务上的DHT禁掉在试一下通过A实现)
下载机器B的监听端口为12808,nat端口是61994,在下载机器C上发现B的监听端口也被判断为nat端口了,话说有些监听端口是1是怎么回事(好像懂了,应当是这样返回nat端口没错,这样客户端才好对监听端口发起请求)
image

顺便发现这个打洞的前提一定是要B发起为UTP的情况,如果B通过TCP连入A,则无法传递打洞信息,,可以的话,在tcp连接成功的时候就响应一下已有的打洞信息传递?
还有内置的socks5还不支持utp代理
这次更新算是能支持了,,utp传输速度还有待优化,只有100KB。。

貌似还有个逻辑问题是,,,
B先连接A,然后C连接A,此时C没有获得A的用户交换,B却获得了,要等待一段时间后,B把 信息交给A,然后A才会交回给C,,,理论上 应当是C立即可以获得A的交互来信息以便拿到B的IP吧?

而且有个最致命的地方的,,,拿到交互后的IP后,然后他还是用打孔方式发起了,,导致连不上,获得的打孔交互ip应当使用直接方式发起连接,然后他还不会超时,没办法自动切换为直接连接模式,导致bittorrent.utp_after_holepunch 默认值改为自动 选项不生效


bittorrent.utp_after_holepunch 都改为禁用后,,,直接超级顺畅的成功nat打洞,虽然花了点时间不是实时交互pex,那utp_after_holepunch选项是不是失去作用可以废弃了。。。

这个更新就解决了打洞问题了
核心改进:通过PEX发送peer列表时,对已连接的uTP peer提供其UDP外网端口,而不采用其本地监听端口

测试做种A开放22223端口,下载B监听27455,访问A的远程端口为61772,随后PEX交互成功到C,,,C与B完成NAT打洞

顺便,,B收到来自C的UTP请求后,会立即判断为绿灯,,这个算个问题吗?错误显示为TCP已开放

想了下,utp_after_holepunch这个选项不应该废弃,,因为PT等私有种子的情况会对其禁用PEX,此时就需要这个选项来实现?

需要解决的问题有,UTP发起状态为 正在UDP打孔,无法超时断开
客户端收到UTP的远程请求,会错误显示绿灯为TCP端口已开放
在禁用PEX的时候,是否应当实现NAT打孔(各位讨论下是否应当对PT实现,因为会返回他人的用户列表,但是不会因此返回来自tracker以外的用户列表,PT之所以禁用PEX等功能是因为PEX会传递来自DHT网络和人为手动输入IP地址的信息)
服务器A执行禁用网卡断开网络操作,下载机器B还保持了2分钟的UTP连接,算个问题吗?

需要由内网机器向外网机器发起uTP连接才能确认外网UDP端口
或者可以在TCP连接建立后再额外建立一个uTP连接来触发外网UDP端口的判断,不过对其他客户端可能不太友好

考虑到NAT1以外的情况,默认用打孔方式发起还是有必要的,在超时后再切为直接连接便好
无法超时应该是个bug?

由于UDP无连接,如果发生中断,应该只能通过超时来判断
我之前也遇到个问题,电脑休眠10小时后,再开机连上之前的用户,连接时间仍然会延续上次的计时
不过这倒没什么影响

想问一下“查找其它peer进行UDP打洞”的具体含义
内网机器在发起UDP打洞的时候,是如何选择中继peer的呢?
是记录了目标peer的PEX来源,让关联peer来当中继吗?(这样打洞效率会高点但程序效率会低)
还是从已连接的peer中挑选中继节点?一次向一个peer发起,还是向多个甚至所有peer发起协助UDP打洞的请求?

最后还需要确认一点
当从不同来源获得IP相同但端口不同的peer时,是会尝试对所有端口发起连接,还是会过滤掉特定来源的[IP:PROT]?


我觉得bittorrent.utp_after_holepunch 的逻辑应该反过来:先尝试直接连接,超时后再寻找其他peer进行UDP打洞
这样对于公网以及NAT1的peer就不需要禁用多余的打洞操作
对于NAT1的peer,通过PEX的替换端口与DHT的implied_port 就可以被直接连接
对于其他NAT类型的peer,在直接连接失败后,可在后台一直寻找中继peer协助打洞直到成功为止(虽然会占用一点资源)


还有一个需要考虑的情况
假若本机对某个目标peer正在UDP打孔,如果这时候收到来自中继peer的connect消息的话,客户端是否能正常中止正在发起的UDP打孔,及时向目标节点发起uTP连接?

bittorrent.peer_hole_punch 选项用于启用 BEP 55 Holepunch extension。简称就是是否启用BEP55打洞
bittorrent.utp_after_holepunch 选项用于控制发起uTP连接前是否需要先向第三方请求协助打洞。简称就是和其它peer交互pex报文

实现的BEP 55打洞只支持传输状态和TCP保持相同端口的打洞,需要UDP端口保持开放状态,等于说是从TCP升级到UDP网络进行传输

1.80beta2版本做到了,采用来路端口来实现打洞,而不是相同的端口号,此时就成功解决了NAT打洞问题了
核心改进:通过PEX发送peer列表时,对已连接的uTP peer提供其UDP外网端口,而不采用其本地监听端口

NAT4的情况,每次发起的UDP端口都会发生改变,这个我看了是对所有的发起,自动超时后几次则会删除失效用户
我这测试NAT4机器可成功连入NAT1机器

这个还没遇到过,不清楚原因

"传递打洞信息"是指什么?TCP和uTP连接都支持BEP55打洞协议。

感谢反馈,socks5 UDP代理还没实现。

目前是要等30秒,下一版改短一点

这个暂时还没遇到过,需要测试一下

这个问题已找到,下一版修复

正常,遇到丢包会重发几个数据包尝试恢复连接

和libtorrent一样,彗星会记录每个peer通过pex传过来的已连接peer列表。打洞时会查找是否有其它peer已连接上目标peer,如果找到了则选取该peer作为协助打洞的peer。一次向一个peer发起协助打洞请求。

会尝试对该IP所有端口发起连接,连接失败3次的会被丢弃。

测试中成功打洞和直接连接耗时差不多,调整顺序影响不大。但打洞超时的问题处理还不完善,需要再改进改进。

打孔过程中收到connect消息,会立即发起uTP连接。这原本就是正常的打洞流程。

1個讚

是,,30秒实在太长了,我觉得2秒就差不多了

tcp我测的时候好像不行,下次我再测一下TCP能不能传递udp打洞

utp不在udp传输线程的流量图里面?而且发送UTP占用的CPU比较高,,不知道好不好优化下


看了下DHT也不在流量图UDP线程里面了

CPU占用率的流量图里,UDP线程目前不包括DHT和uTP处理线程。

我没理解错的话,应该是指TCP连接时传递的是TCP监听端口,而这个端口无法实现NAPT打洞。
需要在TCP连接建立后,再发起一次uTP/UDP连接,以获得NAPT后的UDP端口,再经过PEX扩散。

1.8 Beta2字体更清晰了,安装包上传到阿里云盘了https://www.aliyundrive.com/s/h7se8sLtHkk