@@ -21,6 +21,10 @@ pub struct Core {
21
21
#[ serde( default = "Core::default_inactive_peer_cleanup_interval" ) ]
22
22
pub inactive_peer_cleanup_interval : u64 ,
23
23
24
+ // Whe `true` only approved torrents can be announced in the tracker.
25
+ #[ serde( default = "Core::default_listed" ) ]
26
+ pub listed : bool ,
27
+
24
28
/// Tracker mode. See [`TrackerMode`] for more information.
25
29
#[ serde( default = "Core::default_mode" ) ]
26
30
pub mode : TrackerMode ,
@@ -29,6 +33,10 @@ pub struct Core {
29
33
#[ serde( default = "Core::default_network" ) ]
30
34
pub net : Network ,
31
35
36
+ // Whe `true` clients require a key to connect and use the tracker.
37
+ #[ serde( default = "Core::default_private" ) ]
38
+ pub private : bool ,
39
+
32
40
// Tracker policy configuration.
33
41
#[ serde( default = "Core::default_tracker_policy" ) ]
34
42
pub tracker_policy : TrackerPolicy ,
@@ -48,8 +56,10 @@ impl Default for Core {
48
56
announce_policy : Self :: default_announce_policy ( ) ,
49
57
database : Self :: default_database ( ) ,
50
58
inactive_peer_cleanup_interval : Self :: default_inactive_peer_cleanup_interval ( ) ,
59
+ listed : Self :: default_listed ( ) ,
51
60
mode : Self :: default_mode ( ) ,
52
61
net : Self :: default_network ( ) ,
62
+ private : Self :: default_private ( ) ,
53
63
tracker_policy : Self :: default_tracker_policy ( ) ,
54
64
tracker_usage_statistics : Self :: default_tracker_usage_statistics ( ) ,
55
65
}
@@ -69,6 +79,10 @@ impl Core {
69
79
600
70
80
}
71
81
82
+ fn default_listed ( ) -> bool {
83
+ false
84
+ }
85
+
72
86
fn default_mode ( ) -> TrackerMode {
73
87
TrackerMode :: Public
74
88
}
@@ -77,6 +91,10 @@ impl Core {
77
91
Network :: default ( )
78
92
}
79
93
94
+ fn default_private ( ) -> bool {
95
+ false
96
+ }
97
+
80
98
fn default_tracker_policy ( ) -> TrackerPolicy {
81
99
TrackerPolicy :: default ( )
82
100
}
0 commit comments