Commit Graph

1600 Commits

Author SHA1 Message Date
Matt Joiner 2c6b842bbf Remove noisy log message 2017-11-05 15:39:36 +11:00
Matt Joiner fce1fe1661 bencode: Implement unbuffered scanner used by NewDecoder
Minimizes unused reads into the input Reader stream
2017-11-05 15:39:36 +11:00
Matt Joiner be33fc4476 Kick connections requesting pieces we don't have
This was removed at some point, and made the requests received for missing pieces expvar unused.
2017-11-05 15:39:36 +11:00
Matt Joiner 361c8654c7 Add some TODOs 2017-11-05 15:39:35 +11:00
Samuel 3e74396c66 Aggressive Upload (#203)
* Aggressive Upload Config

* Aggressive Upload

* Flip config option.

* Flip Aggressive Upload Config Option
2017-11-05 14:04:33 +11:00
Matt Joiner f12058fc74 Add missing whitespace 2017-11-04 17:08:02 +11:00
Matt Joiner 9bf50493c3 mse: Move sliceIter into test file 2017-11-04 17:07:42 +11:00
Matt Joiner dd1bc6b837 Improve comment on Config.UploadRateLimiter 2017-11-04 17:07:18 +11:00
Matt Joiner 426c6fec65 Improve upload rate limit burst size panic message
Should help with #202.
2017-11-04 16:58:38 +11:00
Matt Joiner 53ee52e26a Fix copypasta PR ಠ_ಠ 2017-10-29 12:49:58 +11:00
Matt Joiner 13268e3765
Merge pull request #201 from dz0ny/fix/http_client
Provide trackers specific http client
2017-10-29 12:38:31 +11:00
dz0ny caa58d0f69 Provide trackers specific http client
Mainly follows https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779
but also disables HTTPS certificate verification.
2017-10-28 16:30:10 +02:00
Matt Joiner 911423307d Add a test for bdecoding consecutive dicts 2017-10-26 14:26:27 +11:00
Matt Joiner c6bb0fc3e4 Merge pull request #198 from BruceWangNo1/patch-1
Update "Other public projects using torrent" section on README.md
2017-10-22 14:41:19 +11:00
Bruce Wang 1e2256ea02 Update "Other public projects using torrent" section on README.md
I having been using your project for downloading torrent on my server for a couple of weeks now and it works very well. Thanks for your contribution! I used to use a simple HTTP file server to retrieve the downloaded files to my computer. As I used this cumbersome approach heavily on a daily basis, I began to implement a tool to download torrent efficiently just by running a local command with the magnet link which sends torrent download request to the server. You may find my current working prototype sloppy but please check out my project.
2017-10-21 07:10:29 -05:00
Matt Joiner 2ab850f56e cmd/torrent-metainfo-pprint: Include metainfo's url-list in output
Helps with testing #197.
2017-10-14 16:41:14 +11:00
Matt Joiner 5d133ea387 Remove debug log message 2017-10-12 17:52:26 +11:00
Matt Joiner 4f04d13532 Fix fs test link now that Debian 9.2 came out 2017-10-12 17:52:15 +11:00
Matt Joiner 7e857c875e If closing a connection Conn fails we can't do anything, and there's nothing to say 2017-10-12 17:51:47 +11:00
Matt Joiner 39165ade83 Add apt-get update to CI 2017-10-12 16:32:11 +11:00
Matt Joiner dd083a4e11 Track completion known to implementation state
Addresses #193
2017-10-12 16:09:32 +11:00
Matt Joiner 083d2120f3 Avoid race condition in test 2017-10-12 16:06:14 +11:00
Matt Joiner 17ea4f7fdd Performance optimizations to calculating bytes left in Torrent
Was generating significant overhead in cmd/torrent
2017-09-23 15:28:13 +10:00
Matt Joiner 018afed5a7 storage: Remove incorrect comment 2017-09-23 15:27:26 +10:00
Matt Joiner 2c91d1e3fb Changes to Bitmap referencing 2017-09-23 15:27:10 +10:00
Matt Joiner 6aad8041ab Implement new request strategy
The new strategy, 2, has the fastest connection download by priority in order, and all other pieces stick to a randomized ordering that's stable per connection.
2017-09-23 15:25:47 +10:00
Matt Joiner 25d1f371c3 fs: Some test tidying 2017-09-22 13:46:00 +10:00
Matt Joiner 1f6a7eb810 It looks like Torrent.worstBadConn was returning an arbitrary bad connection, it wasn't the worst
heap.Init got lost somewhere along the way? Need a unit test for this.
2017-09-21 19:32:03 +10:00
Matt Joiner 326f60b319 Reduce system call overhead reading from connections 2017-09-21 19:29:56 +10:00
Matt Joiner 3879364536 fs/test.sh: umount requires sudo 2017-09-18 13:51:05 +10:00
Matt Joiner 67e96686d2 Also post cancels
Should mean that we don't have to wait for the peer requests low water mark before we process chunks to cancel.
2017-09-18 13:47:49 +10:00
Matt Joiner 3ed8274384 Abstract out making a cancel message 2017-09-18 13:42:42 +10:00
Matt Joiner 9e6cdff175 storage: Don't add empty mmaps to the mmap span 2017-09-18 13:41:19 +10:00
Matt Joiner 0790516440 Only run connection.Close once
Avoids unnecessary error messages for net.Conn.Close
2017-09-18 13:40:36 +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
Matt Joiner c93f5d3038 test.sh: Unmount and wait for torrentfs to return after completion 2017-09-18 12:17:28 +10:00
Matt Joiner c85aac6383 Log errors closing connection net.Conn's 2017-09-18 12:16:59 +10:00
Matt Joiner 639c49f1ae Rename fs/unwedge-tests so it gets synced to test servers 2017-09-18 12:16:05 +10:00
Matt Joiner cfa54ead7c Use badStorage for TestPeerInvalidHave 2017-09-18 12:15:14 +10:00
Matt Joiner 07679c3895 Remove test temporary directories when finished
They're all grouped together in a parent directory that gets removed. Testing with mmap storage can generate very large files on bad filesystems.
2017-09-18 12:14:16 +10:00
Matt Joiner bb53c97d38 Move uploading to the connection writer 2017-09-18 12:09:08 +10:00
Matt Joiner ed0fa62340 Comment and formatting 2017-09-17 00:45:12 +10:00
Matt Joiner 69ffb9bc8d Fix build error 2017-09-17 00:44:09 +10:00
Matt Joiner 846da66103 Merge pull request #188 from boramalper/KnownSwarm
added the initial version of the (t *Torrent) KnownSwarm() function
2017-09-17 00:20:00 +10:00
Bora M. Alper a66b0e83f3 added support for half-open peers in KnownSwarm() function 2017-09-16 11:48:16 +01:00
Matt Joiner b3137b1ede Make type piece public 2017-09-15 19:35:16 +10:00
Matt Joiner f7e07237ed fs: Fix tests now that data verification isn't automatic 2017-09-15 19:34:42 +10:00
Matt Joiner 2aa20b3e22 Don't verify data at startup, add Torrent.Piece.VerifyData and Torrent.VerifyData for this purpose
This has the side effect of deflaking a lot of tests that race to verify data when a torrent is added.
2017-09-15 19:22:32 +10:00
Matt Joiner b39df82fbc Include peer data with half open connections 2017-09-15 19:10:09 +10:00
Matt Joiner 846ac2d33e Herp 2017-09-15 12:56:54 +10:00