From 7befb70ffcb60b4477ac7fb609f615a05be76cfc Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Tue, 16 Dec 2025 15:44:08 -0500 Subject: [PATCH 1/8] fix --- Cargo.lock | 41 ++++++++++++- Cargo.toml | 3 +- pyproject.toml | 2 +- src/lib.rs | 146 ++++++++++++++++++++++++++++++++++++++++++++- src/python.rs | 22 +++++++ test_cloudcheck.py | 42 +++++++++++++ uv.lock | 2 +- 7 files changed, 253 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ae41a86..d9c2ed5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -56,12 +65,13 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cloudcheck" -version = "8.2.0" +version = "8.3.0" dependencies = [ "openssl", "pyo3", "pyo3-async-runtimes", "radixtarget", + "regex", "reqwest", "serde", "serde_json", @@ -899,6 +909,35 @@ dependencies = [ "bitflags", ] +[[package]] +name = "regex" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" + [[package]] name = "reqwest" version = "0.12.26" diff --git a/Cargo.toml b/Cargo.toml index e886e58..02fcc8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudcheck" -version = "8.2.0" +version = "8.3.0" edition = "2024" description = "CloudCheck is a simple Rust tool to check whether an IP address or hostname belongs to a cloud provider." license = "GPL-3.0" @@ -14,6 +14,7 @@ openssl = { version = "0.10", features = ["vendored"] } pyo3 = { version = "0.27", optional = true } pyo3-async-runtimes = { version = "0.27", features = ["tokio-runtime"], optional = true } radixtarget = "4.2" +regex = "1.11" [features] default = [] diff --git a/pyproject.toml b/pyproject.toml index 8f59ff0..7655952 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "cloudcheck" -version = "8.2.0" +version = "8.3.0" description = "Detailed database of cloud providers. Instantly look up a domain or IP address" readme = "README.md" requires-python = ">=3.9" diff --git a/src/lib.rs b/src/lib.rs index 1f38b67..6cf8e39 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,11 @@ use radixtarget::{RadixTarget, ScopeMode}; +use regex::Regex; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::path::PathBuf; use std::sync::Arc; use std::time::{Duration, SystemTime}; -use tokio::sync::OnceCell; +use tokio::sync::{Mutex, OnceCell}; #[cfg(feature = "py")] mod python; @@ -23,12 +24,16 @@ struct ProviderData { tags: Vec, cidrs: Vec, domains: Vec, + #[serde(default)] + regexes: HashMap>, } #[derive(Clone)] pub struct CloudCheck { radix: Arc>, providers: Arc>>>, + regex_patterns: Arc>>>>, + regex_cache: Arc>>>, } impl Default for CloudCheck { @@ -42,6 +47,8 @@ impl CloudCheck { CloudCheck { radix: Arc::new(OnceCell::new()), providers: Arc::new(OnceCell::new()), + regex_patterns: Arc::new(OnceCell::new()), + regex_cache: Arc::new(Mutex::new(HashMap::new())), } } @@ -77,6 +84,7 @@ impl CloudCheck { async fn ensure_loaded(&self) -> Result<(), Box> { let radix_cell = Arc::clone(&self.radix); let providers_cell = Arc::clone(&self.providers); + let regex_patterns_cell = Arc::clone(&self.regex_patterns); radix_cell .get_or_try_init(|| async { @@ -106,6 +114,8 @@ impl CloudCheck { let mut radix = RadixTarget::new(&[], ScopeMode::Normal)?; let mut providers_map: HashMap> = HashMap::new(); + let mut regex_patterns_map: HashMap>> = + HashMap::new(); for (_, provider) in providers_data { let cloud_provider = CloudProvider { @@ -155,12 +165,21 @@ impl CloudCheck { .or_default() .push(cloud_provider.clone()); } + + // Store regex patterns per provider + if !provider.regexes.is_empty() { + regex_patterns_map.insert(provider.name.clone(), provider.regexes); + } } providers_cell .set(providers_map) .map_err(|_| "Failed to set providers")?; + regex_patterns_cell + .set(regex_patterns_map) + .map_err(|_| "Failed to set regex patterns")?; + Ok::>(radix) }) .await?; @@ -183,6 +202,68 @@ impl CloudCheck { Ok(Vec::new()) } } + + pub async fn regex_match( + &self, + provider_name: &str, + regex_name: &str, + text: &str, + ) -> Result> { + self.ensure_loaded().await?; + + let regex_patterns = self.regex_patterns.get().unwrap(); + let provider_regexes = match regex_patterns.get(provider_name) { + Some(regexes) => regexes, + None => return Err(format!("Provider '{}' not found", provider_name).into()), + }; + + let patterns = match provider_regexes.get(regex_name) { + Some(patterns) => patterns, + None => { + return Err(format!( + "Regex '{}' not found for provider '{}'", + regex_name, provider_name + ) + .into()); + } + }; + + let cache_key = format!("{}:{}", provider_name, regex_name); + let mut cache = self.regex_cache.lock().await; + + // Check if we already have compiled regexes for this provider:regex_name combination + if !cache.contains_key(&cache_key) { + // Compile all patterns for this regex name + let mut compiled = Vec::new(); + for pattern in patterns { + match Regex::new(pattern) { + Ok(re) => compiled.push(re), + Err(e) => { + eprintln!( + "Error compiling regex pattern '{}' for provider '{}' regex '{}': {}", + pattern, provider_name, regex_name, e + ); + continue; + } + } + } + cache.insert(cache_key.clone(), compiled); + } + + // Check if any regex matches the entire string + if let Some(compiled_regexes) = cache.get(&cache_key) { + for re in compiled_regexes { + if let Some(mat) = re.find(text) { + // Check if the match spans the entire string + if mat.start() == 0 && mat.end() == text.len() { + return Ok(true); + } + } + } + } + + Ok(false) + } } #[cfg(test)] @@ -212,4 +293,67 @@ mod tests { names ); } + + #[tokio::test] + async fn test_regex_match_amazon_valid() { + let cloudcheck = CloudCheck::new(); + // Test valid bucket name that matches Amazon's STORAGE_BUCKET_NAME pattern + let result = cloudcheck + .regex_match("Amazon", "STORAGE_BUCKET_NAME", "my-bucket-123") + .await + .unwrap(); + assert!( + result, + "Expected 'my-bucket-123' to match Amazon STORAGE_BUCKET_NAME" + ); + } + + #[tokio::test] + async fn test_regex_match_amazon_invalid() { + let cloudcheck = CloudCheck::new(); + // Test invalid bucket name (too short and contains invalid characters) + let result = cloudcheck + .regex_match("Amazon", "STORAGE_BUCKET_NAME", "AB") + .await + .unwrap(); + assert!( + !result, + "Expected 'AB' to not match Amazon STORAGE_BUCKET_NAME" + ); + } + + #[tokio::test] + async fn test_regex_match_nonexistent_provider() { + let cloudcheck = CloudCheck::new(); + // Test with a provider that doesn't exist + let result = cloudcheck + .regex_match("NonExistentProvider", "STORAGE_BUCKET_NAME", "my-bucket") + .await; + assert!(result.is_err(), "Expected error for non-existent provider"); + assert!( + result + .unwrap_err() + .to_string() + .contains("Provider 'NonExistentProvider' not found") + ); + } + + #[tokio::test] + async fn test_regex_match_nonexistent_regex() { + let cloudcheck = CloudCheck::new(); + // Test with a real provider but non-existent regex name + let result = cloudcheck + .regex_match("Amazon", "NON_EXISTENT_REGEX", "my-bucket") + .await; + assert!( + result.is_err(), + "Expected error for non-existent regex name on real provider" + ); + assert!( + result + .unwrap_err() + .to_string() + .contains("Regex 'NON_EXISTENT_REGEX' not found for provider 'Amazon'") + ); + } } diff --git a/src/python.rs b/src/python.rs index af839ac..d0ca3ed 100644 --- a/src/python.rs +++ b/src/python.rs @@ -44,4 +44,26 @@ impl CloudCheck { } }) } + + fn regex_match<'py>( + &self, + py: Python<'py>, + provider_name: &str, + regex_name: &str, + text: &str, + ) -> PyResult> { + let inner = self.inner.clone(); + let provider_name = provider_name.to_string(); + let regex_name = regex_name.to_string(); + let text = text.to_string(); + pyo3_async_runtimes::tokio::future_into_py(py, async move { + match inner.regex_match(&provider_name, ®ex_name, &text).await { + Ok(matched) => Ok(matched), + Err(e) => Err(PyErr::new::(format!( + "CloudCheck error: {}", + e + ))), + } + }) + } } diff --git a/test_cloudcheck.py b/test_cloudcheck.py index 731a1d8..25aca7b 100644 --- a/test_cloudcheck.py +++ b/test_cloudcheck.py @@ -16,3 +16,45 @@ async def test_lookup_amazon_domain(): results = await cloudcheck.lookup("asdf.amazon.com") names = [provider["name"] for provider in results] assert "Amazon" in names, f"Expected Amazon in results: {names}" + + +@pytest.mark.asyncio +async def test_regex_match_amazon_valid(): + cloudcheck = CloudCheck() + # Test valid bucket name that matches Amazon's STORAGE_BUCKET_NAME pattern + result = await cloudcheck.regex_match( + "Amazon", "STORAGE_BUCKET_NAME", "my-bucket-123" + ) + assert result is True, ( + "Expected 'my-bucket-123' to match Amazon STORAGE_BUCKET_NAME" + ) + + +@pytest.mark.asyncio +async def test_regex_match_amazon_invalid(): + cloudcheck = CloudCheck() + # Test invalid bucket name (too short and contains invalid characters) + result = await cloudcheck.regex_match("Amazon", "STORAGE_BUCKET_NAME", "#my-bucket") + assert result is False, ( + "Expected '#my-bucket' to not match Amazon STORAGE_BUCKET_NAME" + ) + + +@pytest.mark.asyncio +async def test_regex_match_nonexistent_provider(): + cloudcheck = CloudCheck() + # Test with a provider that doesn't exist + with pytest.raises(ValueError, match="Provider 'NonExistentProvider' not found"): + await cloudcheck.regex_match( + "NonExistentProvider", "STORAGE_BUCKET_NAME", "my-bucket" + ) + + +@pytest.mark.asyncio +async def test_regex_match_nonexistent_regex(): + cloudcheck = CloudCheck() + # Test with a real provider but non-existent regex name + with pytest.raises( + ValueError, match="Regex 'NON_EXISTENT_REGEX' not found for provider 'Amazon'" + ): + await cloudcheck.regex_match("Amazon", "NON_EXISTENT_REGEX", "my-bucket") diff --git a/uv.lock b/uv.lock index fc70d1a..1a5a1ec 100644 --- a/uv.lock +++ b/uv.lock @@ -140,7 +140,7 @@ wheels = [ [[package]] name = "cloudcheck" -version = "8.2.0" +version = "8.3.0" source = { editable = "." } [package.dev-dependencies] From 5ff274056e9f76066aba2502eea968384ecd8f44 Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Tue, 16 Dec 2025 15:46:46 -0500 Subject: [PATCH 2/8] clippy --- src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6cf8e39..4ee580b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,9 @@ mod python; const CLOUDCHECK_SIGNATURE_URL: &str = "https://raw.githubusercontent.com/blacklanternsecurity/cloudcheck/refs/heads/stable/cloud_providers_v2.json"; +type RegexPatternsMap = HashMap>>; +type RegexPatterns = Arc>; + #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CloudProvider { pub name: String, @@ -32,7 +35,7 @@ struct ProviderData { pub struct CloudCheck { radix: Arc>, providers: Arc>>>, - regex_patterns: Arc>>>>, + regex_patterns: RegexPatterns, regex_cache: Arc>>>, } @@ -114,8 +117,7 @@ impl CloudCheck { let mut radix = RadixTarget::new(&[], ScopeMode::Normal)?; let mut providers_map: HashMap> = HashMap::new(); - let mut regex_patterns_map: HashMap>> = - HashMap::new(); + let mut regex_patterns_map: RegexPatternsMap = HashMap::new(); for (_, provider) in providers_data { let cloud_provider = CloudProvider { From 1df75ecd90d580111f4af31fafde14af58febd30 Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Wed, 17 Dec 2025 12:10:57 -0500 Subject: [PATCH 3/8] regex helpers --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 2 +- cloud_providers_v2.json | 315 ++++++++++-------- {cloudcheck_update => cloudcheck}/helpers.py | 0 .../providers/akamai.py | 2 +- .../providers/alibaba.py | 2 +- .../providers/amazon.py | 2 +- .../providers/arvancloud.py | 2 +- .../providers/azure.py | 2 +- .../providers/backblaze.py | 2 +- .../providers/base.py | 0 .../providers/cisco.py | 2 +- .../providers/cloudflare.py | 2 +- .../providers/cloudfront.py | 2 +- .../providers/dell.py | 2 +- .../providers/digitalocean.py | 2 +- .../providers/fastly.py | 2 +- .../providers/github.py | 2 +- .../providers/google.py | 2 +- .../providers/heroku.py | 2 +- .../providers/hetzner.py | 2 +- .../providers/hpe.py | 2 +- .../providers/huawei.py | 2 +- .../providers/ibm.py | 2 +- .../providers/imperva.py | 2 +- .../providers/kamatera.py | 2 +- .../providers/oracle.py | 2 +- .../providers/ovh.py | 2 +- .../providers/rackspace.py | 2 +- .../providers/salesforce.py | 2 +- .../providers/scaleway.py | 2 +- .../providers/tencent.py | 2 +- .../providers/wasabi.py | 2 +- .../providers/zoho.py | 2 +- cloudcheck_update/__init__.py | 6 +- pyproject.toml | 2 +- uv.lock | 2 +- 38 files changed, 212 insertions(+), 177 deletions(-) rename {cloudcheck_update => cloudcheck}/helpers.py (100%) rename {cloudcheck_update => cloudcheck}/providers/akamai.py (96%) rename {cloudcheck_update => cloudcheck}/providers/alibaba.py (84%) rename {cloudcheck_update => cloudcheck}/providers/amazon.py (96%) rename {cloudcheck_update => cloudcheck}/providers/arvancloud.py (91%) rename {cloudcheck_update => cloudcheck}/providers/azure.py (97%) rename {cloudcheck_update => cloudcheck}/providers/backblaze.py (84%) rename {cloudcheck_update => cloudcheck}/providers/base.py (100%) rename {cloudcheck_update => cloudcheck}/providers/cisco.py (97%) rename {cloudcheck_update => cloudcheck}/providers/cloudflare.py (96%) rename {cloudcheck_update => cloudcheck}/providers/cloudfront.py (90%) rename {cloudcheck_update => cloudcheck}/providers/dell.py (85%) rename {cloudcheck_update => cloudcheck}/providers/digitalocean.py (94%) rename {cloudcheck_update => cloudcheck}/providers/fastly.py (91%) rename {cloudcheck_update => cloudcheck}/providers/github.py (93%) rename {cloudcheck_update => cloudcheck}/providers/google.py (98%) rename {cloudcheck_update => cloudcheck}/providers/heroku.py (67%) rename {cloudcheck_update => cloudcheck}/providers/hetzner.py (91%) rename {cloudcheck_update => cloudcheck}/providers/hpe.py (88%) rename {cloudcheck_update => cloudcheck}/providers/huawei.py (92%) rename {cloudcheck_update => cloudcheck}/providers/ibm.py (98%) rename {cloudcheck_update => cloudcheck}/providers/imperva.py (92%) rename {cloudcheck_update => cloudcheck}/providers/kamatera.py (90%) rename {cloudcheck_update => cloudcheck}/providers/oracle.py (96%) rename {cloudcheck_update => cloudcheck}/providers/ovh.py (84%) rename {cloudcheck_update => cloudcheck}/providers/rackspace.py (94%) rename {cloudcheck_update => cloudcheck}/providers/salesforce.py (91%) rename {cloudcheck_update => cloudcheck}/providers/scaleway.py (88%) rename {cloudcheck_update => cloudcheck}/providers/tencent.py (91%) rename {cloudcheck_update => cloudcheck}/providers/wasabi.py (88%) rename {cloudcheck_update => cloudcheck}/providers/zoho.py (95%) diff --git a/Cargo.lock b/Cargo.lock index d9c2ed5..d419aee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,7 +65,7 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cloudcheck" -version = "8.3.0" +version = "8.4.0" dependencies = [ "openssl", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index 02fcc8f..958f2e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudcheck" -version = "8.3.0" +version = "8.4.0" edition = "2024" description = "CloudCheck is a simple Rust tool to check whether an IP address or hostname belongs to a cloud provider." license = "GPL-3.0" diff --git a/README.md b/README.md index b8a22b0..8a17524 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![Python Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/python-tests.yml/badge.svg?branch=master)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/python-tests.yml) [![Pipeline Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/pipeline-tests.yml/badge.svg?branch=master)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/pipeline-tests.yml) -### UPDATE: Now rewritten in Rust, with over 20 new providers added! +### UPDATE: Now rewritten in Rust, with [34 supported cloud providers](#supported-cloud-providers)! CloudCheck is a simple Rust tool to check whether an IP address or hostname belongs to a cloud provider. It includes: diff --git a/cloud_providers_v2.json b/cloud_providers_v2.json index 2669151..310692f 100644 --- a/cloud_providers_v2.json +++ b/cloud_providers_v2.json @@ -8,7 +8,7 @@ "ORG-OS3-RIPE" ], "v2fly_company": "", - "last_updated": 1765814227.684815, + "last_updated": 1765991171.3882864, "asns": [ 16276, 35540 @@ -50,9 +50,9 @@ "137.83.50.0/24", "138.249.2.0/24", "139.99.0.0/16", - "140.150.238.0/23", "141.11.39.0/24", "141.11.74.0/23", + "141.11.76.0/24", "141.227.128.0/21", "141.227.136.0/22", "141.227.140.0/24", @@ -193,7 +193,6 @@ "185.226.181.0/24", "185.228.207.0/24", "185.241.50.0/23", - "185.25.93.0/24", "185.255.28.0/24", "185.30.212.0/22", "185.45.160.0/22", @@ -230,7 +229,6 @@ "193.33.176.0/23", "193.43.104.0/24", "193.70.0.0/17", - "193.8.236.0/24", "194.147.159.0/24", "194.15.33.0/24", "194.156.227.0/24", @@ -283,6 +281,8 @@ "209.112.80.0/22", "209.126.71.0/24", "209.151.124.0/24", + "209.178.202.0/24", + "209.251.24.0/24", "209.71.36.0/24", "212.134.90.0/24", "212.192.253.0/24", @@ -376,12 +376,12 @@ "46.203.116.0/22", "46.203.128.0/22", "46.203.140.0/22", - "46.203.188.0/24", "46.236.211.0/24", "46.244.32.0/20", "46.28.236.0/24", "5.135.0.0/16", "5.144.182.0/24", + "5.175.168.0/24", "5.175.195.0/24", "5.178.106.0/24", "5.178.110.0/24", @@ -412,7 +412,6 @@ "57.131.0.0/17", "62.122.126.0/24", "62.141.62.0/24", - "62.72.191.0/24", "63.251.117.0/24", "64.225.244.0/23", "64.94.92.0/23", @@ -544,7 +543,7 @@ "SKYCA-3-ARIN" ], "v2fly_company": "fastly", - "last_updated": 1765814229.7153978, + "last_updated": 1765991173.7079117, "asns": [ 895, 54113, @@ -1597,7 +1596,7 @@ ], "org_ids": [], "v2fly_company": "heroku", - "last_updated": 1765814229.9473948, + "last_updated": 1765991173.992137, "asns": [], "cidrs": [], "domains": [ @@ -1639,7 +1638,7 @@ "WEX-ARIN" ], "v2fly_company": "cisco", - "last_updated": 1765814241.327556, + "last_updated": 1765991184.707938, "asns": [ 109, 1343, @@ -2444,7 +2443,7 @@ "GITHU-ARIN" ], "v2fly_company": "github", - "last_updated": 1765814242.6264145, + "last_updated": 1765991186.1348774, "asns": [ 36459 ], @@ -6787,7 +6786,7 @@ "ORG-SCG6-RIPE" ], "v2fly_company": "ibm", - "last_updated": 1765814261.2185678, + "last_updated": 1765991203.6873004, "asns": [ 163, 547, @@ -7229,8 +7228,6 @@ "67.228.0.0/16", "67.228.252.0/22", "69.57.140.0/22", - "74.52.0.0/14", - "74.55.0.0/16", "74.86.0.0/16", "75.126.0.0/16", "75.126.112.0/20", @@ -7284,7 +7281,7 @@ "IMPER-62-ARIN" ], "v2fly_company": "", - "last_updated": 1765814261.9391572, + "last_updated": 1765991204.40327, "asns": [ 62571 ], @@ -7330,7 +7327,7 @@ "ORG-HTB10-RIPE" ], "v2fly_company": "huawei", - "last_updated": 1765814264.6346545, + "last_updated": 1765991207.2331975, "asns": [ 131444, 136907, @@ -7344,6 +7341,7 @@ "cidrs": [ "1.178.32.0/19", "101.44.0.0/18", + "101.44.104.0/24", "101.44.144.0/20", "101.44.160.0/19", "101.44.173.0/24", @@ -7434,6 +7432,7 @@ "148.145.160.0/20", "148.145.192.0/19", "148.145.224.0/23", + "148.145.254.0/23", "149.232.128.0/19", "150.40.128.0/17", "154.194.39.0/24", @@ -7500,6 +7499,7 @@ "202.76.128.0/18", "203.123.80.0/20", "203.167.20.0/23", + "203.167.22.0/24", "212.34.192.0/19", "213.250.128.0/18", "219.83.0.0/19", @@ -7559,11 +7559,7 @@ "2405:f080:ec00::/39", "2405:f080:edff::/48", "27.106.0.0/17", - "27.255.0.0/19", - "27.255.32.0/22", - "27.255.38.0/23", - "27.255.40.0/21", - "27.255.48.0/20", + "27.255.0.0/18", "2801:80:e0::/48", "42.201.128.0/17", "43.225.140.0/22", @@ -7590,6 +7586,7 @@ "80.238.190.0/24", "80.238.192.0/18", "83.101.0.0/21", + "83.101.116.0/23", "83.101.16.0/20", "83.101.32.0/21", "83.101.48.0/21", @@ -7966,7 +7963,7 @@ "ORG-TCL14-AP-APNIC" ], "v2fly_company": "tencent", - "last_updated": 1765814266.397475, + "last_updated": 1765991209.0214534, "asns": [ 132203, 132591, @@ -8105,7 +8102,7 @@ "162.62.208.0/20", "162.62.224.0/20", "162.62.238.0/23", - "162.62.240.0/24", + "162.62.240.0/23", "162.62.242.0/24", "162.62.244.0/24", "162.62.246.0/24", @@ -8179,6 +8176,7 @@ "240d:c010:58::/48", "240d:c010:5c::/48", "240d:c010:68::/48", + "240d:c010:6f::/48", "240d:c040::/43", "43.128.0.0/17", "43.128.124.0/24", @@ -8197,14 +8195,12 @@ "43.129.154.0/23", "43.129.32.0/19", "43.130.0.0/17", - "43.130.112.0/24", "43.130.128.0/18", "43.130.19.0/24", "43.130.20.0/24", "43.130.224.0/19", "43.130.54.0/23", "43.130.63.0/24", - "43.130.85.0/24", "43.131.0.0/18", "43.131.20.0/23", "43.131.224.0/19", @@ -8252,8 +8248,6 @@ "43.153.0.0/16", "43.153.164.0/24", "43.153.187.0/24", - "43.153.238.0/24", - "43.153.240.0/24", "43.153.250.0/23", "43.154.0.0/15", "43.155.127.0/24", @@ -8292,7 +8286,6 @@ "43.162.128.0/24", "43.162.64.0/18", "43.163.140.0/24", - "43.163.175.0/24", "43.163.25.0/24", "43.164.0.0/18", "43.164.112.0/21", @@ -8590,7 +8583,7 @@ "SALESF-3-ARIN" ], "v2fly_company": "salesforce", - "last_updated": 1765814269.7548642, + "last_updated": 1765991212.0903027, "asns": [ 14340, 22606, @@ -8712,7 +8705,7 @@ "ZOHOC-ARIN" ], "v2fly_company": "zoho", - "last_updated": 1765814278.5039632, + "last_updated": 1765991216.259446, "asns": [ 2639, 56201, @@ -8782,6 +8775,7 @@ "193.118.160.0/23", "199.67.64.0/23", "199.67.69.0/24", + "199.67.70.0/24", "199.67.72.0/21", "199.67.74.0/24", "199.67.80.0/21", @@ -8841,7 +8835,7 @@ ], "org_ids": [], "v2fly_company": "", - "last_updated": 1765814280.1426654, + "last_updated": 1765991218.0236378, "asns": [], "cidrs": [ "108.138.0.0/15", @@ -9031,7 +9025,7 @@ "ORG-ATI1-AP-APNIC" ], "v2fly_company": "akamai", - "last_updated": 1765814292.6041684, + "last_updated": 1765991230.6682491, "asns": [ 12222, 16625, @@ -9481,7 +9475,7 @@ "104.84.228.0/22", "104.84.54.0/23", "104.84.56.0/22", - "104.85.0.0/19", + "104.85.16.0/20", "104.85.174.0/23", "104.85.224.0/20", "104.85.244.0/22", @@ -9489,6 +9483,7 @@ "104.85.252.0/22", "104.85.32.0/20", "104.85.48.0/21", + "104.85.8.0/21", "104.86.100.0/23", "104.86.144.0/21", "104.86.160.0/21", @@ -9782,10 +9777,7 @@ "172.224.18.0/23", "172.224.180.0/22", "172.224.184.0/21", - "172.224.193.0/24", - "172.224.194.0/23", - "172.224.196.0/22", - "172.224.200.0/21", + "172.224.192.0/20", "172.224.208.0/23", "172.224.210.0/24", "172.224.226.0/23", @@ -9934,7 +9926,7 @@ "172.226.156.0/24", "172.226.16.0/24", "172.226.160.0/24", - "172.226.162.0/24", + "172.226.162.0/23", "172.226.164.0/24", "172.226.166.0/23", "172.226.168.0/22", @@ -10528,10 +10520,7 @@ "2.17.203.0/24", "2.17.204.0/22", "2.17.208.0/20", - "2.17.240.0/21", - "2.17.248.0/23", - "2.17.251.0/24", - "2.17.252.0/22", + "2.17.240.0/20", "2.17.28.0/22", "2.17.32.0/21", "2.17.40.0/23", @@ -10881,6 +10870,8 @@ "209.200.144.0/21", "209.200.160.0/19", "209.200.168.0/21", + "210.130.210.0/24", + "210.130.224.0/24", "210.148.128.0/24", "210.148.130.0/24", "210.193.113.0/24", @@ -11886,7 +11877,7 @@ "23.36.204.0/22", "23.36.208.0/20", "23.36.224.0/20", - "23.36.240.0/21", + "23.36.240.0/22", "23.36.252.0/22", "23.36.32.0/19", "23.36.64.0/19", @@ -13479,8 +13470,7 @@ "2a02:26f0:118::/48", "2a02:26f0:11a::/48", "2a02:26f0:1200::/48", - "2a02:26f0:124::/47", - "2a02:26f0:126::/48", + "2a02:26f0:124::/46", "2a02:26f0:1280::/48", "2a02:26f0:12c::/48", "2a02:26f0:1380::/48", @@ -13931,7 +13921,7 @@ "2a02:26f7:bb81::/48", "2a02:26f7:bb84::/48", "2a02:26f7:bb88::/48", - "2a02:26f7:bb8c::/48", + "2a02:26f7:bb8c::/47", "2a02:26f7:bbc2::/48", "2a02:26f7:bbc4::/48", "2a02:26f7:bbc8::/48", @@ -15220,6 +15210,7 @@ "92.122.164.0/23", "92.122.166.0/24", "92.122.180.0/23", + "92.122.184.0/24", "92.122.186.0/24", "92.122.189.0/24", "92.122.191.0/24", @@ -15559,7 +15550,7 @@ "ORG-OSA29-RIPE" ], "v2fly_company": "oracle", - "last_updated": 1765814309.6776478, + "last_updated": 1765991246.0417256, "asns": [ 90, 792, @@ -16215,11 +16206,10 @@ "144.33.192.0/19", "144.33.32.0/20", "144.56.39.0/24", - "145.241.104.0/21", - "145.241.112.0/20", "145.241.144.0/20", "145.241.160.0/19", "145.241.192.0/18", + "145.241.96.0/19", "145.69.80.0/21", "146.235.0.0/18", "146.235.192.0/18", @@ -16621,8 +16611,13 @@ "170.114.96.0/24", "170.52.0.0/21", "170.9.0.0/18", + "170.9.100.0/23", + "170.9.104.0/21", + "170.9.112.0/21", "170.9.192.0/18", "170.9.64.0/19", + "170.9.96.0/22", + "170.9.96.0/22", "172.82.61.0/24", "173.199.10.0/23", "173.199.14.0/24", @@ -16681,6 +16676,13 @@ "192.22.176.0/23", "192.22.192.0/19", "192.22.224.0/20", + "192.22.224.0/26", + "192.22.224.128/25", + "192.22.225.192/26", + "192.22.226.0/23", + "192.22.228.0/22", + "192.22.232.0/22", + "192.22.236.128/25", "192.22.240.0/23", "192.22.32.0/20", "192.22.32.0/26", @@ -17346,6 +17348,15 @@ "2603:c064:2800::/44", "2603:c065::/36", "2603:c066::/35", + "2603:c068:1000::/39", + "2603:c068:1000::/44", + "2603:c068:2000::/40", + "2603:c068:2000::/44", + "2603:c068:2800::/40", + "2603:c068:2800::/44", + "2603:c068::/40", + "2603:c069::/36", + "2603:c06a::/35", "2603:c06c:1000::/39", "2603:c06c:1000::/44", "2603:c06c:2000::/40", @@ -17993,7 +18004,7 @@ "ORG-AI2-AP-APNIC" ], "v2fly_company": "amazon", - "last_updated": 1765814320.9190645, + "last_updated": 1765991257.102138, "asns": [ 699, 801, @@ -18540,11 +18551,6 @@ "108.157.27.0/24", "108.157.28.0/22", "108.157.32.0/21", - "108.157.42.0/23", - "108.157.44.0/22", - "108.157.48.0/22", - "108.157.52.0/23", - "108.157.54.0/24", "108.157.57.0/24", "108.157.58.0/23", "108.157.60.0/22", @@ -18617,10 +18623,6 @@ "108.158.72.0/21", "108.158.8.0/24", "108.158.80.0/22", - "108.158.86.0/23", - "108.158.88.0/21", - "108.158.96.0/23", - "108.158.98.0/24", "108.159.0.0/21", "108.159.10.0/23", "108.159.100.0/22", @@ -18651,6 +18653,9 @@ "108.159.40.0/21", "108.159.48.0/22", "108.159.52.0/24", + "108.159.55.0/24", + "108.159.56.0/21", + "108.159.64.0/22", "108.159.70.0/23", "108.159.72.0/21", "108.159.80.0/23", @@ -19352,7 +19357,9 @@ "13.33.96.0/21", "13.35.0.0/16", "13.35.104.0/24", - "13.35.120.0/21", + "13.35.121.0/24", + "13.35.122.0/23", + "13.35.124.0/22", "13.35.128.0/21", "13.35.136.0/24", "13.35.156.0/24", @@ -19480,7 +19487,7 @@ "130.12.159.0/24", "130.12.86.0/24", "130.137.112.0/24", - "130.137.121.0/24", + "130.137.124.0/24", "130.137.14.0/24", "130.137.150.0/24", "130.137.166.0/23", @@ -19494,7 +19501,6 @@ "130.137.253.0/24", "130.137.28.0/23", "130.137.82.0/24", - "130.137.86.0/24", "130.137.9.0/24", "130.150.200.0/21", "130.150.240.0/22", @@ -19873,6 +19879,11 @@ "143.192.50.0/23", "143.20.174.0/24", "143.204.0.0/16", + "143.204.105.0/24", + "143.204.106.0/24", + "143.204.109.0/24", + "143.204.110.0/23", + "143.204.112.0/21", "143.204.120.0/24", "143.204.128.0/21", "143.204.136.0/23", @@ -20123,7 +20134,7 @@ "15.158.0.0/21", "15.158.10.0/23", "15.158.100.0/24", - "15.158.102.0/23", + "15.158.102.0/24", "15.158.104.0/21", "15.158.112.0/20", "15.158.12.0/23", @@ -20160,7 +20171,7 @@ "15.158.236.0/24", "15.158.238.0/23", "15.158.24.0/23", - "15.158.241.0/24", + "15.158.240.0/23", "15.158.242.0/24", "15.158.249.0/24", "15.158.251.0/24", @@ -21021,9 +21032,7 @@ "16.12.48.0/21", "16.12.48.0/21", "16.12.56.0/23", - "16.12.60.0/22", "16.12.64.0/20", - "16.12.64.0/22", "16.12.72.0/23", "16.12.76.0/22", "16.12.80.0/22", @@ -22908,10 +22917,6 @@ "18.65.48.0/21", "18.65.56.0/23", "18.65.58.0/24", - "18.65.61.0/24", - "18.65.62.0/23", - "18.65.64.0/21", - "18.65.72.0/23", "18.65.76.0/22", "18.65.8.0/22", "18.65.80.0/21", @@ -25077,7 +25082,6 @@ "2406:daa0:7080::/44", "2406:daa0:7080::/44", "2406:daa0:70c0::/44", - "2406:daa0:70c0::/44", "2406:daa0:8020::/44", "2406:daa0:8020::/44", "2406:daa0:8080::/44", @@ -25528,7 +25532,6 @@ "2600:1fa0:81e0::/44", "2600:1fa0:a440::/44", "2600:1fa0:a480::/44", - "2600:1fa0:a480::/44", "2600:1fa0:a4c0::/44", "2600:1fa0:c020::/44", "2600:1fa0:c020::/44", @@ -25721,7 +25724,7 @@ "2600:9000:2085::/48", "2600:9000:2087::/48", "2600:9000:208a::/47", - "2600:9000:208d::/48", + "2600:9000:208c::/47", "2600:9000:208f::/48", "2600:9000:2090::/48", "2600:9000:2094::/47", @@ -25846,9 +25849,7 @@ "2600:9000:2370::/47", "2600:9000:2375::/48", "2600:9000:2376::/47", - "2600:9000:2378::/46", - "2600:9000:237d::/48", - "2600:9000:237e::/47", + "2600:9000:2378::/45", "2600:9000:238c::/46", "2600:9000:2393::/48", "2600:9000:2394::/46", @@ -26143,6 +26144,7 @@ "2600:9000:27fb::/48", "2600:9000:27fc::/48", "2600:9000:27fe::/47", + "2600:9000:2801::/48", "2600:9000:2802::/48", "2600:9000:2804::/47", "2600:9000:2807::/48", @@ -26293,6 +26295,7 @@ "2600:9000:294a::/48", "2600:9000:294c::/48", "2600:9000:294e::/47", + "2600:9000:2951::/48", "2600:9000:2954::/47", "2600:9000:2957::/48", "2600:9000:2958::/48", @@ -26514,7 +26517,7 @@ "2601:1904:118c::/47", "2601:1904:118e::/48", "2601:5000:400::/44", - "2601:6000:800::/48", + "2601:6000:800::/47", "2601:6000::/48", "2601:9201:13::/48", "2602:277:d02::/47", @@ -26694,22 +26697,20 @@ "2605:9cc0:2816::/48", "2605:9cc0:2825::/48", "2605:9cc0:378::/48", + "2605:9cc0:3a7::/48", + "2605:9cc0:3b3::/48", "2605:9cc0:3c2::/48", "2605:9cc0:3cc::/48", "2605:9cc0:40c::/48", "2605:9cc0:492::/47", "2605:9cc0::/46", - "2605:9cc0:c00::/48", "2605:9cc0:c02::/48", - "2605:9cc0:c06::/48", + "2605:9cc0:c06::/47", "2605:9cc0:c08::/46", "2605:9cc0:c0c::/48", "2605:9cc0:c10::/48", "2605:9cc0:c13::/48", - "2605:9cc0:c14::/48", "2605:9cc0:c16::/47", - "2605:9cc0:c19::/48", - "2605:9cc0:c1b::/48", "2605:9cc0:c1d::/48", "2605:9cc0:dba::/47", "2605:9cc0:f03e::/48", @@ -27270,7 +27271,6 @@ "2a05:d050:40c0::/44", "2a05:d050:5040::/44", "2a05:d050:5080::/44", - "2a05:d050:5080::/44", "2a05:d050:50c0::/44", "2a05:d050:6040::/44", "2a05:d050:6040::/44", @@ -27799,8 +27799,9 @@ "3.163.123.0/24", "3.163.124.0/22", "3.163.128.0/21", - "3.163.151.0/24", - "3.163.152.0/21", + "3.163.138.0/23", + "3.163.140.0/22", + "3.163.144.0/20", "3.163.160.0/24", "3.163.163.0/24", "3.163.164.0/22", @@ -28186,7 +28187,10 @@ "3.168.46.0/24", "3.168.48.0/21", "3.168.56.0/22", - "3.168.75.0/24", + "3.168.61.0/24", + "3.168.62.0/24", + "3.168.64.0/21", + "3.168.72.0/22", "3.168.77.0/24", "3.168.78.0/24", "3.168.8.0/22", @@ -28388,11 +28392,6 @@ "3.171.156.0/23", "3.171.158.0/24", "3.171.16.0/23", - "3.171.160.0/23", - "3.171.163.0/24", - "3.171.164.0/22", - "3.171.168.0/22", - "3.171.172.0/23", "3.171.174.0/24", "3.171.176.0/23", "3.171.179.0/24", @@ -29247,6 +29246,7 @@ "35.34.128.0/17", "35.34.80.0/20", "35.34.96.0/19", + "35.34.96.0/24", "35.35.0.0/16", "35.36.0.0/16", "35.41.0.0/16", @@ -29448,7 +29448,7 @@ "43.192.156.0/23", "43.192.160.0/22", "43.193.0.0/18", - "43.193.64.0/24", + "43.193.64.0/23", "43.194.0.0/20", "43.194.16.0/24", "43.195.0.0/20", @@ -29528,6 +29528,7 @@ "43.224.144.0/22", "43.224.76.0/22", "43.226.24.0/22", + "43.226.27.0/24", "43.230.24.0/23", "43.243.193.0/24", "43.243.40.0/22", @@ -29690,6 +29691,7 @@ "45.90.17.0/24", "45.91.255.0/24", "45.92.116.0/22", + "45.92.40.0/24", "45.95.209.0/24", "46.137.0.0/16", "46.137.0.0/16", @@ -30065,8 +30067,10 @@ "52.219.128.0/18", "52.219.128.0/21", "52.219.136.0/22", - "52.219.144.0/20", "52.219.144.0/22", + "52.219.144.0/22", + "52.219.148.0/23", + "52.219.152.0/21", "52.219.156.0/22", "52.219.16.0/22", "52.219.16.0/22", @@ -30087,11 +30091,10 @@ "52.219.208.0/21", "52.219.208.0/21", "52.219.216.0/22", - "52.219.216.0/23", "52.219.220.0/23", "52.219.220.0/23", "52.219.224.0/21", - "52.219.224.0/22", + "52.219.23.0/24", "52.219.232.0/22", "52.219.232.0/22", "52.219.24.0/21", @@ -30111,7 +30114,8 @@ "52.219.72.0/23", "52.219.80.0/20", "52.219.80.0/20", - "52.219.80.0/20", + "52.219.80.0/21", + "52.219.88.0/22", "52.219.96.0/19", "52.219.96.0/19", "52.219.96.0/20", @@ -30238,12 +30242,10 @@ "52.83.58.0/24", "52.84.0.0/14", "52.84.0.0/14", - "52.84.120.0/21", - "52.84.128.0/22", + "52.84.128.0/24", "52.84.134.0/23", "52.84.14.0/23", - "52.84.145.0/24", - "52.84.146.0/23", + "52.84.147.0/24", "52.84.148.0/22", "52.84.16.0/20", "52.84.164.0/22", @@ -30311,19 +30313,20 @@ "52.85.8.0/21", "52.85.88.0/22", "52.85.94.0/23", - "52.85.96.0/22", + "52.85.96.0/23", + "52.85.98.0/24", "52.88.0.0/13", "52.88.0.0/14", "52.92.0.0/16", "52.92.0.0/21", "52.92.0.0/21", "52.92.128.0/17", - "52.92.128.0/20", - "52.92.152.0/21", + "52.92.136.0/21", "52.92.16.0/21", - "52.92.176.0/20", + "52.92.176.0/21", "52.92.192.0/20", - "52.92.224.0/19", + "52.92.224.0/20", + "52.92.248.0/21", "52.92.32.0/21", "52.93.0.0/21", "52.93.100.0/23", @@ -30705,10 +30708,7 @@ "54.222.58.32/27", "54.222.64.0/21", "54.222.76.0/22", - "54.222.80.0/21", - "54.222.88.0/24", - "54.222.90.0/23", - "54.222.92.0/22", + "54.222.80.0/20", "54.222.96.0/21", "54.223.0.0/16", "54.224.0.0/11", @@ -30754,7 +30754,7 @@ "54.231.120.0/21", "54.231.120.0/21", "54.231.128.0/17", - "54.231.192.0/18", + "54.231.192.0/19", "54.231.34.0/23", "54.231.36.0/24", "54.231.40.0/21", @@ -31483,6 +31483,7 @@ "69.107.0.0/18", "69.107.10.0/24", "69.107.11.0/27", + "69.107.11.32/28", "69.107.3.176/28", "69.107.6.112/28", "69.107.6.160/28", @@ -32375,11 +32376,12 @@ "ORG-ASEP1-AP-APNIC" ], "v2fly_company": "alibaba", - "last_updated": 1765814321.7322977, + "last_updated": 1765991257.7272255, "asns": [ 134963 ], "cidrs": [ + "103.173.12.0/24", "103.206.40.0/22", "14.1.112.0/22", "14.1.115.0/24", @@ -32420,10 +32422,14 @@ "178.132.247.0/24", "198.11.144.0/24", "203.107.48.0/22", + "205.198.40.0/23", "205.198.43.0/24", + "209.146.118.0/24", "2401:8680:4004::/46", "2401:8680:4100::/48", "2401:8680:4102::/48", + "38.47.128.0/20", + "45.194.56.0/22", "47.236.216.0/22", "47.237.248.0/24", "47.238.24.0/22", @@ -32579,6 +32585,8 @@ "alizhaopin.com", "alog.umeng.com", "alog.umengcloud.com", + "alogs.umeng.com", + "alogus.umeng.com", "alyms.cn", "amap.com", "amapauto.com", @@ -32587,13 +32595,16 @@ "antfortune.com", "antgroup-inc.cn", "antgroup.com", + "ar.umeng.com", "asczwa.com", "asczxcefsv.com", "asmlink.cn", + "aspect-upush.umeng.com", "atanx.alicdn.com", "atanx2.alicdn.com", "atatech.org", "atm.youku.com", + "audid.umeng.com", "autonavi.com", "b2byao.com", "baichuan-sdk.alicdn.com", @@ -32604,10 +32615,13 @@ "cainiao.com", "cainiao.com.cn", "cainiaoyizhan.com", + "ccs.umeng.com", "cdngslb.com", "cheng.xin", "cibntv.net", "cloudeagle.cn", + "cnlogs.umeng.com", + "cnlogs.umengcloud.com", "cnzz.com", "cueme.cn", "damai.cn", @@ -32726,8 +32740,11 @@ "myquark.cn", "nbsdk-baichuan.alicdn.com", "nbsdk-baichuan.taobao.com", + "new-aaid.umeng.com", + "new-aaid.umeng.com.gds.alibabadns.com", "nic.xin", "npmmirror.com", + "oc.umeng.com", "optimus-ads.amap.com", "oss-ap-northeast-1.aliyuncs.com", "oss-ap-northeast-2.aliyuncs.com", @@ -32763,9 +32780,11 @@ "phpwind.com", "phpwind.net", "pl.youku.com", + "plbslog.umeng.com", "puata.info", "qingtingtrip.com", "quark.cn", + "resolve.umeng.com", "retcode.taobao.com", "rexpos.cn", "s-adashx.ut.youku.com", @@ -32809,6 +32828,8 @@ "uc123.com", "ucweb.com", "uczzd.cn", + "ulogs.umeng.com", + "ulogs.umengcloud.com", "umeng.com", "umengcloud.com", "umsns.com", @@ -32860,7 +32881,7 @@ "ORG-HOA1-RIPE" ], "v2fly_company": "hetzner", - "last_updated": 1765814323.0426035, + "last_updated": 1765991259.0301955, "asns": [ 24940, 212317, @@ -33045,7 +33066,7 @@ "ORG-GSPL5-AP-APNIC" ], "v2fly_company": "google", - "last_updated": 1765814335.205132, + "last_updated": 1765991271.1985247, "asns": [ 6432, 13949, @@ -33142,7 +33163,6 @@ "104.134.146.0/23", "104.134.150.0/24", "104.134.152.0/23", - "104.134.154.0/24", "104.134.156.0/23", "104.134.158.0/24", "104.134.160.0/22", @@ -33669,6 +33689,7 @@ "172.253.132.0/24", "172.253.134.0/23", "172.253.136.0/22", + "172.253.140.0/24", "172.253.144.0/24", "172.253.16.0/20", "172.253.16.0/21", @@ -35213,7 +35234,6 @@ "foofle.com", "froogle.com", "fuchsia.dev", - "fundingchoicesmessages.google.com", "g-tun.com", "g.cn", "g.co", @@ -36061,7 +36081,7 @@ "BACKB-7-ARIN" ], "v2fly_company": "", - "last_updated": 1765814336.0700102, + "last_updated": 1765991271.7985086, "asns": [ 40401, 396865 @@ -36113,7 +36133,7 @@ "RACKS-8-ARIN" ], "v2fly_company": "", - "last_updated": 1765814341.212831, + "last_updated": 1765991276.4019706, "asns": [ 10532, 12200, @@ -36356,7 +36376,7 @@ "DO-13-ARIN" ], "v2fly_company": "digitalocean", - "last_updated": 1765814343.0642195, + "last_updated": 1765991278.2486658, "asns": [ 14061, 46652, @@ -36661,7 +36681,7 @@ "ORG-CSL5-AP-APNIC" ], "v2fly_company": "cloudflare", - "last_updated": 1765814347.4224236, + "last_updated": 1765991282.9378119, "asns": [ 13335, 14789, @@ -36929,8 +36949,14 @@ "162.120.94.0/24", "162.158.0.0/15", "162.158.0.0/20", - "162.158.128.0/17", + "162.158.128.0/22", + "162.158.132.0/23", + "162.158.134.0/24", + "162.158.136.0/21", + "162.158.144.0/20", "162.158.16.0/21", + "162.158.160.0/19", + "162.158.192.0/18", "162.158.20.0/22", "162.158.226.0/23", "162.158.24.0/23", @@ -37070,7 +37096,11 @@ "172.68.24.0/22", "172.68.28.0/24", "172.68.30.0/23", - "172.68.32.0/19", + "172.68.32.0/21", + "172.68.40.0/22", + "172.68.44.0/23", + "172.68.46.0/24", + "172.68.48.0/20", "172.68.64.0/20", "172.68.81.0/24", "172.68.82.0/23", @@ -37108,12 +37138,8 @@ "172.69.211.0/24", "172.69.212.0/22", "172.69.216.0/21", - "172.69.224.0/20", + "172.69.224.0/19", "172.69.24.0/21", - "172.69.241.0/24", - "172.69.242.0/23", - "172.69.244.0/22", - "172.69.248.0/21", "172.69.32.0/21", "172.69.40.0/22", "172.69.45.0/24", @@ -37161,10 +37187,13 @@ "172.70.62.0/23", "172.70.64.0/21", "172.70.80.0/20", - "172.71.0.0/18", + "172.71.0.0/21", "172.71.108.0/22", "172.71.112.0/20", + "172.71.12.0/23", "172.71.128.0/18", + "172.71.15.0/24", + "172.71.16.0/20", "172.71.192.0/21", "172.71.200.0/24", "172.71.203.0/24", @@ -37177,7 +37206,9 @@ "172.71.248.0/24", "172.71.253.0/24", "172.71.254.0/23", + "172.71.32.0/19", "172.71.64.0/19", + "172.71.8.0/22", "172.71.96.0/21", "172.83.72.0/23", "172.83.76.0/24", @@ -37199,6 +37230,7 @@ "184.174.80.0/24", "185.122.0.0/24", "185.126.66.0/24", + "185.132.85.0/24", "185.132.86.0/23", "185.133.172.0/24", "185.135.9.0/24", @@ -37225,7 +37257,6 @@ "185.29.76.0/24", "185.38.135.0/24", "185.38.25.0/24", - "185.59.218.0/24", "185.7.190.0/23", "185.7.240.0/24", "188.114.100.0/24", @@ -37619,7 +37650,7 @@ "2400:cb00:512::/47", "2400:cb00:515::/48", "2400:cb00:516::/47", - "2400:cb00:518::/47", + "2400:cb00:518::/48", "2400:cb00:520::/46", "2400:cb00:524::/47", "2400:cb00:526::/48", @@ -37671,7 +37702,7 @@ "2400:cb00:648::/47", "2400:cb00:64::/46", "2400:cb00:650::/46", - "2400:cb00:655::/48", + "2400:cb00:654::/47", "2400:cb00:657::/48", "2400:cb00:658::/47", "2400:cb00:661::/48", @@ -37898,11 +37929,10 @@ "2400:cb00:a501::/48", "2400:cb00:a502::/47", "2400:cb00:a504::/48", - "2400:cb00:a511::/48", "2400:cb00:a512::/47", "2400:cb00:a514::/48", "2400:cb00:a531::/48", - "2400:cb00:a532::/47", + "2400:cb00:a532::/48", "2400:cb00:a541::/48", "2400:cb00:a542::/48", "2400:cb00:a551::/48", @@ -38660,7 +38690,7 @@ "2400:cb00:e222::/47", "2400:cb00:e224::/48", "2400:cb00:e6a1::/48", - "2400:cb00:e6a2::/47", + "2400:cb00:e6a2::/48", "2400:cb00:e6b1::/48", "2400:cb00:e6b2::/47", "2400:cb00:e6b4::/46", @@ -38887,9 +38917,12 @@ "2a06:98c0:1c80::/46", "2a06:98c0:1c84::/47", "2a06:98c0:1c86::/48", + "2a06:98c0:1c88::/47", "2a06:98c0:1c8d::/48", "2a06:98c0:1c8e::/47", "2a06:98c0:1c90::/44", + "2a06:98c0:1c90::/47", + "2a06:98c0:1c93::/48", "2a06:98c0:3600::/46", "2a06:98c0:3605::/48", "2a06:98c0:3606::/47", @@ -39434,7 +39467,7 @@ "ORG-MSPL4-AP-APNIC" ], "v2fly_company": "azure", - "last_updated": 1765814364.4369142, + "last_updated": 1765991298.3605773, "asns": [ 3598, 5761, @@ -40004,6 +40037,7 @@ "158.23.0.0/16", "158.24.0.0/16", "158.53.0.0/16", + "158.58.136.0/21", "158.86.31.0/24", "158.86.95.0/24", "159.105.18.0/24", @@ -42114,7 +42148,7 @@ "ORG-AGTL2-RIPE" ], "v2fly_company": "", - "last_updated": 1765814365.7989786, + "last_updated": 1765991299.6154938, "asns": [ 57568, 208006, @@ -42156,7 +42190,7 @@ "DCC-25-ARIN" ], "v2fly_company": "dell", - "last_updated": 1765814369.4776132, + "last_updated": 1765991303.1708388, "asns": [ 3612, 3613, @@ -42530,7 +42564,7 @@ "ORG-WTI2-AP-APNIC" ], "v2fly_company": "", - "last_updated": 1765814370.3297174, + "last_updated": 1765991304.1284807, "asns": [ 140642, 395717 @@ -42573,7 +42607,7 @@ "ORG-KI4-AP-APNIC" ], "v2fly_company": "", - "last_updated": 1765814372.692666, + "last_updated": 1765991306.5651574, "asns": [ 36007, 41436, @@ -42731,6 +42765,7 @@ "78.138.31.0/24", "78.138.46.0/24", "78.138.51.0/24", + "79.108.224.0/24", "81.28.4.0/23", "81.28.6.0/24", "83.229.112.0/24", @@ -42763,7 +42798,7 @@ "HPE-15-ARIN" ], "v2fly_company": "hpe", - "last_updated": 1765814377.0155542, + "last_updated": 1765991311.3164923, "asns": [ 157, 1033, @@ -42856,8 +42891,8 @@ "ORG-TT1-RIPE", "SUC-48-ARIN" ], - "v2fly_company": "scaleway", - "last_updated": 1765814378.610059, + "v2fly_company": "", + "last_updated": 1765991312.4961538, "asns": [ 12876, 29447, diff --git a/cloudcheck_update/helpers.py b/cloudcheck/helpers.py similarity index 100% rename from cloudcheck_update/helpers.py rename to cloudcheck/helpers.py diff --git a/cloudcheck_update/providers/akamai.py b/cloudcheck/providers/akamai.py similarity index 96% rename from cloudcheck_update/providers/akamai.py rename to cloudcheck/providers/akamai.py index 34f7be9..7d89d8e 100644 --- a/cloudcheck_update/providers/akamai.py +++ b/cloudcheck/providers/akamai.py @@ -1,6 +1,6 @@ import io import zipfile -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/alibaba.py b/cloudcheck/providers/alibaba.py similarity index 84% rename from cloudcheck_update/providers/alibaba.py rename to cloudcheck/providers/alibaba.py index 61e7aad..6c85567 100644 --- a/cloudcheck_update/providers/alibaba.py +++ b/cloudcheck/providers/alibaba.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/amazon.py b/cloudcheck/providers/amazon.py similarity index 96% rename from cloudcheck_update/providers/amazon.py rename to cloudcheck/providers/amazon.py index 7e071fc..ef0cb66 100644 --- a/cloudcheck_update/providers/amazon.py +++ b/cloudcheck/providers/amazon.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List, Dict diff --git a/cloudcheck_update/providers/arvancloud.py b/cloudcheck/providers/arvancloud.py similarity index 91% rename from cloudcheck_update/providers/arvancloud.py rename to cloudcheck/providers/arvancloud.py index 22c4695..c70be44 100644 --- a/cloudcheck_update/providers/arvancloud.py +++ b/cloudcheck/providers/arvancloud.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/azure.py b/cloudcheck/providers/azure.py similarity index 97% rename from cloudcheck_update/providers/azure.py rename to cloudcheck/providers/azure.py index 3e9ea2f..ebe4abe 100644 --- a/cloudcheck_update/providers/azure.py +++ b/cloudcheck/providers/azure.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List, Dict diff --git a/cloudcheck_update/providers/backblaze.py b/cloudcheck/providers/backblaze.py similarity index 84% rename from cloudcheck_update/providers/backblaze.py rename to cloudcheck/providers/backblaze.py index 6d8943a..7e3e159 100644 --- a/cloudcheck_update/providers/backblaze.py +++ b/cloudcheck/providers/backblaze.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/base.py b/cloudcheck/providers/base.py similarity index 100% rename from cloudcheck_update/providers/base.py rename to cloudcheck/providers/base.py diff --git a/cloudcheck_update/providers/cisco.py b/cloudcheck/providers/cisco.py similarity index 97% rename from cloudcheck_update/providers/cisco.py rename to cloudcheck/providers/cisco.py index e565e22..dc7e72d 100644 --- a/cloudcheck_update/providers/cisco.py +++ b/cloudcheck/providers/cisco.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/cloudflare.py b/cloudcheck/providers/cloudflare.py similarity index 96% rename from cloudcheck_update/providers/cloudflare.py rename to cloudcheck/providers/cloudflare.py index 07d6c49..eaa4cce 100644 --- a/cloudcheck_update/providers/cloudflare.py +++ b/cloudcheck/providers/cloudflare.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List, Dict diff --git a/cloudcheck_update/providers/cloudfront.py b/cloudcheck/providers/cloudfront.py similarity index 90% rename from cloudcheck_update/providers/cloudfront.py rename to cloudcheck/providers/cloudfront.py index 072d88a..8fc7c26 100644 --- a/cloudcheck_update/providers/cloudfront.py +++ b/cloudcheck/providers/cloudfront.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/dell.py b/cloudcheck/providers/dell.py similarity index 85% rename from cloudcheck_update/providers/dell.py rename to cloudcheck/providers/dell.py index 82a5ddc..cab7621 100644 --- a/cloudcheck_update/providers/dell.py +++ b/cloudcheck/providers/dell.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/digitalocean.py b/cloudcheck/providers/digitalocean.py similarity index 94% rename from cloudcheck_update/providers/digitalocean.py rename to cloudcheck/providers/digitalocean.py index fc4e2e7..5795e13 100644 --- a/cloudcheck_update/providers/digitalocean.py +++ b/cloudcheck/providers/digitalocean.py @@ -1,5 +1,5 @@ import csv -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List, Dict diff --git a/cloudcheck_update/providers/fastly.py b/cloudcheck/providers/fastly.py similarity index 91% rename from cloudcheck_update/providers/fastly.py rename to cloudcheck/providers/fastly.py index 2681af2..f4a9f56 100644 --- a/cloudcheck_update/providers/fastly.py +++ b/cloudcheck/providers/fastly.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/github.py b/cloudcheck/providers/github.py similarity index 93% rename from cloudcheck_update/providers/github.py rename to cloudcheck/providers/github.py index 9cb0e1d..8840300 100644 --- a/cloudcheck_update/providers/github.py +++ b/cloudcheck/providers/github.py @@ -1,5 +1,5 @@ import ipaddress -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/google.py b/cloudcheck/providers/google.py similarity index 98% rename from cloudcheck_update/providers/google.py rename to cloudcheck/providers/google.py index a9037fe..ad73585 100644 --- a/cloudcheck_update/providers/google.py +++ b/cloudcheck/providers/google.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List, Dict diff --git a/cloudcheck_update/providers/heroku.py b/cloudcheck/providers/heroku.py similarity index 67% rename from cloudcheck_update/providers/heroku.py rename to cloudcheck/providers/heroku.py index 00e0931..ac6dde9 100644 --- a/cloudcheck_update/providers/heroku.py +++ b/cloudcheck/providers/heroku.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/hetzner.py b/cloudcheck/providers/hetzner.py similarity index 91% rename from cloudcheck_update/providers/hetzner.py rename to cloudcheck/providers/hetzner.py index 27e2217..21d7af2 100644 --- a/cloudcheck_update/providers/hetzner.py +++ b/cloudcheck/providers/hetzner.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List, Dict diff --git a/cloudcheck_update/providers/hpe.py b/cloudcheck/providers/hpe.py similarity index 88% rename from cloudcheck_update/providers/hpe.py rename to cloudcheck/providers/hpe.py index 3030f53..a978042 100644 --- a/cloudcheck_update/providers/hpe.py +++ b/cloudcheck/providers/hpe.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/huawei.py b/cloudcheck/providers/huawei.py similarity index 92% rename from cloudcheck_update/providers/huawei.py rename to cloudcheck/providers/huawei.py index 2f55b4d..247002b 100644 --- a/cloudcheck_update/providers/huawei.py +++ b/cloudcheck/providers/huawei.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/ibm.py b/cloudcheck/providers/ibm.py similarity index 98% rename from cloudcheck_update/providers/ibm.py rename to cloudcheck/providers/ibm.py index 8b2a705..b1bc38f 100644 --- a/cloudcheck_update/providers/ibm.py +++ b/cloudcheck/providers/ibm.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/imperva.py b/cloudcheck/providers/imperva.py similarity index 92% rename from cloudcheck_update/providers/imperva.py rename to cloudcheck/providers/imperva.py index 092aa34..7ca2427 100644 --- a/cloudcheck_update/providers/imperva.py +++ b/cloudcheck/providers/imperva.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/kamatera.py b/cloudcheck/providers/kamatera.py similarity index 90% rename from cloudcheck_update/providers/kamatera.py rename to cloudcheck/providers/kamatera.py index 02a1ac9..ae519cc 100644 --- a/cloudcheck_update/providers/kamatera.py +++ b/cloudcheck/providers/kamatera.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/oracle.py b/cloudcheck/providers/oracle.py similarity index 96% rename from cloudcheck_update/providers/oracle.py rename to cloudcheck/providers/oracle.py index ea583e1..d013c53 100644 --- a/cloudcheck_update/providers/oracle.py +++ b/cloudcheck/providers/oracle.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/ovh.py b/cloudcheck/providers/ovh.py similarity index 84% rename from cloudcheck_update/providers/ovh.py rename to cloudcheck/providers/ovh.py index 750a0ac..eed664f 100644 --- a/cloudcheck_update/providers/ovh.py +++ b/cloudcheck/providers/ovh.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/rackspace.py b/cloudcheck/providers/rackspace.py similarity index 94% rename from cloudcheck_update/providers/rackspace.py rename to cloudcheck/providers/rackspace.py index f9641be..59d5ddd 100644 --- a/cloudcheck_update/providers/rackspace.py +++ b/cloudcheck/providers/rackspace.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/salesforce.py b/cloudcheck/providers/salesforce.py similarity index 91% rename from cloudcheck_update/providers/salesforce.py rename to cloudcheck/providers/salesforce.py index 7d28dd4..fd8f432 100644 --- a/cloudcheck_update/providers/salesforce.py +++ b/cloudcheck/providers/salesforce.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/scaleway.py b/cloudcheck/providers/scaleway.py similarity index 88% rename from cloudcheck_update/providers/scaleway.py rename to cloudcheck/providers/scaleway.py index 2c23673..45b050e 100644 --- a/cloudcheck_update/providers/scaleway.py +++ b/cloudcheck/providers/scaleway.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/tencent.py b/cloudcheck/providers/tencent.py similarity index 91% rename from cloudcheck_update/providers/tencent.py rename to cloudcheck/providers/tencent.py index 880ba7c..7ed16a1 100644 --- a/cloudcheck_update/providers/tencent.py +++ b/cloudcheck/providers/tencent.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/wasabi.py b/cloudcheck/providers/wasabi.py similarity index 88% rename from cloudcheck_update/providers/wasabi.py rename to cloudcheck/providers/wasabi.py index e885900..1fffab0 100644 --- a/cloudcheck_update/providers/wasabi.py +++ b/cloudcheck/providers/wasabi.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/providers/zoho.py b/cloudcheck/providers/zoho.py similarity index 95% rename from cloudcheck_update/providers/zoho.py rename to cloudcheck/providers/zoho.py index d52d0b9..22a7e78 100644 --- a/cloudcheck_update/providers/zoho.py +++ b/cloudcheck/providers/zoho.py @@ -1,4 +1,4 @@ -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider from typing import List diff --git a/cloudcheck_update/__init__.py b/cloudcheck_update/__init__.py index c789fa8..b0f70bd 100644 --- a/cloudcheck_update/__init__.py +++ b/cloudcheck_update/__init__.py @@ -5,7 +5,7 @@ from pathlib import Path from typing import Dict, Type -from cloudcheck_update.providers.base import BaseProvider +from cloudcheck.providers.base import BaseProvider # Set up logging logging.basicConfig(level=logging.INFO) @@ -24,14 +24,14 @@ def load_provider_classes() -> Dict[str, Type[BaseProvider]]: if _provider_classes: return _provider_classes - providers_path = Path(__file__).parent / "providers" + providers_path = Path(__file__).parent.parent / "cloudcheck" / "providers" for file in providers_path.glob("*.py"): if file.stem in ("base", "__init__"): continue try: - import_path = f"cloudcheck_update.providers.{file.stem}" + import_path = f"cloudcheck.providers.{file.stem}" module = importlib.import_module(import_path) # Look for classes that inherit from BaseProvider diff --git a/pyproject.toml b/pyproject.toml index 7655952..9720664 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "cloudcheck" -version = "8.3.0" +version = "8.4.0" description = "Detailed database of cloud providers. Instantly look up a domain or IP address" readme = "README.md" requires-python = ">=3.9" diff --git a/uv.lock b/uv.lock index 1a5a1ec..0680fcd 100644 --- a/uv.lock +++ b/uv.lock @@ -140,7 +140,7 @@ wheels = [ [[package]] name = "cloudcheck" -version = "8.3.0" +version = "8.4.0" source = { editable = "." } [package.dev-dependencies] From 8952c7aa1390ff93bf5f1215b947081d10238499 Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Wed, 17 Dec 2025 12:13:33 -0500 Subject: [PATCH 4/8] undo regex helpers in rust --- src/lib.rs | 148 +------------------------------------------------- src/python.rs | 22 -------- 2 files changed, 1 insertion(+), 169 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4ee580b..1f38b67 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,20 +1,16 @@ use radixtarget::{RadixTarget, ScopeMode}; -use regex::Regex; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::path::PathBuf; use std::sync::Arc; use std::time::{Duration, SystemTime}; -use tokio::sync::{Mutex, OnceCell}; +use tokio::sync::OnceCell; #[cfg(feature = "py")] mod python; const CLOUDCHECK_SIGNATURE_URL: &str = "https://raw.githubusercontent.com/blacklanternsecurity/cloudcheck/refs/heads/stable/cloud_providers_v2.json"; -type RegexPatternsMap = HashMap>>; -type RegexPatterns = Arc>; - #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CloudProvider { pub name: String, @@ -27,16 +23,12 @@ struct ProviderData { tags: Vec, cidrs: Vec, domains: Vec, - #[serde(default)] - regexes: HashMap>, } #[derive(Clone)] pub struct CloudCheck { radix: Arc>, providers: Arc>>>, - regex_patterns: RegexPatterns, - regex_cache: Arc>>>, } impl Default for CloudCheck { @@ -50,8 +42,6 @@ impl CloudCheck { CloudCheck { radix: Arc::new(OnceCell::new()), providers: Arc::new(OnceCell::new()), - regex_patterns: Arc::new(OnceCell::new()), - regex_cache: Arc::new(Mutex::new(HashMap::new())), } } @@ -87,7 +77,6 @@ impl CloudCheck { async fn ensure_loaded(&self) -> Result<(), Box> { let radix_cell = Arc::clone(&self.radix); let providers_cell = Arc::clone(&self.providers); - let regex_patterns_cell = Arc::clone(&self.regex_patterns); radix_cell .get_or_try_init(|| async { @@ -117,7 +106,6 @@ impl CloudCheck { let mut radix = RadixTarget::new(&[], ScopeMode::Normal)?; let mut providers_map: HashMap> = HashMap::new(); - let mut regex_patterns_map: RegexPatternsMap = HashMap::new(); for (_, provider) in providers_data { let cloud_provider = CloudProvider { @@ -167,21 +155,12 @@ impl CloudCheck { .or_default() .push(cloud_provider.clone()); } - - // Store regex patterns per provider - if !provider.regexes.is_empty() { - regex_patterns_map.insert(provider.name.clone(), provider.regexes); - } } providers_cell .set(providers_map) .map_err(|_| "Failed to set providers")?; - regex_patterns_cell - .set(regex_patterns_map) - .map_err(|_| "Failed to set regex patterns")?; - Ok::>(radix) }) .await?; @@ -204,68 +183,6 @@ impl CloudCheck { Ok(Vec::new()) } } - - pub async fn regex_match( - &self, - provider_name: &str, - regex_name: &str, - text: &str, - ) -> Result> { - self.ensure_loaded().await?; - - let regex_patterns = self.regex_patterns.get().unwrap(); - let provider_regexes = match regex_patterns.get(provider_name) { - Some(regexes) => regexes, - None => return Err(format!("Provider '{}' not found", provider_name).into()), - }; - - let patterns = match provider_regexes.get(regex_name) { - Some(patterns) => patterns, - None => { - return Err(format!( - "Regex '{}' not found for provider '{}'", - regex_name, provider_name - ) - .into()); - } - }; - - let cache_key = format!("{}:{}", provider_name, regex_name); - let mut cache = self.regex_cache.lock().await; - - // Check if we already have compiled regexes for this provider:regex_name combination - if !cache.contains_key(&cache_key) { - // Compile all patterns for this regex name - let mut compiled = Vec::new(); - for pattern in patterns { - match Regex::new(pattern) { - Ok(re) => compiled.push(re), - Err(e) => { - eprintln!( - "Error compiling regex pattern '{}' for provider '{}' regex '{}': {}", - pattern, provider_name, regex_name, e - ); - continue; - } - } - } - cache.insert(cache_key.clone(), compiled); - } - - // Check if any regex matches the entire string - if let Some(compiled_regexes) = cache.get(&cache_key) { - for re in compiled_regexes { - if let Some(mat) = re.find(text) { - // Check if the match spans the entire string - if mat.start() == 0 && mat.end() == text.len() { - return Ok(true); - } - } - } - } - - Ok(false) - } } #[cfg(test)] @@ -295,67 +212,4 @@ mod tests { names ); } - - #[tokio::test] - async fn test_regex_match_amazon_valid() { - let cloudcheck = CloudCheck::new(); - // Test valid bucket name that matches Amazon's STORAGE_BUCKET_NAME pattern - let result = cloudcheck - .regex_match("Amazon", "STORAGE_BUCKET_NAME", "my-bucket-123") - .await - .unwrap(); - assert!( - result, - "Expected 'my-bucket-123' to match Amazon STORAGE_BUCKET_NAME" - ); - } - - #[tokio::test] - async fn test_regex_match_amazon_invalid() { - let cloudcheck = CloudCheck::new(); - // Test invalid bucket name (too short and contains invalid characters) - let result = cloudcheck - .regex_match("Amazon", "STORAGE_BUCKET_NAME", "AB") - .await - .unwrap(); - assert!( - !result, - "Expected 'AB' to not match Amazon STORAGE_BUCKET_NAME" - ); - } - - #[tokio::test] - async fn test_regex_match_nonexistent_provider() { - let cloudcheck = CloudCheck::new(); - // Test with a provider that doesn't exist - let result = cloudcheck - .regex_match("NonExistentProvider", "STORAGE_BUCKET_NAME", "my-bucket") - .await; - assert!(result.is_err(), "Expected error for non-existent provider"); - assert!( - result - .unwrap_err() - .to_string() - .contains("Provider 'NonExistentProvider' not found") - ); - } - - #[tokio::test] - async fn test_regex_match_nonexistent_regex() { - let cloudcheck = CloudCheck::new(); - // Test with a real provider but non-existent regex name - let result = cloudcheck - .regex_match("Amazon", "NON_EXISTENT_REGEX", "my-bucket") - .await; - assert!( - result.is_err(), - "Expected error for non-existent regex name on real provider" - ); - assert!( - result - .unwrap_err() - .to_string() - .contains("Regex 'NON_EXISTENT_REGEX' not found for provider 'Amazon'") - ); - } } diff --git a/src/python.rs b/src/python.rs index d0ca3ed..af839ac 100644 --- a/src/python.rs +++ b/src/python.rs @@ -44,26 +44,4 @@ impl CloudCheck { } }) } - - fn regex_match<'py>( - &self, - py: Python<'py>, - provider_name: &str, - regex_name: &str, - text: &str, - ) -> PyResult> { - let inner = self.inner.clone(); - let provider_name = provider_name.to_string(); - let regex_name = regex_name.to_string(); - let text = text.to_string(); - pyo3_async_runtimes::tokio::future_into_py(py, async move { - match inner.regex_match(&provider_name, ®ex_name, &text).await { - Ok(matched) => Ok(matched), - Err(e) => Err(PyErr::new::(format!( - "CloudCheck error: {}", - e - ))), - } - }) - } } From e676fdaefbc35326faf4eeef582fa5a884cc4b34 Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Wed, 17 Dec 2025 12:17:23 -0500 Subject: [PATCH 5/8] fix tests --- cloudcheck_update/test_cloudcheck_update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudcheck_update/test_cloudcheck_update.py b/cloudcheck_update/test_cloudcheck_update.py index ca37cf0..fbf5408 100644 --- a/cloudcheck_update/test_cloudcheck_update.py +++ b/cloudcheck_update/test_cloudcheck_update.py @@ -9,8 +9,8 @@ # Add the current directory to Python path sys.path.insert(0, str(Path(__file__).parent)) -from cloudcheck_update.providers.amazon import Amazon -from cloudcheck_update.helpers import defrag_cidrs, cidrs_to_strings, strings_to_cidrs +from cloudcheck.providers.amazon import Amazon +from cloudcheck.helpers import defrag_cidrs, cidrs_to_strings, strings_to_cidrs def test_v2fly_domains(): From e8ab8432b58457c6f19430ffe7eb3c0c3b0f1966 Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Wed, 17 Dec 2025 12:22:58 -0500 Subject: [PATCH 6/8] no regex tests --- test_cloudcheck.py | 60 ---------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 test_cloudcheck.py diff --git a/test_cloudcheck.py b/test_cloudcheck.py deleted file mode 100644 index 25aca7b..0000000 --- a/test_cloudcheck.py +++ /dev/null @@ -1,60 +0,0 @@ -import pytest -from cloudcheck import CloudCheck - - -@pytest.mark.asyncio -async def test_lookup_google_dns(): - cloudcheck = CloudCheck() - results = await cloudcheck.lookup("8.8.8.8") - names = [provider["name"] for provider in results] - assert "Google" in names, f"Expected Google in results: {names}" - - -@pytest.mark.asyncio -async def test_lookup_amazon_domain(): - cloudcheck = CloudCheck() - results = await cloudcheck.lookup("asdf.amazon.com") - names = [provider["name"] for provider in results] - assert "Amazon" in names, f"Expected Amazon in results: {names}" - - -@pytest.mark.asyncio -async def test_regex_match_amazon_valid(): - cloudcheck = CloudCheck() - # Test valid bucket name that matches Amazon's STORAGE_BUCKET_NAME pattern - result = await cloudcheck.regex_match( - "Amazon", "STORAGE_BUCKET_NAME", "my-bucket-123" - ) - assert result is True, ( - "Expected 'my-bucket-123' to match Amazon STORAGE_BUCKET_NAME" - ) - - -@pytest.mark.asyncio -async def test_regex_match_amazon_invalid(): - cloudcheck = CloudCheck() - # Test invalid bucket name (too short and contains invalid characters) - result = await cloudcheck.regex_match("Amazon", "STORAGE_BUCKET_NAME", "#my-bucket") - assert result is False, ( - "Expected '#my-bucket' to not match Amazon STORAGE_BUCKET_NAME" - ) - - -@pytest.mark.asyncio -async def test_regex_match_nonexistent_provider(): - cloudcheck = CloudCheck() - # Test with a provider that doesn't exist - with pytest.raises(ValueError, match="Provider 'NonExistentProvider' not found"): - await cloudcheck.regex_match( - "NonExistentProvider", "STORAGE_BUCKET_NAME", "my-bucket" - ) - - -@pytest.mark.asyncio -async def test_regex_match_nonexistent_regex(): - cloudcheck = CloudCheck() - # Test with a real provider but non-existent regex name - with pytest.raises( - ValueError, match="Regex 'NON_EXISTENT_REGEX' not found for provider 'Amazon'" - ): - await cloudcheck.regex_match("Amazon", "NON_EXISTENT_REGEX", "my-bucket") From 77fe76ae68f80b2c1e309f3c064b8bfd35ae094e Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Wed, 17 Dec 2025 12:30:39 -0500 Subject: [PATCH 7/8] fix tests --- test_cloudcheck.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test_cloudcheck.py diff --git a/test_cloudcheck.py b/test_cloudcheck.py new file mode 100644 index 0000000..a2c3968 --- /dev/null +++ b/test_cloudcheck.py @@ -0,0 +1,24 @@ +import pytest +from cloudcheck import CloudCheck + + +@pytest.mark.asyncio +async def test_lookup_google_dns(): + cloudcheck = CloudCheck() + results = await cloudcheck.lookup("8.8.8.8") + names = [provider["name"] for provider in results] + assert "Google" in names, f"Expected Google in results: {names}" + + +@pytest.mark.asyncio +async def test_lookup_amazon_domain(): + cloudcheck = CloudCheck() + results = await cloudcheck.lookup("asdf.amazon.com") + names = [provider["name"] for provider in results] + assert "Amazon" in names, f"Expected Amazon in results: {names}" + + +def test_import_provider(): + from cloudcheck.providers.amazon import Amazon + + assert Amazon().regexes From d7bb1dd9af2f0d2c98539e17dcc3a1a3694c8aed Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Wed, 17 Dec 2025 12:31:27 -0500 Subject: [PATCH 8/8] remove regex --- Cargo.lock | 47 ++++------------------------------------------- Cargo.toml | 1 - 2 files changed, 4 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d419aee..1e9a5a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -37,9 +28,9 @@ checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "bytes" @@ -71,7 +62,6 @@ dependencies = [ "pyo3", "pyo3-async-runtimes", "radixtarget", - "regex", "reqwest", "serde", "serde_json", @@ -909,35 +899,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "regex" -version = "1.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" - [[package]] name = "reqwest" version = "0.12.26" @@ -1020,9 +981,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c" +checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" dependencies = [ "zeroize", ] diff --git a/Cargo.toml b/Cargo.toml index 958f2e5..996ad89 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,6 @@ openssl = { version = "0.10", features = ["vendored"] } pyo3 = { version = "0.27", optional = true } pyo3-async-runtimes = { version = "0.27", features = ["tokio-runtime"], optional = true } radixtarget = "4.2" -regex = "1.11" [features] default = []