]> Sergey Matveev's repositories - btrtrc.git/blob - config.go
Merge pull request #16 from scr4t/master
[btrtrc.git] / config.go
1 package torrent
2
3 import (
4         "github.com/anacrolix/torrent/dht"
5 )
6
7 // Override Client defaults.
8 type Config struct {
9         // Store torrent file data in this directory unless TorrentDataOpener is
10         // specified.
11         DataDir string `long:"data-dir" description:"directory to store downloaded torrent data"`
12         // The address to listen for new uTP and TCP bittorrent protocol
13         // connections. DHT shares a UDP socket with uTP unless configured
14         // otherwise.
15         ListenAddr string `long:"listen-addr" value-name:"HOST:PORT"`
16         // Don't announce to trackers. This only leaves DHT to discover peers.
17         DisableTrackers bool `long:"disable-trackers"`
18         DisablePEX      bool `long:"disable-pex"`
19         // Don't create a DHT.
20         NoDHT bool `long:"disable-dht"`
21         // Overrides the default DHT configuration.
22         DHTConfig *dht.ServerConfig
23         // Don't ever send chunks to peers.
24         NoUpload bool `long:"no-upload"`
25         // Upload even after there's nothing in it for us. By default uploading is
26         // not altruistic.
27         Seed bool `long:"seed"`
28         // User-provided Client peer ID. If not present, one is generated automatically.
29         PeerID string
30         // For the bittorrent protocol.
31         DisableUTP bool
32         // For the bittorrent protocol.
33         DisableTCP bool `long:"disable-tcp"`
34         // Don't automatically load "$ConfigDir/blocklist".
35         NoDefaultBlocklist bool
36         // Defaults to "$HOME/.config/torrent". This is where "blocklist",
37         // "torrents" and other operational files are stored.
38         ConfigDir string
39         // Don't save or load to a cache of torrent files stored in
40         // "$ConfigDir/torrents".
41         DisableMetainfoCache bool
42         // Called to instantiate storage for each added torrent. Provided backends
43         // are in $REPO/data. If not set, the "file" implementation is used.
44         TorrentDataOpener
45         DisableEncryption bool `long:"disable-encryption"`
46 }