Commit Graph

3473 Commits

Author SHA1 Message Date
whr819987540 d0a23d3369 modify log info 2023-05-18 18:25:22 +08:00
whr819987540 c642515007 use mbpp to modify mbp 2023-05-08 16:38:45 +08:00
whr819987540 9f812744d0 NewMemory double pointer 2023-05-08 16:13:44 +08:00
whr819987540 f58ec9e188 NewMemory supports both seeder and leecher 2023-05-08 15:52:10 +08:00
whr819987540 a68c49defc use Debug flag 2023-05-08 11:30:36 +08:00
whr819987540 9a636d2326 set the global debug flag 'Debug' for and only for torrent module 2023-05-08 11:29:28 +08:00
whr819987540 bc82214838 support seeding 2023-05-06 15:04:12 +08:00
whr819987540 1346784b01 add comment, use announceList[0] to fullfille announce field 2023-05-06 11:44:23 +08:00
whr819987540 64c11ff7b5 add comment and debug info 2023-05-06 11:43:30 +08:00
whr819987540 ffd17b70a3 add encoding to .torrent default config 2023-05-04 17:29:53 +08:00
whr819987540 d8f10ed70a go mod tidy 2023-05-04 17:26:24 +08:00
whr819987540 90b694c4ae 返回某个torrent实际写入内存的字节数 2023-05-04 17:26:14 +08:00
whr819987540 30e909f905 实际写入chunk的位置 2023-05-04 17:25:29 +08:00
whr819987540 16ce9dc617 增加一个直接从Client返回ClientImpl的函数,用于读取MemoryClientImpl实际写入内存的字节数 2023-05-04 17:24:58 +08:00
whr819987540 c4fcfe712c BuildFromMemory从内存中直接生成.torrent 2023-05-04 17:22:46 +08:00
whr819987540 ee2821f72e 实现MemoryClientImpl 2023-05-04 17:20:39 +08:00
whr819987540 596be6e62b GeneratePiecesFromMemory 2023-05-04 16:38:41 +08:00
whr819987540 11405bf65b BuildFromMemory从内存中直接生成.torrent 2023-05-04 16:38:04 +08:00
whr819987540 81e4f2fa40 add comment 2023-04-27 16:03:48 +08:00
whr819987540 d02c7c9518 add comment 2023-04-27 16:03:14 +08:00
whr819987540 a7e27a4ff1 add comment 2023-04-27 16:02:23 +08:00
whr819987540 a6ca468094 add comment 2023-04-27 16:00:04 +08:00
whr819987540 2848a224f9 add debug info 2023-04-27 15:59:04 +08:00
whr819987540 31b19a2f19 add comment 2023-04-27 15:58:22 +08:00
whr819987540 5868ed4d31 add comment to BuildFromFilePath 2023-04-27 15:57:23 +08:00
whr819987540 874ac2c6b6 add test file for piece-length.go 2023-04-27 12:05:16 +08:00
whr819987540 16debff467 minimumPieceLength from 16KB to 64KB, add maximumPieceLength 2MB-, piecelength priority is over piece numbr priority 2023-04-27 12:04:53 +08:00
whr819987540 ff11917fa8 add comment to ChoosePieceLength 2023-04-27 10:38:37 +08:00
whr819987540 f7e8a6ad2d add comment for DownloadAll 2023-04-25 19:35:26 +08:00
whr 1fb2348a0e move cmd dir to new repo, torrent_main.git 2023-04-25 11:24:58 +08:00
whr 570704dcff add comment 2023-04-25 00:06:09 +08:00
whr 5f9483f571 add comment 2023-04-25 00:05:16 +08:00
whr 0a8b545d28 add comment and todo 2023-04-25 00:04:38 +08:00
whr 6f42096625 add go.mod for cmd/torrent 2023-04-24 21:34:30 +08:00
whr fd2f475ed0 go mod edit -replace=github.com/anacrolix/torrent=../torrent 2023-04-24 21:30:23 +08:00
Matt Joiner fdb0911e28
Don't log using torrent source as warning for context cancellation
This probably occurs because the info was obtained and we don't need to try the source anymore.
2023-04-04 19:13:14 +10:00
Matt Joiner 42d29d95a6
Import generics as g 2023-04-04 19:12:26 +10:00
Matt Joiner 069b92a98c
Add AddTorrentOpts.InfoBytes 2023-04-04 19:12:01 +10:00
Matt Joiner 8d3e86e3c0
Expose StringAddr 2023-04-03 15:10:54 +10:00
Matt Joiner e13fd755ee
bencode: Only use unsafe.String for go>=1.20 2023-04-03 15:10:38 +10:00
Matt Joiner 872b11bd57
bencode: Support parsing strings into bool 2023-03-20 10:50:22 +11:00
Matt Joiner c069849b40
Add Peer.Torrent
This was for accessing from callback events.
2023-03-01 14:17:29 +11:00
Matt Joiner 31bbd435f9
gorond 2023-03-01 12:34:35 +11:00
Matt Joiner d3b3d2d9bf
Finish moving all Peer types and methods into peer.go 2023-03-01 12:34:16 +11:00
Matt Joiner 2ae264b6cc
Expose UDP tracker error response type 2023-02-24 16:20:08 +11:00
Matt Joiner 63982c3c80
Don't reconnect before sending requests with current conn ID
The tracker udp://tracker.torrent.eu.org:451/announce gives `error response: "Connection ID missmatch.\x00"` every 2 minutes when under heavy use. I suspect that reconnect requests are sent just after the connection ID is confirmed as not stale, but before it used for a request, and the server rejects the request after processing the reconnect first.

It might also just be that that tracker server implementation is lazy and marks everything stale on regular boundaries.
2023-02-20 15:49:55 +11:00
Matt Joiner e8971ea0f1
Add unit test for relative availability after HaveNone
Could help with https://github.com/anacrolix/torrent/issues/813.
2023-02-19 13:24:25 +11:00
Matt Joiner 48b3e66c76
Add http and udp tracker server implementations 2023-02-19 12:08:23 +11:00
Matt Joiner e8b04c7181
gofumpt 2023-02-18 18:35:22 +11:00
dependabot[bot] 81201050bc
Bump golang.org/x/net from 0.5.0 to 0.7.0 (#819)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-18 16:06:17 +11:00