Matt Joiner
e417c19a74
Add "no name" handling and storage.NewFileOpts
...
This came out of testing against Transmission in https://github.com/anacrolix/torrent/discussions/556#discussioncomment-1263670 .
2021-09-02 10:22:32 +10:00
Matt Joiner
c3c982b621
Fixes for wasm
2021-06-23 17:24:50 +10:00
Matt Joiner
5f8471e21b
Rework storage.TorrentImpl to support shared capacity key
2021-06-07 13:01:39 +10:00
Matt Joiner
89235e180f
Sanitize metainfo file paths for file-based storage
...
Fixes exploit where specially crafted infos can cause the client to write files to arbitrary locations on local storage when using file-based storages like mmap and file.
2020-10-15 15:45:08 +11:00
Matt Joiner
7fec6785bf
Abstract out segments mapping and use it in mmap storage
2020-05-31 21:00:19 +10:00
Matt Joiner
c855c7a366
Differentiate between storage.ClientImpl{,Closer}
2020-02-21 14:12:44 +11:00
Matt Joiner
e3420e0b60
Don't close shared client piece completion in mmap storage
...
Fixes #335 .
2019-10-11 17:37:22 +11:00
Matt Joiner
cecd83f966
Don't ignore error getting mmap piece completion
2019-10-11 17:36:46 +11:00
Matt Joiner
cb1bf0f413
goimports -local
2019-08-21 20:58:40 +10:00
Matt Joiner
fc4fab91f5
Switch to goimports import sorting
...
Used to use sortimports, but it's old, and goimports seems to have an opinion now.
2018-11-02 23:12:01 +11:00
Matt Joiner
6441e98f62
Implement go vet recommendations
2018-02-02 19:28:09 +11:00
Matt Joiner
57fec52371
mmap_span: Synchronize access to memory maps to avoid race when unmapping
2018-01-06 16:39:52 +11:00
Matt Joiner
6bcf2a58b2
storage: Rename mmapStorage->mmapClientImpl
2018-01-06 16:38:41 +11:00
Matt Joiner
520da249a1
Test that mmap size doesn't exceed system memory address width
...
Should fix http://paste.ubuntu.com/26074620/
2017-12-02 10:26:09 +11:00
Matt Joiner
dd083a4e11
Track completion known to implementation state
...
Addresses #193
2017-10-12 16:09:32 +11:00
Matt Joiner
9e6cdff175
storage: Don't add empty mmaps to the mmap span
2017-09-18 13:41:19 +10:00
Matt Joiner
19adb2cac3
Improve mmap storage error messages
...
Trying to map unusual Info's gave unhelpful messages.
2017-09-18 12:19:34 +10:00
mlmhl
edcb9deb95
bug fix: initial infoHash for mmapStoragePiece
2017-07-10 19:33:39 +08:00
mlmhl
d8c7f37d2b
make pieceCompletion configurable
2017-05-22 10:23:37 +08:00
Matt Joiner
5c5a26afed
Add bolt piece completion DB
...
This means it can be persistent without needing cgo. Fixes issues #115 and #124 .
2016-10-25 19:07:26 +11:00
Matt Joiner
1e919dd6b1
Rework storage interfaces to make them simpler to implement
...
This allows lots of behaviour to be baked into the new Client, Torrent and Piece wrappers, rather than duplicating (badly) them in all the backend implementations.
2016-09-02 15:10:57 +10:00
Matt Joiner
2a1cef7c9e
Remove the InfoEx type, and don't generate its infohash on the fly
...
Fixes #106 .
2016-08-26 20:29:05 +10:00
Matt Joiner
a1ba463750
Fix issue #97
2016-07-12 16:45:22 +10:00
Matt Joiner
11a53fa732
Fix issue #95 : Closing torrent storage also closed client storage for some storage types
2016-07-09 00:36:32 +10:00
Matt Joiner
cd1c1a9fed
mmap storage: Close pieceCompletion on Close
2016-07-06 14:02:15 +10:00
Matt Joiner
d80d0db9d5
storage: Also use completion DB in mmap implementation
2016-06-20 18:20:59 +10:00
Matt Joiner
b75e85d187
storage.MMapTorrent should not be exported
2016-06-20 16:11:43 +10:00
Matt Joiner
02ea8b1081
Rename storage.I->Client
2016-05-16 21:50:43 +10:00
Seth Hoenig
9f4bf70e17
refactor struct identifiers to follow conventional go names
2016-04-18 23:11:11 -05:00
Matt Joiner
b80bb6393a
Use metainfo.Hash for piece and info hashes
2016-04-04 13:01:31 +10:00
Matt Joiner
a5b54f21a1
Make opening a torrent in storage an explicit method
...
This is storage types where opening can fail, like mmap
2016-03-28 22:40:29 +11:00
Matt Joiner
775cf53809
Get mmap storage working
2016-03-28 21:57:04 +11:00