]> Sergey Matveev's repositories - btrtrc.git/blob - config.go
Rewrite import paths for migration from Bitbucket
[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
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
16         // Don't announce to trackers. This only leaves DHT to discover peers.
17         DisableTrackers bool
18         // Don't create a DHT.
19         NoDHT bool
20         // Overrides the default DHT configuration.
21         DHTConfig *dht.ServerConfig
22         // Don't chunks to peers.
23         NoUpload bool
24         // User-provided Client peer ID. If not present, one is generated automatically.
25         PeerID string
26         // For the bittorrent protocol.
27         DisableUTP bool
28         // For the bittorrent protocol.
29         DisableTCP bool
30         // Don't automatically load "$ConfigDir/blocklist".
31         NoDefaultBlocklist bool
32         // Defaults to "$HOME/.config/torrent". This is where "blocklist",
33         // "torrents" and other operational files are stored.
34         ConfigDir string
35         // Don't save or load to a cache of torrent files stored in
36         // "$ConfigDir/torrents".
37         DisableMetainfoCache bool
38         // Called to instantiate storage for each added torrent. Provided backends
39         // are in $REPO/data. If not set, the "file" implementation is used.
40         TorrentDataOpener
41 }