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