mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
access lists: filter requests in socket workers instead
This commit is contained in:
parent
33966bed57
commit
7ccd5fcbf7
18 changed files with 221 additions and 163 deletions
|
|
@ -4,10 +4,10 @@ use aquatic_common::access_list::AccessListMode;
|
|||
|
||||
use crate::{common::*, config::Config};
|
||||
|
||||
pub fn update_access_list(config: &Config, torrent_maps: &mut TorrentMaps) {
|
||||
pub fn update_access_list(config: &Config, state: &State) {
|
||||
match config.access_list.mode {
|
||||
AccessListMode::Require | AccessListMode::Forbid => {
|
||||
if let Err(err) = torrent_maps
|
||||
if let Err(err) = state
|
||||
.access_list
|
||||
.update_from_path(&config.access_list.path)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue