2
0
mirror of synced 2025-02-24 06:38:14 +00:00

1655 Commits

Author SHA1 Message Date
Matt Joiner
40b96d0e4e Avoid allocating skeys for receiving encrypted handshakes 2017-04-04 18:41:08 +10:00
Matt Joiner
65a7c3daa7 storage: Fix race condition in mapPieceCompletion 2017-03-30 21:38:44 +11:00
Matt Joiner
78a8db10da sortimports 2017-03-19 17:04:32 +11:00
Matt Joiner
9bd463ffc0 storage: Add package doc 2017-03-18 13:03:02 +11:00
Matt Joiner
2f6744c7ac Merge pull request #149 from thechriswalker/torrent-storage-options
fix `Spec.Storage` and allow per-torrent dir
2017-03-17 21:30:28 +11:00
Chris Walker
9d96cd659f fix Spec.Storage and allow per-torrent dir
`TorrentSpec.Storage` was not honored when calling `Client.AddTorrentSpec`
and the configured `cfg.DefaultStorage` was always used. Now if you construct
your `TorrentSpec` you can specify any `StorageImpl`

Also, the most common use case for custom storage being per-torrent paths for
FileStorage, this adds a `pathMaker` function to the File implementation that
allows customization, along with the default (always use base path) and my use
case (which seemed common enough from the Gitter chat) which is infohash based
subdirectories.

All Public methods have not changed signature, but 1 private method did, hence
the test update.
2017-03-16 14:40:21 +00:00
Matt Joiner
ba3e798b5f Fix a logging of metainfo.Hash 2017-02-24 21:56:23 +11:00
Matt Joiner
aa74d992d3 Don’t track the empty string, and ditch Torrent.announceList 2017-02-19 15:57:30 +11:00
Matt Joiner
350dd01ab9 Fix torrent status info hash hex 2017-02-16 20:10:32 +11:00
Matt Joiner
6ca3275752 metainfo: Improve MetaInfo.AnnounceList handling 2017-02-15 20:05:28 +11:00
Matt Joiner
a959bdd0f8 Revert "Quick fix for missing MetaInfo.Announce everywhere with trackers"
This reverts commit b7a8d08bbf046d756e8d80744a188167e28a19de.
2017-02-15 18:40:30 +11:00
Matt Joiner
415fdcb982 Update README.md
Add CircleCI shield
2017-02-14 22:42:21 +11:00
Matt Joiner
b7a8d08bbf Quick fix for missing MetaInfo.Announce everywhere with trackers 2017-02-13 22:28:42 +11:00
Matt Joiner
b868a6b9e2 dht.Server.Announce now takes [20]byte 2017-02-07 15:01:02 +11:00
Matt Joiner
79d800fe92 Trivial logging, comment, Stringer changes 2017-02-02 16:53:19 +11:00
Matt Joiner
1d54b1c6d8 Massively reduce CPU when Readers are blocked on unavailable data 2017-02-01 16:28:16 +11:00
Matt Joiner
c66c4d1744 Change type of metainfo.Info.URLList 2017-01-18 12:10:13 +11:00
Matt Joiner
902e40dd67 TODO 2017-01-18 12:09:51 +11:00
Matt Joiner
a11df82349 package itertools API changed 2017-01-14 20:39:48 +11:00
Matt Joiner
5bd6868cc8 Update README 2017-01-12 21:50:01 +11:00
Matt Joiner
1c37903a74 Remove FileStorePieces storage backend
ResourcePIeces is now preferred.
2017-01-05 17:00:59 +11:00
Matt Joiner
1e033d5f91 sortimports 2017-01-05 17:00:16 +11:00
Matt Joiner
55b6025f80 Log the storage TorrentImpl type 2017-01-04 18:15:49 +11:00
Matt Joiner
5fe36bbb35 Show connection piece request order in text status 2017-01-04 18:09:50 +11:00
Matt Joiner
03227bf461 metainfo: FileInfo.Offset failed with single-file torrents 2017-01-04 18:09:17 +11:00
Matt Joiner
174cc0e183 Reduce the priority given to earlier pieces. Maximum priority reads at the end of the file aren’t getting enough attention. 2017-01-04 18:08:29 +11:00
Matt Joiner
51bae0a3c8 metainfo: Add helper methods to FileInfo 2017-01-04 17:15:11 +11:00
Matt Joiner
984a69c73a Merge pull request #144 from BonkaBonka/fastfail
Abort verify at first hash mismatch.
2017-01-04 14:42:59 +11:00
BonkaBonka
25990f44ee Abort verify at first hash mismatch. 2017-01-03 21:44:19 -05:00
Matt Joiner
9cf09dba8a Remove unused funcs and idents 2017-01-01 11:03:02 +11:00
Matt Joiner
186b5073d2 Move method queuePieceCheck 2017-01-01 11:02:37 +11:00
Matt Joiner
d48c7c8e36 sort imports 2017-01-01 11:01:41 +11:00
Matt Joiner
65295eb513 Panic if NewHashFromHex gets a bad string 2017-01-01 10:08:45 +11:00
Matt Joiner
d8ca4ac92a Rewrite cmd/torrent-verify
Fixes #141
2017-01-01 10:08:45 +11:00
Matt Joiner
c4b1cd35bb Update README.md
Add Trickl android app
2016-12-31 19:17:00 +11:00
Matt Joiner
0973b66b7e Update README.md
Closes #143
2016-12-31 19:07:02 +11:00
Matt Joiner
b68d7cd08e dht/… moved to github.com/anacrolix/dht 2016-12-14 11:43:37 +11:00
Matt Joiner
70dfd099f1 Rename dht/krpc.KRPCError -> Error 2016-12-13 14:50:42 +11:00
Matt Joiner
e80846998c dht: Reply with Method Unknown error to unknown query methods received 2016-12-13 14:45:40 +11:00
Matt Joiner
bb4d344235 Fix race condition in TestPieceHashFailed 2016-12-13 14:44:00 +11:00
Barsanuphe
86c5b20e3f Added optional source flag to torrent files (#137) 2016-12-09 13:16:56 +11:00
Matt Joiner
f510c5cf22 Fix piece failures not clearing dirty chunks
I don’t like how complicated piece completion/hashing management is, but it works.
2016-12-06 16:10:10 +11:00
Matt Joiner
2f9405bd8e Merge commit 'c8dffdb' 2016-12-06 15:43:00 +11:00
Matt Joiner
c8dffdbb11 Add test that dirty chunks are cleared on piece hash failure 2016-12-06 15:41:08 +11:00
Matt Joiner
74be3d58e5 Reader.Close: Don’t set t to nil, we may still expect it
For example in goroutines spawned in ReadContext.
2016-12-05 22:00:26 +11:00
Matt Joiner
75b959099f iplist: Begin adding support for parsing CIDR lists 2016-12-01 15:41:52 +11:00
Matt Joiner
af7a0d3464 Add Torrent.Closed 2016-11-30 18:02:39 +11:00
Matt Joiner
9d35196cca cmd/torrent: Accept infohash: scheme torrents 2016-11-30 18:02:21 +11:00
Matt Joiner
1f2f037209 Fix logging of trust slice 2016-11-30 18:01:39 +11:00
Matt Joiner
97f6cb496e Avoid deadlock caused by receiving PORT and and DHT announce_peer at the same time 2016-11-28 00:03:10 +11:00