Commit graph

1179 commits

Author SHA1 Message Date
Jimmy Zelinskie
520a357e37 tracker: remove last "bad request"
A peer can join a swarm immediately as completed if they already have
the file before they ever announce. If we don't have them in our
leechers, we were previously failing to add them as a seeder.
2015-06-27 00:09:57 -04:00
Jimmy Zelinskie
8df5f8e193 docs: update primary branch to be master 2015-06-26 23:00:25 -04:00
Justin Li
ce5ee8b365 Merge pull request #69 from chihaya/rmbadreq
tracker: rm badrequest when state is unknown
2015-06-26 22:52:22 -04:00
Jimmy Zelinskie
744313d253 tracker: rm badrequest when state is unknown
This assumption was just totally wrong. If there is any kind of packet
loss or the tracker starts up to a pre-existing swarm, all the peers
will get bad request responses.
2015-06-26 22:49:09 -04:00
Justin Li
2f7943883f Merge pull request #68 from chihaya/udplogs
logging: add error to udp logs
2015-06-26 22:21:22 -04:00
Jimmy Zelinskie
0741df3575 logging: add error to udp logs
This also makes the format of UDP and HTTP logs a little more similar.
2015-06-26 21:07:29 -04:00
Jimmy Zelinskie
9a0d86610c Merge pull request #67 from chihaya/pprof-handler
Add pprof debug HTTP endpoint
2015-06-26 18:42:20 -04:00
Justin Li
0323a5b8cf Add pprof debug HTTP endpoint 2015-06-26 14:05:55 -04:00
Jimmy Zelinskie
61f483c2f3 Merge pull request #66 from chihaya/kill-godeps
Remove godep sources from the repository
2015-06-20 20:11:36 -04:00
Justin Li
da33c3d585 Use godep restore to set up dependencies 2015-06-18 20:16:24 -04:00
Justin Li
316cb7ce5a Remove godep sources from the repository 2015-06-18 20:11:44 -04:00
Justin Li
8502867d94 Merge pull request #64 from chihaya/fix-blank-query-param-panic
Fix panic occurring when blank query params are present
2015-06-18 18:00:40 -04:00
Justin Li
203e4e6020 Fix query parsing when blank values are present 2015-06-18 10:34:52 -04:00
Justin Li
242ba22f8c Add failing test that reproduces #63 2015-06-18 10:19:54 -04:00
Justin Li
a17474bb05 Merge branch 'udp' into develop 2015-06-17 19:39:51 -04:00
Jimmy Zelinskie
2fcd34360f udp: basic announce test 2015-05-11 00:57:54 -04:00
Justin Li
de18172952 Update graceful import path 2015-04-28 20:32:19 -04:00
Justin Li
ae62188711 Disable graceful signal handling 2015-04-28 20:27:39 -04:00
Jimmy Zelinskie
ff5339ceb3 godeps: refresh to get latest changes in graceful 2015-04-22 22:54:46 -04:00
Jimmy Zelinskie
7f2abdae4e udp: make handleOptionalParameters less misleading 2015-04-06 19:15:07 -04:00
Jimmy Zelinskie
cf3806cb9b udp: handleOptionalParameters method added
This also addresses an issue where the goroutine was not breaking out of
the loop parsing the options, instead it was only breaking out of the
switch statement.
2015-04-06 19:06:06 -04:00
Jimmy Zelinskie
d317dfc069 udp: implement BEP45 response 2015-04-04 15:42:33 -04:00
Jimmy Zelinskie
938542ac74 models: Announce field for AnnounceResponse 2015-04-04 15:42:28 -04:00
Jimmy Zelinskie
222415f467 udp: Implement draft of BEP45; Endpoint type added
Because of the requirement of storing multiple ports, Announce.Port has
been abolished and Announce.IPv4/IPv6 have been replaced with the
Endpoint type. HTTP has been updated to support this model. UDP has been
updated to support the latest draft of BEP45 and most of the
optional-types described in BEP41.
2015-03-29 03:03:19 -04:00
Jimmy Zelinskie
f25464a02b Merge branch 'master' into udp 2015-03-27 22:05:48 -04:00
Jimmy Zelinskie
b93cc26b98 models: properly format port into peerkey string 2015-03-26 22:11:13 -04:00
Justin Li
f3b264dd53 docs: Fix link to configuration.md 2015-03-24 00:41:52 -04:00
Justin Li
eefbe64da6 docs: Break out config docs into a separate file 2015-03-24 00:38:20 -04:00
Justin Li
6490c8f51d docs: Add create_on_announce to list of config keys 2015-03-24 00:32:59 -04:00
Justin Li
f083bb8477 docs: Start reformatting config documentation 2015-03-24 00:29:32 -04:00
Jimmy Zelinskie
1bf788a99b tracker: fix reference to config 2015-03-23 20:43:33 -04:00
Jimmy Zelinskie
80c068c97a config: add create_on_announce option
This option allows the user to specify whether or not to create a new
swarm for torrents that do not previously exist within the tracker's
storage.
2015-03-23 20:02:13 -04:00
Jimmy Zelinskie
0ecd126ae8 lint: Http -> HTTP 2015-03-23 19:57:45 -04:00
Justin Li
a78fac6d7f Merge pull request #61 from chihaya/peerkey
Add Port to PeerKey
2015-03-22 21:10:12 -04:00
Jimmy Zelinskie
6188d52de0 models: Port method for PeerKey
This also adds some more docs for related stuff in the models package.
2015-03-22 19:41:57 -04:00
Jimmy Zelinskie
92866cfacd models: include port in peerkey 2015-03-22 18:44:09 -04:00
Jimmy Zelinskie
1deca5fd5e readme: add godoc, docker badges
[ci skip]
2015-03-22 18:42:21 -04:00
Jimmy Zelinskie
c1a4a6ecbb dockerfile: initial 2015-03-19 23:39:31 -04:00
Justin Li
da46ef8c8a tracker: Return announcing peer if there are no others to avoid an empty peers field 2015-02-28 00:56:45 -05:00
Jimmy Zelinskie
ac2fcade1e tracker: record announce/scrape stats in handlers
This deduplicates code tracking the stats code tracking announces and
scrapes for each protocol. The down side is that it isn't aware of any
failures writing responses, but it was already being called before the
write to a response for HTTP.
2015-02-26 09:03:52 -05:00
Jimmy Zelinskie
9b4999c0cf stats/udp: nop on nil DefaultStats 2015-02-25 21:56:58 -05:00
Jimmy Zelinskie
5af37be85c udp: fix renaming ipbuf->ipbytes 2015-02-25 21:56:37 -05:00
Jimmy Zelinskie
8deef98874 udp: style nitpicks 2015-02-25 21:47:01 -05:00
Justin Li
14a6278de0 udp: Use net.IP inputs for connection ID generation
Add enum for action IDs

Remove unnecessary length check
2015-02-23 21:30:45 -05:00
Justin Li
3d28f281fb udp: Add constructor for ConnectionIDGenerator, return buffer to pool on socket timeout 2015-02-22 16:58:43 -05:00
Jimmy Zelinskie
2e678ac806 Merge pull request #57 from chihaya/completed-seeder
Remove impossible code for 'completed' event
2015-02-21 16:04:50 -05:00
Justin Li
7512f50731 udp: Add basic UDP tests 2015-02-21 14:35:21 -05:00
Justin Li
105edf21f1 udp: Add channel to communicate when socket has opened, set read timeout to 0 on Stop() 2015-02-21 14:02:00 -05:00
Justin Li
669128c83a tracker: Pass listen address into tracker.Server.Serve() 2015-02-21 13:16:21 -05:00
Justin Li
b6c1b3838b tracker: Remove impossible code for 'completed' event 2015-02-21 13:00:23 -05:00