Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorValérian Galliat <val@codejam.info>2015-09-10 20:17:49 +0300
committerValérian Galliat <val@codejam.info>2015-11-08 11:28:43 +0300
commitea009bca0d6939d3e57ffb9ce3dc371504b17156 (patch)
tree60367aeeb6e97b83e5c538e1891d67ba8a89b0ca /bin
parent9dde13d6b8e0764f45d0d7ee6106891c6c60648f (diff)
Add an 'announce' option to announce to custom trackers
$ webtorrent seed somefile -a http://localhost:8000/announce -a udp://localhost:8000 -q magnet:?xt=urn:btih:066ed351804835cf0fec21e3b352f58e270a26d5&dn=somefile&tr=http%3A%2F%2Flocalhost%3A8000%2Fannounce&tr=udp%3A%2F%2Flocalhost%3A8000
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmd.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index 1e39300..c6b76d7 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -43,6 +43,7 @@ var argv = minimist(process.argv.slice(2), {
s: 'select',
i: 'index',
o: 'out',
+ a: 'announce',
q: 'quiet',
h: 'help',
v: 'version'
@@ -63,6 +64,7 @@ var argv = minimist(process.argv.slice(2), {
],
string: [ // options that are always strings
'out',
+ 'announce',
'blocklist',
'subtitles',
'on-done',
@@ -201,6 +203,7 @@ Options (advanced):
-p, --port [number] change the http server port [default: 8000]
-t, --subtitles [path] load subtitles file
-b, --blocklist [path] load blocklist file/http url
+ -a, --announce [url] tracker URL to announce to
-q, --quiet don't show UI on stdout
--on-done [script] run script after torrent download is done
--on-exit [script] run script before program exit
@@ -459,7 +462,7 @@ function runSeed (input) {
})
.on('error', fatalError)
- client.seed(input)
+ client.seed(input, { announce: argv.announce })
client.on('torrent', function (torrent) {
if (argv.quiet) console.log(torrent.magnetURI)