mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
aquatic_http access list: add config, state field, initial load
This commit is contained in:
parent
b8b9a9839a
commit
4fa199a1e0
3 changed files with 18 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr};
|
||||
use std::sync::Arc;
|
||||
|
||||
use aquatic_common::access_list::AccessList;
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use either::Either;
|
||||
use hashbrown::HashMap;
|
||||
|
|
@ -116,12 +117,14 @@ pub struct TorrentMaps {
|
|||
#[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