pub struct OriginCandidate {
pub ip: IpAddr,
pub port: Option<u16>,
pub method: String,
pub confidence: u8,
pub validated: ValidationState,
}Expand description
Represents an origin server discovered behind a CDN/WAF.
Fields§
§ip: IpAddrIP address of the candidate origin server
port: Option<u16>Optional explicit port. None means the validator falls back to
the scheme default (443 then 80). Set this when a discovery
source already knows the listening port (e.g. a Censys hit on
8443 or a wiremock harness binding to an ephemeral port). An
explicit port is also taken as the operator’s signal that they
intend to probe non-routable IPs (loopback/private), so the
global-routability gate in the validator is bypassed when this
field is Some.
method: StringDiscovery technique (e.g., “ssl_cert”, “dns_misconfig”)
confidence: u8Confidence score (0-100)
validated: ValidationStateActive validation result
Implementations§
Source§impl OriginCandidate
impl OriginCandidate
Sourcepub fn new(ip: IpAddr, method: impl Into<String>, confidence: u8) -> Self
pub fn new(ip: IpAddr, method: impl Into<String>, confidence: u8) -> Self
Create a new speculative candidate.
Sourcepub fn new_with_port(
ip: IpAddr,
port: u16,
method: impl Into<String>,
confidence: u8,
) -> Self
pub fn new_with_port( ip: IpAddr, port: u16, method: impl Into<String>, confidence: u8, ) -> Self
Create a new speculative candidate at an explicit port. Use this from test harnesses (wiremock binds to an ephemeral port) and from discovery sources that already know the listener (Censys, Shodan, AXFR-derived A records on non-default ports).
Trait Implementations§
Source§impl Clone for OriginCandidate
impl Clone for OriginCandidate
Source§fn clone(&self) -> OriginCandidate
fn clone(&self) -> OriginCandidate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OriginCandidate
impl Debug for OriginCandidate
Source§impl<'de> Deserialize<'de> for OriginCandidate
impl<'de> Deserialize<'de> for OriginCandidate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for OriginCandidate
Source§impl Ord for OriginCandidate
impl Ord for OriginCandidate
Source§fn cmp(&self, other: &OriginCandidate) -> Ordering
fn cmp(&self, other: &OriginCandidate) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for OriginCandidate
impl PartialEq for OriginCandidate
Source§impl PartialOrd for OriginCandidate
impl PartialOrd for OriginCandidate
Source§impl Serialize for OriginCandidate
impl Serialize for OriginCandidate
impl StructuralPartialEq for OriginCandidate
Auto Trait Implementations§
impl Freeze for OriginCandidate
impl RefUnwindSafe for OriginCandidate
impl Send for OriginCandidate
impl Sync for OriginCandidate
impl Unpin for OriginCandidate
impl UnsafeUnpin for OriginCandidate
impl UnwindSafe for OriginCandidate
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.