]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
2 months agocmd/btrtrc client btrtrc
Sergey Matveev [Thu, 20 Apr 2023 07:42:38 +0000 (10:42 +0300)]
cmd/btrtrc client

2 months agoFix building go-libutp with C17
Matt Joiner [Sun, 16 Feb 2025 01:22:40 +0000 (12:22 +1100)]
Fix building go-libutp with C17

Fixes #995

4 months agoWebSeed seems supported (#993)
Mitar [Sat, 28 Dec 2024 23:55:04 +0000 (00:55 +0100)]
WebSeed seems supported (#993)

6 months agoIgnore /.env
Matt Joiner [Thu, 17 Oct 2024 23:55:16 +0000 (10:55 +1100)]
Ignore /.env

I use this to set up CGO_LDFLAGS for possum

6 months agoAdd just check
Matt Joiner [Thu, 17 Oct 2024 23:54:02 +0000 (10:54 +1100)]
Add just check

6 months agoOnly apply WebRTC data channel write limit to webtorrent peer conns
Matt Joiner [Thu, 17 Oct 2024 23:57:59 +0000 (10:57 +1100)]
Only apply WebRTC data channel write limit to webtorrent peer conns

6 months agoupgrade pion/webrtc to v4 (#985)
Marco Vidonis [Mon, 14 Oct 2024 10:04:15 +0000 (11:04 +0100)]
upgrade pion/webrtc to v4 (#985)

6 months agoUpdate dep to remove govulncheck finding
Matt Joiner [Mon, 7 Oct 2024 00:30:33 +0000 (11:30 +1100)]
Update dep to remove govulncheck finding

6 months agoExpose WebRTC peerconn stats (#983)
Marco Vidonis [Thu, 3 Oct 2024 14:46:35 +0000 (15:46 +0100)]
Expose WebRTC peerconn stats (#983)

* add WebRTC peer connection transport stats

* save all peer connections in tracker-client and make stats available when seeding

* make offer ID keys into readable strings

* handle unsupported Peer Conn stats on WASM

6 months agoUsed aider and claude to refactor storage tests to go-quicktest/qt
Matt Joiner (aider) [Wed, 2 Oct 2024 01:25:32 +0000 (11:25 +1000)]
Used aider and claude to refactor storage tests to go-quicktest/qt

https://github.com/anacrolix/torrent/issues/959

6 months agoSet ConnectionIdMismatchNul error default log level to debug
Matt Joiner [Mon, 30 Sep 2024 02:13:59 +0000 (12:13 +1000)]
Set ConnectionIdMismatchNul error default log level to debug

7 months agoUse stdlib replacements of golang.org/x/exp and newer multiless
Matt Joiner [Sun, 29 Sep 2024 03:54:25 +0000 (13:54 +1000)]
Use stdlib replacements of golang.org/x/exp and newer multiless

Fixes #957.

7 months agogorond
Matt Joiner [Sat, 28 Sep 2024 12:20:25 +0000 (22:20 +1000)]
gorond

7 months agoRework handshake parsing
Matt Joiner [Sat, 28 Sep 2024 12:19:29 +0000 (22:19 +1000)]
Rework handshake parsing

7 months agoRemove use of missinggo perf
Matt Joiner [Sat, 28 Sep 2024 12:02:16 +0000 (22:02 +1000)]
Remove use of missinggo perf

7 months agoFix panic using web RTC RemoteAddr directly from conn v1.57.0
Matt Joiner [Mon, 9 Sep 2024 10:53:29 +0000 (20:53 +1000)]
Fix panic using web RTC RemoteAddr directly from conn

Fixes #972.

7 months agotracker/udp: Reset connection ID on error response
Matt Joiner [Tue, 3 Sep 2024 05:18:54 +0000 (15:18 +1000)]
tracker/udp: Reset connection ID on error response

7 months agotracker/udp: Improve context handling
Matt Joiner [Tue, 3 Sep 2024 05:18:30 +0000 (15:18 +1000)]
tracker/udp: Improve context handling

7 months agoBasic support for responding to HashRequest
mivik [Thu, 29 Aug 2024 09:13:44 +0000 (17:13 +0800)]
Basic support for responding to HashRequest

Also Piece.hasPieceLayer seems to be faulty so I tried fixing it

7 months agoSupport encoding Hashes & HashReject messages
mivik [Thu, 29 Aug 2024 09:12:44 +0000 (17:12 +0800)]
Support encoding Hashes & HashReject messages

8 months agoAdd webseed name to webseed peer logger
Matt Joiner [Tue, 27 Aug 2024 02:03:09 +0000 (12:03 +1000)]
Add webseed name to webseed peer logger

8 months agoFix webseed stall on request errors
Matt Joiner [Tue, 27 Aug 2024 02:03:01 +0000 (12:03 +1000)]
Fix webseed stall on request errors

8 months agoFix errors in webseed causing very long stalls in requesting
Matt Joiner [Tue, 27 Aug 2024 01:32:38 +0000 (11:32 +1000)]
Fix errors in webseed causing very long stalls in requesting

Reuse the "too fast" error handling for all errors when requesting from webseeds. This prevents long stalls due to common errors.

8 months agoFix webseeds not requesting after priorities are already set
Matt Joiner [Tue, 27 Aug 2024 01:29:59 +0000 (11:29 +1000)]
Fix webseeds not requesting after priorities are already set

https://github.com/anacrolix/torrent/issues/964#issuecomment-2295308596

8 months agoAdd test showing add webseed doesn't request after priorities are already set
Matt Joiner [Tue, 27 Aug 2024 01:29:18 +0000 (11:29 +1000)]
Add test showing add webseed doesn't request after priorities are already set

8 months agoFix empty Info marshalling test
Matt Joiner [Tue, 27 Aug 2024 00:03:22 +0000 (10:03 +1000)]
Fix empty Info marshalling test

8 months agoBasic support for serializing v2 torrent file (#968)
Mivik [Mon, 26 Aug 2024 09:44:45 +0000 (17:44 +0800)]
Basic support for serializing v2 torrent file (#968)

* Support marshalling FileTree

* Omit Pieces in torrent info if empty

Otherwise some BitTorrent client (e.g. libttorrent) will not be able to
parse v2 torrent file.

8 months agoTidy up cmd/torrent cleanup and websocket trackers logging
Matt Joiner [Tue, 13 Aug 2024 01:09:34 +0000 (11:09 +1000)]
Tidy up cmd/torrent cleanup and websocket trackers logging

8 months agoAdd contexted ReadWriter to handshakes
Matt Joiner [Sat, 10 Aug 2024 11:51:45 +0000 (21:51 +1000)]
Add contexted ReadWriter to handshakes

8 months agoAdd context to mse handshakes
Matt Joiner [Sat, 10 Aug 2024 04:41:02 +0000 (14:41 +1000)]
Add context to mse handshakes

9 months agoFix spello
Matt Joiner [Wed, 24 Jul 2024 05:21:02 +0000 (15:21 +1000)]
Fix spello

9 months agoChange some metainfo.MetaInfo methods to take pointer receivers
Matt Joiner [Tue, 23 Jul 2024 08:58:59 +0000 (18:58 +1000)]
Change some metainfo.MetaInfo methods to take pointer receivers

It's kind of unnecessary to take them by value here, and, slower. Use Rust instead!!

9 months agoBe more pedantic about trailing data in metainfo.Load and bencode.Unmarshal
Matt Joiner [Tue, 23 Jul 2024 08:58:04 +0000 (18:58 +1000)]
Be more pedantic about trailing data in metainfo.Load and bencode.Unmarshal

Fixes https://github.com/anacrolix/torrent/issues/963.

9 months agoTidy up use of quicktest
Matt Joiner [Tue, 23 Jul 2024 08:53:10 +0000 (18:53 +1000)]
Tidy up use of quicktest

9 months agoRemove confusing symlink
Matt Joiner [Sat, 13 Jul 2024 11:37:57 +0000 (21:37 +1000)]
Remove confusing symlink

Related to issue #961

9 months agoFix bad recursive reads in piece resource chunks ReadAt
Matt Joiner [Fri, 12 Jul 2024 05:21:37 +0000 (15:21 +1000)]
Fix bad recursive reads in piece resource chunks ReadAt

It would always read from the first chunk, and scan across io.EOF until it hit the right chunk.

9 months agoFix shadowed error in webseed response handling
Matt Joiner [Sun, 30 Jun 2024 09:52:53 +0000 (19:52 +1000)]
Fix shadowed error in webseed response handling

10 months agoUse mmap storage in test for performance
Matt Joiner [Thu, 27 Jun 2024 05:49:13 +0000 (15:49 +1000)]
Use mmap storage in test for performance

10 months agoResolve log and chansync from workspace
Matt Joiner [Thu, 27 Jun 2024 04:52:59 +0000 (14:52 +1000)]
Resolve log and chansync from workspace

10 months agogorond
Matt Joiner [Thu, 27 Jun 2024 04:35:46 +0000 (14:35 +1000)]
gorond

10 months agoAdd peer bootstrapping integration test
Matt Joiner [Thu, 27 Jun 2024 04:33:18 +0000 (14:33 +1000)]
Add peer bootstrapping integration test

10 months agoMake Torrent.Complete a method and make it return a read-only interface
Matt Joiner [Thu, 27 Jun 2024 04:32:32 +0000 (14:32 +1000)]
Make Torrent.Complete a method and make it return a read-only interface

10 months agoFix sqlite piece completion error when dirs are missing
Matt Joiner [Thu, 27 Jun 2024 04:31:31 +0000 (14:31 +1000)]
Fix sqlite piece completion error when dirs are missing

10 months agoAdd a Context param to ClientImpl.OpenTorrent for logging
Matt Joiner [Thu, 27 Jun 2024 04:34:54 +0000 (14:34 +1000)]
Add a Context param to ClientImpl.OpenTorrent for logging

This is very likely going to be a breaking change, but the alternative is a nightmare of backwards compatibility.

10 months agobencode: Support unmarshalling into maps with non-string key types
Matt Joiner [Wed, 26 Jun 2024 13:30:08 +0000 (23:30 +1000)]
bencode: Support unmarshalling into maps with non-string key types

Fixes #952

10 months agoRearrange the workspaces in tests
Matt Joiner [Wed, 26 Jun 2024 13:37:24 +0000 (23:37 +1000)]
Rearrange the workspaces in tests

10 months agoImprove some pointer stuff around worseConnInput
Matt Joiner [Wed, 26 Jun 2024 10:43:46 +0000 (20:43 +1000)]
Improve some pointer stuff around worseConnInput

10 months agoCorrectly hash hybrid torrents with trailing v1 padding file v1.56.1
Matt Joiner [Tue, 11 Jun 2024 06:21:04 +0000 (16:21 +1000)]
Correctly hash hybrid torrents with trailing v1 padding file

Fixes #949.

10 months agoUpdate possum dep v1.56.0
Matt Joiner [Mon, 3 Jun 2024 03:43:31 +0000 (13:43 +1000)]
Update possum dep

10 months agopossum: Use MovePrefix for completed chunks
Matt Joiner [Sat, 9 Mar 2024 06:36:22 +0000 (17:36 +1100)]
possum: Use MovePrefix for completed chunks

10 months agoclone func used since go 1.21 (#947)
ucwong [Thu, 30 May 2024 23:16:37 +0000 (00:16 +0100)]
clone func used since go 1.21 (#947)

11 months agoadd Torrent.ModifyTrackers() func (#945)
ucwong [Sun, 26 May 2024 11:47:04 +0000 (12:47 +0100)]
add Torrent.ModifyTrackers() func (#945)

* add ClearTrackers() func

* add stop channel for each announcer

* add stop once avoid multi close

* use waitgroup to stop ann

11 months agofix: upnp clear loop trap (#946)
Levi [Sun, 26 May 2024 11:38:54 +0000 (19:38 +0800)]
fix: upnp clear loop trap (#946)

11 months ago--- (#941)
dependabot[bot] [Fri, 24 May 2024 03:30:20 +0000 (13:30 +1000)]
--- (#941)

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>
11 months agofix: clear UPNP port mappings when client close (#942)
Levi [Fri, 24 May 2024 03:29:40 +0000 (11:29 +0800)]
fix: clear UPNP port mappings when client close (#942)

* fix: clear UPNP port mappings when client close

* fix: go mod sum

11 months agoAdd type updateRequestReason and comments
Matt Joiner [Fri, 3 May 2024 03:46:35 +0000 (13:46 +1000)]
Add type updateRequestReason and comments

11 months agoAdded comments and variables instead of raw reason strings
Mark Holt [Mon, 29 Apr 2024 21:05:49 +0000 (22:05 +0100)]
Added comments and variables instead of raw reason strings

11 months agoAdd Toru to downstream projects
Matt Joiner [Fri, 3 May 2024 03:30:37 +0000 (13:30 +1000)]
Add Toru to downstream projects

12 months agosteal stability
Mark Holt [Sat, 20 Apr 2024 07:17:09 +0000 (08:17 +0100)]
steal stability

12 months agofile.Flush() (#937)
Alex Sharov [Fri, 26 Apr 2024 06:51:39 +0000 (13:51 +0700)]
file.Flush() (#937)

12 months agoMerge pull request #936 from anacrolix/ci_up
Alex Sharov [Thu, 25 Apr 2024 07:23:58 +0000 (14:23 +0700)]
Merge pull request #936 from anacrolix/ci_up

CI: upgrade `actions/checkout`

12 months agoMerge pull request #935 from anacrolix/dependabot/go_modules/tests/issue-930/golang...
Alex Sharov [Thu, 25 Apr 2024 06:03:20 +0000 (13:03 +0700)]
Merge pull request #935 from anacrolix/dependabot/go_modules/tests/issue-930/golang.org/x/net-0.23.0

Bump golang.org/x/net from 0.10.0 to 0.23.0 in /tests/issue-930

12 months agosave
alex.sharov [Thu, 25 Apr 2024 05:56:29 +0000 (12:56 +0700)]
save

12 months agoOptimize memory usage by avoiding intermediate buffer in message serialization (...
Luo Zhengjie [Thu, 25 Apr 2024 05:19:54 +0000 (13:19 +0800)]
Optimize memory usage by avoiding intermediate buffer in message serialization (#928)

* Optimize memory usage by avoiding intermediate buffer in message serialization

This commit replaces the use of an intermediate buffer in the message serialization process with a direct write-to-buffer approach. The original implementation used MustMarshalBinary() which involved an extra memory copy to an intermediate buffer before writing to the final writeBuffer, leading to high memory consumption for large messages. The new WriteTo function writes message data directly to the writeBuffer, significantly reducing memory overhead and CPU time spent on garbage collection.

* add benchmark for write

* benchmark for 1M/4M/8M

* Tidy up new benchmarks

* Maintain older payload write implementation

---------

Co-authored-by: luozhengjie.lzj <luozhengjie.lzj@alibaba-inc.com>
Co-authored-by: Matt Joiner <anacrolix@gmail.com>
12 months agoPull zig cross compile fixes for go-llsqlite/crawshaw
Matt Joiner [Thu, 25 Apr 2024 03:54:37 +0000 (13:54 +1000)]
Pull zig cross compile fixes for go-llsqlite/crawshaw

12 months agoBump golang.org/x/net from 0.10.0 to 0.23.0 in /tests/issue-930
dependabot[bot] [Thu, 25 Apr 2024 03:52:23 +0000 (03:52 +0000)]
Bump golang.org/x/net from 0.10.0 to 0.23.0 in /tests/issue-930

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.23.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
12 months agoAdd envpprof to issue-930 test
Matt Joiner [Sat, 20 Apr 2024 00:56:59 +0000 (10:56 +1000)]
Add envpprof to issue-930 test

12 months agoAdd issue-930 demo
Matt Joiner [Fri, 19 Apr 2024 23:58:11 +0000 (09:58 +1000)]
Add issue-930 demo

12 months agoMerge pull request #933 from erigontech/body_close_simplify
Alex Sharov [Wed, 24 Apr 2024 09:12:43 +0000 (16:12 +0700)]
Merge pull request #933 from erigontech/body_close_simplify

Webseed Client - Close body in same go routine as request

12 months agoclose body in same go routine as request
Mark Holt [Sun, 21 Apr 2024 10:49:49 +0000 (11:49 +0100)]
close body in same go routine as request

12 months agoRemove unused pendingRequests
Matt Joiner [Fri, 19 Apr 2024 23:32:52 +0000 (09:32 +1000)]
Remove unused pendingRequests

Includes a large global allocation that we don't need.

https://github.com/anacrolix/torrent/issues/930#issuecomment-2066055987

12 months agoAdd Mangayomi to downstream projects
Matt Joiner [Fri, 19 Apr 2024 23:25:12 +0000 (09:25 +1000)]
Add Mangayomi to downstream projects

https://github.com/anacrolix/torrent/issues/929#issuecomment-2067389032

12 months agoBump golang.org/x/net from 0.10.0 to 0.23.0 (#931)
dependabot[bot] [Fri, 19 Apr 2024 23:10:04 +0000 (09:10 +1000)]
Bump golang.org/x/net from 0.10.0 to 0.23.0 (#931)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.23.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>
12 months agoremove code repetition (#926)
Marco Vidonis [Thu, 4 Apr 2024 01:29:22 +0000 (02:29 +0100)]
remove code repetition (#926)

12 months agoSome fixes to tests/issue-798 main
Matt Joiner [Tue, 2 Apr 2024 07:22:05 +0000 (18:22 +1100)]
Some fixes to tests/issue-798 main

12 months agoDon't starve unverified bytes limit on unrequestable pieces
Matt Joiner [Tue, 2 Apr 2024 07:30:19 +0000 (18:30 +1100)]
Don't starve unverified bytes limit on unrequestable pieces

Solves issue described at https://github.com/anacrolix/torrent/discussions/916#discussioncomment-8970828.

12 months agoDon't starve unverified bytes limit on unrequestable pieces
Matt Joiner [Tue, 2 Apr 2024 07:21:22 +0000 (18:21 +1100)]
Don't starve unverified bytes limit on unrequestable pieces

12 months agoupdates test
Aritra Basu [Thu, 28 Mar 2024 09:27:33 +0000 (14:57 +0530)]
updates test

12 months agoAdd TestWebseedPartialSeed
Matt Joiner [Fri, 22 Mar 2024 04:27:30 +0000 (15:27 +1100)]
Add TestWebseedPartialSeed

12 months agoUse Option with request piece states cache
Matt Joiner [Tue, 2 Apr 2024 03:02:48 +0000 (14:02 +1100)]
Use Option with request piece states cache

12 months agoTidy up GetRequestablePieces variables
Matt Joiner [Tue, 2 Apr 2024 02:06:10 +0000 (13:06 +1100)]
Tidy up GetRequestablePieces variables

13 months agoSupport ICE servers auth (#920)
Marco Vidonis [Tue, 26 Mar 2024 09:42:08 +0000 (09:42 +0000)]
Support ICE servers auth (#920)

* change ICEServers type in config to Pion-defined type
This allows specifying credentials for access to servers,
in particular TURN servers.

* add legacy support for ICEServers as []string

13 months agoFix data race setting v2 piece hash
Matt Joiner [Mon, 25 Mar 2024 02:35:53 +0000 (13:35 +1100)]
Fix data race setting v2 piece hash

13 months agoSupport v2 hashes on files that don't have piece layers
Matt Joiner [Mon, 25 Mar 2024 02:35:35 +0000 (13:35 +1100)]
Support v2 hashes on files that don't have piece layers

13 months agocmd/torrent2: Add merkle subcommand
Matt Joiner [Mon, 25 Mar 2024 02:33:15 +0000 (13:33 +1100)]
cmd/torrent2: Add merkle subcommand

13 months agocmd/torrent metainfo magnet: Support v2 torrents
Matt Joiner [Mon, 25 Mar 2024 02:32:46 +0000 (13:32 +1100)]
cmd/torrent metainfo magnet: Support v2 torrents

13 months agoPad v1 piece hashes for v2 files
Matt Joiner [Sun, 24 Mar 2024 10:55:30 +0000 (21:55 +1100)]
Pad v1 piece hashes for v2 files

13 months agoAdd Jipok/torrent-webdav to README
Matt Joiner [Sun, 24 Mar 2024 00:02:16 +0000 (11:02 +1100)]
Add Jipok/torrent-webdav to README

Fixes https://github.com/anacrolix/torrent/issues/917.

13 months agoTorrent.AddPieceLayers: Fix data race
Matt Joiner [Fri, 22 Mar 2024 04:22:56 +0000 (15:22 +1100)]
Torrent.AddPieceLayers: Fix data race

13 months agoFix deadlocking panic when checking for v2 upgrade when receiving handshake
Matt Joiner [Fri, 22 Mar 2024 04:22:30 +0000 (15:22 +1100)]
Fix deadlocking panic when checking for v2 upgrade when receiving handshake

13 months agoSome logging improvements
Matt Joiner [Thu, 21 Mar 2024 23:51:35 +0000 (10:51 +1100)]
Some logging improvements

13 months agoSeparate some long lines
Matt Joiner [Thu, 21 Mar 2024 23:41:22 +0000 (10:41 +1100)]
Separate some long lines

13 months agoDocument use of the ExtensionBitV2Upgrade reserved bit
Matt Joiner [Thu, 21 Mar 2024 21:15:37 +0000 (08:15 +1100)]
Document use of the ExtensionBitV2Upgrade reserved bit

13 months agoUpdate PiecePriority
Matt Joiner [Thu, 21 Mar 2024 21:15:10 +0000 (08:15 +1100)]
Update PiecePriority

13 months agoImprove some internal piece priority naming
Matt Joiner [Wed, 20 Mar 2024 03:39:06 +0000 (14:39 +1100)]
Improve some internal piece priority naming

13 months agoExport PiecePriority
Matt Joiner [Wed, 20 Mar 2024 03:37:48 +0000 (14:37 +1100)]
Export PiecePriority

It's used in some public methods already anyway, so it was a mistake.

13 months agoFix downloading occurring without piece priority
Matt Joiner [Wed, 20 Mar 2024 03:26:34 +0000 (14:26 +1100)]
Fix downloading occurring without piece priority

13 months agoUpdate piece completion after setting v2 hash
Matt Joiner [Wed, 20 Mar 2024 03:03:33 +0000 (14:03 +1100)]
Update piece completion after setting v2 hash

13 months agoVerify piece layers while adding
Matt Joiner [Wed, 20 Mar 2024 03:03:22 +0000 (14:03 +1100)]
Verify piece layers while adding

13 months agoInclude piece layers in dynamically generated metainfo
Matt Joiner [Wed, 20 Mar 2024 03:02:41 +0000 (14:02 +1100)]
Include piece layers in dynamically generated metainfo