mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
aquatic_http: check access list in announce request handler
This commit is contained in:
parent
4fa199a1e0
commit
7fec41099b
4 changed files with 73 additions and 59 deletions
|
|
@ -112,19 +112,18 @@ pub type TorrentMap<I> = HashMap<InfoHash, TorrentData<I>>;
|
|||
pub struct TorrentMaps {
|
||||
pub ipv4: TorrentMap<Ipv4Addr>,
|
||||
pub ipv6: TorrentMap<Ipv6Addr>,
|
||||
pub access_list: AccessList,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct State {
|
||||
pub torrent_maps: Arc<Mutex<TorrentMaps>>,
|
||||
pub access_list: Arc<Mutex<AccessList>>,
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
torrent_maps: Arc::new(Mutex::new(TorrentMaps::default())),
|
||||
access_list: Arc::new(Mutex::new(AccessList::default())),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue