MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / is_allowed

Method is_allowed

vmm/src/config.rs:136–141  ·  view source on GitHub ↗
(&self, protocol: &str, port: u16)

Source from the content-addressed store, hash-verified

134
135impl PortMappingConfig {
136 pub fn is_allowed(&self, protocol: &str, port: u16) -> bool {
137 if !self.enabled {
138 return false;
139 }
140 self.range.iter().any(|r| r.contains(protocol, port))
141 }
142}
143
144#[derive(Debug, Clone, Deserialize)]

Callers 1

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected