Commit Graph

3438 Commits

Author SHA1 Message Date
Matt Joiner c17018d04e
Add tracing to webtorrent webrtc resources 2022-07-12 16:15:49 +10:00
Matt Joiner 43b2d3ee21
cmd/torrent serve: Support multiple file paths 2022-07-12 16:12:02 +10:00
Matt Joiner 240b42fd56
cmd/torrent create: Add piece length and private options 2022-07-12 16:12:02 +10:00
Matt Joiner fe4c930bf5
Restore torrent metainfo pprint 2022-07-12 16:12:02 +10:00
Matt Joiner 0bf75b8fa8
Move cmd/torrent-create into torrent create 2022-07-12 16:12:01 +10:00
Matt Joiner a87f321f37
Update anacrolix/bargle 2022-07-12 16:00:52 +10:00
Matt Joiner 2c5f9c41df
Update bargle use 2022-07-12 16:00:52 +10:00
Matt Joiner 5c2f1ed307
Track latest bargle 2022-07-12 16:00:51 +10:00
Matt Joiner a5877a938c
Fix webrtcNetAddr.String for IPv6
(cherry picked from commit d37354e6743e905d42689e88068058dd45e5be43)
2022-07-12 15:54:36 +10:00
Matt Joiner 214fe6b93c
Use webrtc local addr for webrtc conn peer priority
WebRTC conns are providing the correct IP for peer priority calculations, so use that instead of trying to guess (which doesn't work if there are no regular conn listeners attached to the Client.

(cherry picked from commit e86bb5fee3958dc90a3d012469b1352005d6c9ad)
2022-07-12 15:52:03 +10:00
Matt Joiner aedf2583cc
Remove relevant webtorrent offers when closing Torrent
(cherry picked from commit 73a0b5e4d2fe679aac31d87171537c70f91f46ee)
2022-07-12 15:49:58 +10:00
Craig Campbell f120b93e1c
Add ability to set DialContext/ListenPacket for tracker announcements (#760)
This is useful if you want to use a custom dialer to proxy requests via
an external server since the HTTPProxy can only be used with tcp
trackers and not udp.
2022-07-07 15:51:58 +10:00
Alex Sharov 75cc4e98d4
Do torrent storage flush on piece completion (#755) 2022-07-07 15:46:27 +10:00
Matt Joiner b58aec9ca8
go get -u ./... && go mod tidy 2022-07-03 21:56:42 +10:00
Matt Joiner ae2e4bf7e7
Use metainfo.ChoosePieceLength from more locations 2022-07-03 21:47:16 +10:00
Matt Joiner 12279621e4
Check that incoming peer request chunk lengths don't exceed the upload rate limiter burst size
Should fix #759.
2022-06-25 23:16:58 +10:00
Matt Joiner ae4eb8569b
Add exatorrent and finish tidying downstream projects 2022-06-25 17:28:23 +10:00
Marco Vidonis 8f711b633f
optimise torrent piece length (#758) 2022-06-23 22:44:06 +10:00
Matt Joiner 05cd58de85
Add Client.PublicIPs 2022-06-22 23:59:18 +10:00
Matt Joiner b232729e0c
Fix typo 2022-06-22 14:19:26 +10:00
FIGBERT fcfc5bb923
Update tidwall/btree (0.7.2 -> 1.3.1) (#757) 2022-06-22 14:16:20 +10:00
Matt Joiner 32cdaf4ada
Update anacrolix/generics 2022-06-21 08:51:33 +10:00
Matt Joiner 58200a304c
Update downstream projects 2022-06-21 08:34:38 +10:00
Matt Joiner 585e062804
torrent serve: Add some reasonable tracker defaults 2022-06-15 14:23:18 +10:00
Matt Joiner f527180873
Bump up the local client reqq
This seems to boost upload speeds to Transmission to 16MB/s. It may require a corresponding amount of buffering in memory, that could require work later.
2022-06-15 14:22:17 +10:00
Matt Joiner 3c54eadf28
torrent serve: Print magnet link 2022-06-14 18:23:00 +10:00
Matt Joiner 0158a830f5
Add comments for #752 and #753 2022-06-14 16:02:43 +10:00
Matt Joiner 1a3508bcbd
Update github.com/frankban/quicktest 2022-06-14 16:02:03 +10:00
Matt Joiner 54665f160a
Rework peer connection writer to keep individual writes smaller
This fixes an issue with WebRTC when the write buffers get too big.
2022-06-14 16:01:47 +10:00
Matt Joiner caf35cd9b8
internal/testutil.Info: Support multi-file Torrents 2022-06-14 16:01:47 +10:00
Matt Joiner 65896d4cec
ExportStatusWriter: take testing.TB instead of *testing.T 2022-06-14 16:01:47 +10:00
Alex Sharov 061407fbc4
github.com/edsrzf/mmap-go v1.1.0 2022-06-14 15:57:08 +10:00
Matt Joiner 8ccacbfd17
Revert "Switch requestState to be a slice"
This reverts commit 9eb80abc29.

Via email I received a report of excessive memory use: Memory use with a slice is proportional to the total size of all torrents loaded into the Client, which can be very large.
2022-06-01 18:24:50 +10:00
Matt Joiner f21aeed90e
Demote webrtc conn error logging level to debug
Fixes #716.
2022-06-01 18:18:37 +10:00
Nathanael Demacon ed1fe91dd2
Implement a public `Peer.DownloadRate` (#750) 2022-05-23 10:42:51 +10:00
Matt Joiner eeb021b134
Use Option for cached Torrent length
Fixes https://github.com/anacrolix/torrent/issues/630.
2022-05-12 13:47:12 +10:00
Matt Joiner 9434fe58a2
Set debug log level for outgoing connection error
Contributed by @tsynik in https://github.com/anacrolix/torrent/issues/702#issuecomment-1010523079.
2022-05-12 13:33:57 +10:00
Matt Joiner 39bd8fc5a0
Use reusable roaring iterators 2022-05-12 10:42:16 +10:00
Matt Joiner 0235dd3801
Add fallback piece ordering for non-readahead priorities 2022-05-12 10:37:50 +10:00
Matt Joiner 9f9b02e3dd
cmd/torrent: Respect default client max unverified bytes 2022-05-12 10:37:36 +10:00
Matt Joiner 669c69faac
Disable update requests timer 2022-05-12 10:37:36 +10:00
Matt Joiner 590d1ac265
Make piece states a slice and reuse it and request indexes between runs 2022-05-12 10:37:36 +10:00
Matt Joiner 4eb6a49f27
Use intermediate t in Peer.getDesiredRequestState 2022-05-12 10:37:36 +10:00
Matt Joiner 9eb80abc29
Switch requestState to be a slice 2022-05-12 10:34:28 +10:00
Matt Joiner f235c8ea51
Reuse piece order state for request ordering 2022-05-12 10:34:28 +10:00
Matt Joiner 88a867ef9c
Default 64 MiB max unverified bytes 2022-05-12 10:34:28 +10:00
Matt Joiner eb7811f909
Cache chunksPerRegularPiece 2022-05-12 10:34:26 +10:00
Matt Joiner 7d4f64ce3c
Combine pending and last requested 2022-05-11 11:33:11 +10:00
Matt Joiner 5fe7007d34
Update ajwerner/btree 2022-05-09 12:53:47 +10:00
Matt Joiner 660d73eb9c
cmd/torrent: Improve context error handling 2022-05-09 12:51:02 +10:00