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