pub struct ThreatFeedManager { /* private fields */ }Expand description
Automated threat intelligence feed manager
Implementations§
Source§impl ThreatFeedManager
impl ThreatFeedManager
Sourcepub async fn new_async(
config: ThreatIntelConfig,
) -> Result<Self, Box<dyn Error>>
pub async fn new_async( config: ThreatIntelConfig, ) -> Result<Self, Box<dyn Error>>
Create a new threat feed manager with configuration (async version)
Sourcepub fn new(
config: ThreatIntelConfig,
) -> Result<Self, Box<dyn Error + Send + Sync>>
pub fn new( config: ThreatIntelConfig, ) -> Result<Self, Box<dyn Error + Send + Sync>>
Create a new threat intelligence manager (synchronous version)
Sourcepub fn start_automated_updates(
&self,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn start_automated_updates( &self, ) -> Result<(), Box<dyn Error + Send + Sync>>
Start automated feed updates in the background
Sourcepub fn load_config() -> ThreatIntelConfig
pub fn load_config() -> ThreatIntelConfig
Load configuration from YAML file or environment variables
Sourcepub async fn start_automation(&mut self) -> Result<(), Box<dyn Error>>
pub async fn start_automation(&mut self) -> Result<(), Box<dyn Error>>
Start automated feed updates if enabled (Currently simplified implementation)
Sourcepub async fn download_all_feeds(&self) -> Result<(), Box<dyn Error>>
pub async fn download_all_feeds(&self) -> Result<(), Box<dyn Error>>
Download all enabled feeds immediately
Sourcepub async fn get_feed_status(&self) -> HashMap<String, FeedStatus>
pub async fn get_feed_status(&self) -> HashMap<String, FeedStatus>
Get status of all feeds
Sourcepub async fn update_feed(&self, feed_name: &str) -> Result<(), Box<dyn Error>>
pub async fn update_feed(&self, feed_name: &str) -> Result<(), Box<dyn Error>>
Manually trigger update of specific feed
Sourcepub fn is_malicious_ip(&self, ip: &IpAddr) -> bool
pub fn is_malicious_ip(&self, ip: &IpAddr) -> bool
Check if an IP address is in malicious IP feeds
Sourcepub fn is_tor_exit(&self, ip: &IpAddr) -> bool
pub fn is_tor_exit(&self, ip: &IpAddr) -> bool
Check if an IP address is a Tor exit node
Sourcepub fn is_proxy_vpn(&self, ip: &IpAddr) -> bool
pub fn is_proxy_vpn(&self, ip: &IpAddr) -> bool
Check if an IP address is from a VPN or proxy service
Auto Trait Implementations§
impl Freeze for ThreatFeedManager
impl !RefUnwindSafe for ThreatFeedManager
impl Send for ThreatFeedManager
impl Sync for ThreatFeedManager
impl Unpin for ThreatFeedManager
impl !UnwindSafe for ThreatFeedManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more