Matt Joiner
8ae88151a8
cmd/torrent-metainfo-pprint: Add -files flag, and expose NumFiles and TotalLength in output
2016-05-03 12:51:31 +10:00
Matt Joiner
1936054615
cmd/torrent-metainfo-pprint: Also print InfoHash
2016-05-02 19:14:49 +10:00
Matt Joiner
2db45b1198
cmd/torrent: Add -addr flag back in
2016-04-19 17:20:14 +10:00
Matt Joiner
2dcbe31304
cmd/torrent: Forget trying to expose the entire Client config struct to the command-line
2016-04-18 21:30:28 +10:00
Matt Joiner
9bebc043ea
cmd/torrent: Remove redundant _ "net/http/pprof" import
...
It's done by envpprof instead
2016-04-18 21:29:37 +10:00
Matt Joiner
fa511154e4
Move Magnet and friends into metainfo package
2016-04-04 13:48:39 +10:00
Matt Joiner
6aacfe5589
Merge pull request #72 from shoenig/magnetize
...
convenience function for creating magnets
2016-04-04 13:20:15 +10:00
Seth Hoenig
890658ef93
convenience function for creating magnets
2016-04-03 10:05:17 -05:00
Matt Joiner
d3a1c79c79
Merge Torrent and torrent types
2016-04-03 18:40:43 +10:00
Matt Joiner
c469d4a837
cmd/torrent-metainfo-pprint: Switch to tagflag for argument parsing
2016-04-03 16:37:17 +10:00
Matt Joiner
0a3a5d6ae0
Finish fixing tests
2016-03-29 00:24:00 +11:00
Matt Joiner
775cf53809
Get mmap storage working
2016-03-28 21:57:04 +11:00
Matt Joiner
b97b50aca9
New storage interface
2016-03-28 20:38:30 +11:00
Matt Joiner
d5f888069f
Ditch Data.WriteSectionTo, and fix cmd/torrent-verify
2016-02-18 11:45:31 +11:00
Matt Joiner
0c28a0f1b1
Use new tracker package interface
2016-02-07 18:49:35 +11:00
Matt Joiner
0e85ff190d
go vet
2016-02-02 00:44:29 +11:00
Matt Joiner
3a206d4f12
util/profile was replaced by github.com/anacrolix/envpprof
2016-01-31 18:35:51 +11:00
Matt Joiner
fe9d5702f6
Fixes for torrent.Reader not having ReadAt
2016-01-18 20:12:51 +11:00
Matt Joiner
153c13db43
Revert "Merge pull request #54 from zhulik/master"
...
This reverts commit 5cf75b869c
, reversing
changes made to 09050ff2c5
.
2016-01-06 12:19:49 +11:00
Gleb Sinyavsky
48c3df2d43
Refactorings
2016-01-05 11:48:16 +03:00
Gleb Sinyavsky
052a899f60
cmd utils fixed
2015-12-27 14:59:07 +03:00
Matt Joiner
812f5af66b
Switch from launchpad.net/gommap to github.com/edsrzf/mmap-go for Windows support
...
Fixes #45 .
2015-12-23 03:50:34 +11:00
Matt Joiner
5aca9d3563
Rewrite cmd/dht-ping
2015-12-08 00:45:42 +11:00
Dmitry Borzov
b42fc90674
Fix name ambiguity for dht-ping, too many things are called pingResponses
2015-12-08 00:13:50 +11:00
Matt Joiner
ff835db955
Actually fix #41 properly; and several big changes
...
bencode:
* Handle omitempty on non-trivial types.
cmd/dht-ping:
* Handle timeouts in ping transactions.
dht:
* Propagate failed transaction responses properly.
* Msg related tests are moved into their own file.
* In some places, IPs in binary form are shorted to 4 bytes if IPv4.
2015-12-07 03:28:28 +11:00
Matt Joiner
5886fa1d6b
cmd/torrent-infohash: Switch to tagflag
2015-11-22 18:49:44 +11:00
Matt Joiner
9230a1b9df
Use uiprogress to display a progress bar per torrent
2015-11-22 18:45:06 +11:00
Matt Joiner
c7f9bfccc1
Ditch go-flags for tagflag
...
Fixes #37
2015-11-05 23:21:39 +11:00
Matt Joiner
f9c600b264
metainfo: Add alternative "builder" API
...
The existing builder API is gross and heavy-handed. I won't rip it out just yet.
2015-10-30 01:21:09 +11:00
Matt Joiner
ea0ccf6a23
Tidy
2015-10-23 12:42:57 +11:00
Matt Joiner
b8da06a885
cmd/torrent: Expose --mmap
2015-10-23 12:42:19 +11:00
Matt Joiner
99a0813d88
dht: Make Msg a struct with bencode tags
2015-10-23 12:41:45 +11:00
Matt Joiner
abdf1f049f
dht: Support IPv6 compact peers
2015-08-06 09:01:38 +10:00
Matt Joiner
4fb7d8f4d4
cmd/dht-secure-id
2015-08-05 02:38:02 +10:00
Matt Joiner
8069573abe
cmd/torrent: Remove some dead code
2015-07-21 22:54:50 +10:00
Matt Joiner
fcd98acc9b
cmd/torrent-metainfo-pprint: Don't print extra newline when -name is true
2015-07-04 13:30:26 +10:00
Alexander Baranov
029f431ff6
Make torrent-pick work with latest changes
2015-06-25 21:02:14 +03:00
Matt Joiner
348c6406eb
cmd/torrent-metainfo-pprint: Output JSON instead
2015-06-22 19:50:29 +10:00
Matt Joiner
ca27d431f4
cmd/torrent-pick: gofmt and sortimports
2015-06-03 13:31:27 +10:00
Matt Joiner
c6e2f2e15d
Merge pull request #16 from scr4t/master
...
torrent-pick tool
2015-06-02 06:28:07 +10:00
Alexander Baranov
05d597a9f7
Only wait for io.Copy; Remove obsolete from client
2015-06-01 23:11:45 +03:00
Alexander Baranov
577b129df5
Use higher-level API to get file
2015-06-01 22:56:10 +03:00
Alexander Baranov
1bb31b979d
Rename picker tool
2015-05-28 23:55:15 +03:00
Matt Joiner
9ea28a5094
go vet
2015-05-20 22:24:09 +10:00
Matt Joiner
ca86b0248e
go vet
2015-05-20 15:47:07 +10:00
Milos Gajdos
41c2773bcf
Removed summary flag. Modified fileToMmap function
...
This commit also reverts the ugly hack in dht.go which was checking for
empty bootstrap node string.
2015-05-16 15:34:09 +01:00
Milos Gajdos
e6e0b227da
Multiple file metainfo mode support in cmd tools
...
torrent-create and torrent-verify did not work correctly when a single
file is present in metainfo torrent file. torrent-create now fails if
the path passed as an argument does not exist. I've als modified
dht.go which now handles the case when an empty string is passed in
DHT bootstrap nodes slice. Finally in span.go I've sneaked in cheekily
a change which defines a type more like idiomatic Go (I have an OCD :-))
2015-05-16 13:23:33 +01:00
Matt Joiner
0d13293d71
Support seeding
2015-05-15 08:39:53 +10:00
Alexander Baranov
b8b403f83e
Basic pick-file functionality
2015-05-11 17:50:59 +03:00
Matt Joiner
c5208569ca
Apply sortimports
2015-04-30 00:31:34 +10:00
Matt Joiner
ca74d8ed33
Made Torrent.GotInfo a function, to avoid use of zero-initialized channel
2015-04-30 00:30:19 +10:00
Matt Joiner
0ec0302d1c
Publicly expose Torrent.GotInfo
2015-04-28 15:24:17 +10:00
Matt Joiner
526d9d738e
Rewrite imports to local bencode and metainfo
2015-04-27 14:55:01 +10:00
Matt Joiner
d48b755776
cmd/torrent-magnet: Error if arguments are given
...
Too easy to make this mistake, and then it hangs.
2015-04-08 02:15:25 +10:00
Matt Joiner
23ff66e300
cmd/...: Some package synopses
2015-04-06 23:04:18 +10:00
Matt Joiner
6b81d57ca2
dht: Clean-up interface, add loads of documentation
2015-04-01 17:29:55 +11:00
Matt Joiner
0fddc286e6
cmd/torrentfs: Tidy
2015-04-01 14:32:42 +11:00
Matt Joiner
8ba4a2e0f3
cmd/torrentfs: Check error creating client
...
This wouldn't have happened with exceptions ;)
2015-04-01 14:30:22 +11:00
Matt Joiner
d05e63d094
Use math.MaxUint64, the more you know
2015-03-30 23:08:43 +11:00
Matt Joiner
026b6da54f
cmd/tracker-announce: Send left=-1, which is what we send when we don't have the metainfo
2015-03-27 17:23:42 +11:00
Matt Joiner
64f833f3f0
cmd/torrent-magnet: Converts a torrent from stdin to a magnet link
2015-03-27 17:16:50 +11:00
Matt Joiner
5f7ad4c769
Merge all the tracker packages, why would anyone want them separately?
2015-03-27 15:12:15 +11:00
Matt Joiner
9f62098e85
cmd/scrape -> cmd/tracker-announce, and a big refresh
...
What it was doing was not scraping, that's something completely different. Now it can also announce magnets.
2015-03-26 17:22:17 +11:00
Matt Joiner
3aa78763aa
Use rogpeppe's sortimports to fix this goimports ordering madness
2015-03-26 17:18:08 +11:00
Matt Joiner
d97b487229
cmd/torrent: Report progress
...
Fixes #6
2015-03-25 17:32:42 +11:00
Matt Joiner
1ec15c9560
cmd/torrent: Replace flag with go-flags, rejig options
2015-03-25 15:41:15 +11:00
Jimmy Zelinskie
8cc582ecb2
add cli flag to disable DHT
...
This partially addresses #3 .
2015-03-22 18:24:31 -04:00
Matt Joiner
ed8e89a60c
cmd/torrent: Nicer usage
2015-03-20 23:18:32 +11:00
Matt Joiner
842a32ae0c
Rewrite import paths for migration from Bitbucket
2015-03-20 16:37:44 +11:00
Matt Joiner
ad6ac3f2cd
More cleaning of public interface
2015-03-08 17:28:14 +11:00
Matt Joiner
bc940ae2c6
Remove unused code
2015-02-25 01:40:27 +11:00
Matt Joiner
a372b68abb
dht: Handle responses through a callback
...
Trying to reduce number of goroutines
2015-02-21 15:00:48 +11:00
Matt Joiner
a7946c773e
cmd/torrent-metainfo-pprint: Add -name flag
2015-02-10 00:20:14 +11:00
Matt Joiner
1994e82297
Fails go vet
2015-02-10 00:19:31 +11:00
Matt Joiner
029d6939f8
Hide some methods that shouldn't be public
2015-02-10 00:12:29 +11:00
Matt Joiner
40593a741e
Provide HTTP pprof via envpprof package
2015-01-29 14:51:23 +11:00
Matt Joiner
c53714e660
cmd/dht-get-peers: Update to use "dht".Server.Announce
2015-01-29 14:29:06 +11:00
Matt Joiner
e4209a2d00
Reorder some imports
2014-12-26 17:17:00 +11:00
Matt Joiner
db749b89db
dht-get-peers: Don't bother to close the server before quitting
...
The closing code isn't very clean yet, and it's unnecessary.
2014-12-20 10:11:34 +11:00
Matt Joiner
ac1afa19b8
mmap_span: Avoid allocating the span slice on every use
2014-12-05 00:54:55 -06:00
Matt Joiner
fb2b626175
Don't send constructed MetaInfo down a channel when it's available, build it on demand
2014-12-01 16:37:40 -06:00
Matt Joiner
8a0be03eec
cmd/torrentfs: Tidy up flags, switch to default download strategy
2014-12-01 14:31:52 -06:00
Matt Joiner
82ca11faa9
Destroy the torrent FS on exit signals so ongoing syscalls don't block the unmount
2014-12-01 14:30:50 -06:00
Matt Joiner
75cde79d65
Improve the interface with client and download strategies
2014-12-01 03:37:33 -06:00
Matt Joiner
d430cf9ec9
cmd/torrent: Add -upload flag
2014-12-01 03:29:56 -06:00
Matt Joiner
0e3f7a5520
Change all references to github.com/nsf/libtorgo to github.com/anacrolix/libtorgo
2014-11-28 12:13:57 -06:00
Matt Joiner
cd5c1f8298
cmd/dht-ping: Various improvements more like a real ping program
2014-11-18 12:36:36 -06:00
Matt Joiner
f8da0c5b07
cmd/dht-get-peers: Add -once flag to do a single scrape
2014-11-18 09:56:37 -06:00
Matt Joiner
a6914e5897
cmd/dht-get-peers: Expose debug HTTP
2014-11-18 09:56:05 -06:00
Matt Joiner
6d05994c2c
dht: Include the sender of peers in the peer stream
2014-11-17 17:47:36 -06:00
Matt Joiner
c1049d0605
cmd/dht-get-peers: Fix lockup on SIGINT
2014-11-17 01:45:20 -06:00
Matt Joiner
a5adb399f2
Change cmd/torrent default ports
2014-11-16 21:21:13 -06:00
Matt Joiner
ecf2639856
Add magnet-metainfo, tool to download magnet to torrent file
2014-09-25 18:05:52 +10:00
Matt Joiner
d5a2bc67f7
Misc tweaks
2014-08-28 10:05:41 +10:00
Matt Joiner
2d9c22ae1e
Misc trivial improvements
2014-08-25 22:14:10 +10:00
Matt Joiner
78ed2c74d0
Make NoUpload a client configuration option and use it for torrentfs
2014-08-25 06:00:29 +10:00
Matt Joiner
2b079e4a9d
Got a nice working algorithm for responsive download strategy
2014-08-24 03:08:11 +10:00
Matt Joiner
60df4e100c
Simplify dirwatch to scan the whole directory on changes
2014-08-22 17:31:03 +10:00
Matt Joiner
4a7c94d04d
Add test for dht.NewServer and change StopServing to Close
2014-08-21 21:12:50 +10:00
Matt Joiner
74f05db2ea
Clean up imports
2014-08-21 21:08:56 +10:00
Matt Joiner
5c1492bffe
Add CopyExact util function
2014-08-21 18:24:19 +10:00
Matt Joiner
40fd1d647c
Tidy up the torrent and DHT APIs
2014-08-21 18:07:06 +10:00
Matt Joiner
96e44f8950
Print dht-ping reponses with %q
2014-08-17 00:44:05 +10:00
Matt Joiner
324fb94684
cmd/torrentfs: Missing listener on client
2014-07-24 13:45:49 +10:00
Matt Joiner
7cc22565ed
Abstract the status HTTP server into package util
2014-07-23 01:54:58 +10:00
Matt Joiner
6158b1f6ec
torrentfs: Match the active torrents to those found in the given directory
2014-07-23 01:54:11 +10:00
Matt Joiner
28afa748e7
API changes in github.com/anacrolix/libtorgo
2014-07-13 17:37:12 +10:00
Matt Joiner
0d57d50003
cmd/torrent: Run the http server by default
2014-07-12 01:23:10 +10:00
Matt Joiner
581a3d9325
Add DHT support to cmd/torrent
2014-07-11 19:30:20 +10:00
Matt Joiner
2ef602cabd
dht-get-peers: Some improvements
2014-07-10 00:15:28 +10:00
Matt Joiner
7928b763d9
torrent-infohash: utility to print the info hash of a torrent file
2014-07-10 00:15:03 +10:00
Matt Joiner
78fe1b11ae
Implement dht-get-peers command and GetPeers method in dht package
2014-07-04 01:43:04 +10:00
Matt Joiner
c96293a111
Can now download from magnet links
2014-06-28 19:38:31 +10:00
Matt Joiner
9d53e19547
Fixes for cmd/torrent with the new torrent.Info field
2014-06-27 18:57:35 +10:00
Matt Joiner
49e71f9654
Begin adding magnet and ut_metadata support
2014-06-27 00:57:07 +10:00
Matt Joiner
cf31465904
torrentfs: Write client status to HTTP port
2014-06-26 17:29:12 +10:00
Matt Joiner
809aabe531
cmd/torrentfs: Expose readahead bytes as a flag
2014-06-26 01:37:00 +10:00
Matt Joiner
ef8e2fcf16
DHT node table should be loaded after the server is initialized
2014-06-24 23:17:06 +10:00
Matt Joiner
110aa733a4
Make the readahead on ResponsiveDownloadStrategy customizable
2014-05-29 01:30:59 +10:00
Matt Joiner
83a02420a5
Got dht-server working nicely
2014-05-27 16:28:56 +10:00
Matt Joiner
92b77a7cae
dht-server: Save and load node table between invocations
2014-05-25 23:04:55 +10:00
Matt Joiner
1b69e69461
Switch dht-server to bootstrapping
2014-05-25 21:34:29 +10:00
Matt Joiner
7c3d919cfb
Begin implementing DHT
2014-05-24 16:51:56 +10:00
Matt Joiner
04879b0002
Add Client.DownloadStrategy; fix priority of incomplete pieces
2014-05-21 17:40:54 +10:00
Matt Joiner
2e4629abbc
cmd/torrent: Add flags -disableTrackers and -seed
2014-05-21 17:38:09 +10:00
Matt Joiner
1aa1063863
Big visibility/doc clean-up, and extract mmap_span package
2014-04-09 02:36:05 +10:00
Matt Joiner
f1bf5a46a1
Check for asynchronous mount error after serving
2014-04-09 01:18:55 +10:00
Matt Joiner
fc653a307b
Break up torrentfs main(), it's too large
2014-04-09 01:18:29 +10:00
Matt Joiner
998dba34b8
Handle repeat SIGINT/SIGTERMs
...
Need to determine if there's a way to better interrupt the FS or if we have no control over that.
2014-04-09 01:17:53 +10:00
Matt Joiner
1415c0d824
goimports decided to reorganise imports
2014-04-08 19:39:34 +10:00
Matt Joiner
236e12486b
Lots of logging improvements
2014-03-21 00:14:17 +11:00
Matt Joiner
ef4aa0d3f9
Add -listenAddr and actually listen in ./cmd/torrent
2014-03-21 00:13:32 +11:00
Matt Joiner
fa000c4f88
Improvements to pending chunks; extract testutil
2014-03-20 16:58:09 +11:00
Matt Joiner
771a08d4f4
Add a scrape command so I can work out if trackers are seeing my test clients
...
I don't even know if scrape is the right word.
2014-03-20 04:30:32 +11:00
Matt Joiner
9ee83455cf
Various progress, particularly around the way data readiness is handled
2014-03-20 04:30:08 +11:00
Matt Joiner
2e81f914e7
Add a end-to-end test for torrentfs
...
Basic unchoking and uploading.
Accept incoming connections.
Break out torrentfs lib.
Fix and implement some protocol stuff.
2014-03-18 01:44:22 +11:00
Matt Joiner
31530899e4
Make use of trackers
2014-03-17 02:30:10 +11:00
Matt Joiner
c7ca000f25
Unit test for connection address comparison to avoid adding bootstrap peers when already present
2013-11-05 00:10:16 +11:00
Matt Joiner
69c674606f
Bring the 'torrent' command up to speed with the client API, including profiling flags
2013-11-05 00:07:28 +11:00
Matt Joiner
fe5f8317d4
Reconnect to the torrentfs -testPeer at regular intervals if it's missing for any loaded torrents
2013-10-22 18:01:56 +11:00
Matt Joiner
d039436f55
Significant progress and improvements
...
Piece state is broken up into several dimensions.
Implement keep-alive in connection writer.
Lazily hash pieces, only as requested.
Replace client actor mechanism with a mutex.
Fix runConnection/connectionLoop/handshake misnomers.
Fix broken reading from partially complete pieces.
2013-10-21 01:07:01 +11:00
Matt Joiner
03b1af07cd
Always finish off partially downloaded pieces
2013-10-15 19:42:30 +11:00
Matt Joiner
0a5043ba69
Implement prioritizing of torrent data regions based on FS activity
2013-10-15 01:39:12 +11:00
Matt Joiner
5c0ff3ff5f
Torrent client publishes data ready information; torrentfs supports file reads
2013-10-13 23:16:21 +11:00
Matt Joiner
a44accadbe
Create more efficient writer method for MMapSpan for use with hashing
2013-10-07 10:35:10 +11:00
Matt Joiner
e1526b2863
Support browsing torrents in the filesystem
2013-10-07 06:00:35 +11:00
Matt Joiner
68e189d477
Start implementing torrentfs binary
2013-10-06 18:01:39 +11:00
Matt Joiner
28531a4fcc
Fix request/chunk confusion, missing outgoing message prefix, protocol tests; improve request triggering
2013-10-01 18:43:18 +10:00
Matt Joiner
081a6805c5
Implementing bitfields and connection message handling
2013-09-30 21:51:08 +10:00
Matt Joiner
7870d20573
Begin implementing the adding of peers, and initiating of connections
2013-09-29 08:11:24 +10:00