Commit Graph

1612 Commits

Author SHA1 Message Date
Matt Joiner 8712cc25d0 Make Client.PeerID return [20]byte 2017-11-08 19:28:37 +11:00
Matt Joiner b38996ae2a Generalise use of peerExtensionBytes 2017-11-08 19:28:03 +11:00
Matt Joiner 7eb62eec0d Move some code around 2017-11-08 15:00:18 +11:00
Matt Joiner ff1bd84e7e Fix #205 2017-11-08 00:34:59 +11:00
Matt Joiner cecc70f4cc More megacheck 2017-11-08 00:12:34 +11:00
Matt Joiner 9757f04cf8 Apply megacheck to torrent package 2017-11-07 16:11:59 +11:00
Matt Joiner be3f32e962 Fix a lot of noisy logging and test warnings 2017-11-07 16:00:08 +11:00
Matt Joiner 62b1e1b749 Unbiased request ordering was requesting chunks the peer doesn't have 2017-11-06 14:53:00 +11:00
Matt Joiner 82093937d5 Ignore expected error 2017-11-06 14:01:07 +11:00
Matt Joiner e888e6eb85 Add a link to Trickl 2017-11-06 13:42:46 +11:00
Matt Joiner f060f0cb02 Comment on bencode.Decoder.Offset 2017-11-05 15:45:30 +11:00
Matt Joiner edf2495b1f Expose bencode.Decoder.Offset 2017-11-05 15:42:37 +11:00
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