2
0
mirror of synced 2025-02-24 14:48:27 +00:00

1231 Commits

Author SHA1 Message Date
Guillaume Douézan-Grard
4d917b059c fix bootstrap from global servers disabling 2016-06-01 03:02:21 +02:00
Matt Joiner
6cac882030 Reduce the impact of preferring earlier pieces
I think urgent pieces at the end of a torrent were getting fairly starved.
2016-05-28 22:04:33 +10:00
Matt Joiner
060ff72175 Improve the logic for which address to use for DHT 2016-05-24 19:46:24 +10:00
Matt Joiner
7a4b491ede Tidy up the listen function 2016-05-24 19:45:42 +10:00
Matt Joiner
000f430105 Add tests for #81 2016-05-24 19:35:23 +10:00
Matt Joiner
0a9db65df1 Merge pull request #81 from lovedboy/master
fix listenedAddr  bug when TCP or UDP bind dynamic port
2016-05-24 19:09:57 +10:00
lovedboy
ca8d9de944 add return when utpsock's err is not nil 2016-05-24 13:24:29 +08:00
lovedboy
0b36de4be9 Merge branch 'master' of https://github.com/lovedboy/torrent 2016-05-24 13:19:55 +08:00
lovedboy
fd1b4dc489 listenedAddr fix when TCP or UDP bind dynamic port 2016-05-24 13:18:04 +08:00
Matt Joiner
b55e67dc22 Ban IPs that contribute to failed piece checks 2016-05-24 02:09:47 +10:00
Matt Joiner
d8dc3ad239 Torrent.MetaInfo: don't crash if info isn't available yet 2016-05-23 20:08:18 +10:00
Matt Joiner
56a89905b6 Update Torrent.wantPeersEvent when info is obtained 2016-05-23 11:11:56 +10:00
Matt Joiner
b0923608bb Handle tracker announce prepare errors 2016-05-23 11:00:49 +10:00
Matt Joiner
c6ec935e53 Update Torrent.wantPeersEvent in several places 2016-05-23 10:19:14 +10:00
Matt Joiner
5051d1dcd0 Add Torrent.AddTrackers 2016-05-23 10:18:58 +10:00
Matt Joiner
abbbb6e115 cmd/torrent-metainfo-pprint: Add Announce and AnnounceList keys 2016-05-23 10:18:39 +10:00
Matt Joiner
c5e0c806ea tracker: Skip any net errors to third party trackers 2016-05-23 09:29:14 +10:00
Matt Joiner
9df9fda397 Drop the lol://cheezburger tracker from the test torrent
Spams the logs too much.
2016-05-22 23:44:38 +10:00
Matt Joiner
512aa7ede4 Don't start tracker scrapers if trackers are disabled 2016-05-22 23:44:08 +10:00
Matt Joiner
7a60873ec8 Don't create an empty tracker URL if both AnnounceList and Announce are empty 2016-05-22 23:43:55 +10:00
Matt Joiner
20870ec4ff Rework torrent tracker scraping
New scrapers are added anytime trackers are added to a torrent. In the future they will also be stopped as soon as they're removed. All trackers are concurrently scraped, the old-style of sticking to one tracker that works is abandoned for now.
2016-05-22 22:45:08 +10:00
Matt Joiner
7f6f921aa9 Comment on tracker.AnnounceRequest.Event 2016-05-22 22:42:37 +10:00
Matt Joiner
2c5eb2ae43 tracker: Allow resolving announce URL host in advance, and passing the desired Host field for HTTP requests
Also did some clean-up of the announce code, the concept of a client is going away.
2016-05-20 00:48:46 +10:00
Matt Joiner
8cdcbe9d40 Fix the tracker method receivers and names 2016-05-19 23:58:00 +10:00
Matt Joiner
7600ac70e3 Move torrent tracker methods into torrent.go 2016-05-19 22:49:37 +10:00
Matt Joiner
73a648fb32 Torrent.writeStatus: Include human readable torrent size 2016-05-19 17:15:10 +10:00
Matt Joiner
a69044b9ea Break out KRPC stuff from dht into new package 2016-05-17 16:40:08 +10:00
Matt Joiner
95bb8a5eb3 dht.Server.query: Return nil Transaction if there's an error 2016-05-17 16:07:49 +10:00
Matt Joiner
2ca76cfea8 dht: Stop processing packet if server closes after unmarshalling 2016-05-17 16:07:03 +10:00
Matt Joiner
88d21ce627 dht: Don't contact nodes with an IP containing a leading octet of 0 2016-05-17 16:06:18 +10:00
Matt Joiner
2483c75f09 Improve dht.Transaction.SetResponseHandler comment 2016-05-17 16:04:33 +10:00
Matt Joiner
cf55055d12 Improve the note about chunk writing concurrency
Everytime I see memory spike I suspect this, and it isn't it.
2016-05-17 02:12:06 +10:00
Matt Joiner
869fb25cbc Changes to missinggo resource package 2016-05-16 22:32:00 +10:00
Matt Joiner
c1e0d37266 Rename some storage funcs 2016-05-16 22:02:03 +10:00
Matt Joiner
02ea8b1081 Rename storage.I->Client 2016-05-16 21:50:43 +10:00
Matt Joiner
9b5d3cac03 Test both resource and file backends to piece storage 2016-05-16 20:11:00 +10:00
Matt Joiner
52e285ea86 Remove unused fields in testDownloadCancelParams 2016-05-16 20:10:33 +10:00
Matt Joiner
6f470a2d02 Don't log missing files during hashing 2016-05-16 19:50:46 +10:00
Matt Joiner
cbac2ecaff Stop returning errors from the 2 callstacks to connectionLoop where errors are expected 2016-05-16 19:50:10 +10:00
Matt Joiner
c0283d3314 Return an error from Torrent.setMetadataSize
This should mean connections sending ridiculous metadata sizes get dropped.
2016-05-16 18:48:56 +10:00
Matt Joiner
d2951c6c4b Move requestPendingMetadata onto connection from Client 2016-05-16 18:46:38 +10:00
Matt Joiner
0231beeac7 iplist/cmd/pack-blocklist use tagflag 2016-05-16 18:45:23 +10:00
Matt Joiner
61e43f4261 Add piece-per-resource storage 2016-05-16 18:44:58 +10:00
Matt Joiner
506ad00fd5 Probably fix test failure
Due to some changes in the Torrent instantiation code, I think there's a race in this test to verify the piece before counting the pending chunks. The torrent isn't supposed to be complete to begin with, so give it a bogus data directory to ensure it.
2016-05-12 12:44:51 +10:00
Matt Joiner
2b46a17b39 Bit of a tidy in the tracker code 2016-05-12 12:43:37 +10:00
Matt Joiner
b714da8184 Torrent.AddPeers can't fail, so don't return an error 2016-05-12 12:26:09 +10:00
Matt Joiner
dcfee93f96 Fix race marshalling a bitfield after a Have has also been posted 2016-05-11 23:50:21 +10:00
Matt Joiner
67dbccff40 Update package doc
In particular, ConfigDir has gone away.
2016-05-11 21:53:42 +10:00
Matt Joiner
528836ab4c Get rid of obsoleted Torrent.ceaseNetworking, and clean up Torrent.closing 2016-05-11 21:44:55 +10:00
Matt Joiner
dce3a7f675 Rework Client listeners
In particular, if the ListenAddr used a dynamic port ":0", and both TCP and uTP were enabled. If the TCP listen succeeded, and the uTP did not, the TCP listener was leaked, and another port number was not tried.
2016-05-11 21:11:52 +10:00