Compare commits
No commits in common. "182d98de0d3c626524fb779265f391607fb3d56e" and "f404952e0e9d1c37575122b8a954c372b690e4fb" have entirely different histories.
182d98de0d
...
f404952e0e
@ -2,7 +2,7 @@
|
|||||||
-- PostgreSQL database dump
|
-- PostgreSQL database dump
|
||||||
--
|
--
|
||||||
|
|
||||||
\restrict Jq3ohS02Qcz3l9bNbeQprTZolEFbFh84eEwk4en2HkAqc2Xojxrd4AFqHJvBETG
|
\restrict 4RPpnLLawnEzbPG06wcgYKnNzVGqIJuRjSjDeScvkTkNVXRvYDJ4WaTOJoMleVa
|
||||||
|
|
||||||
-- Dumped from database version 16.11 (74c6bb6)
|
-- Dumped from database version 16.11 (74c6bb6)
|
||||||
-- Dumped by pg_dump version 16.10
|
-- Dumped by pg_dump version 16.10
|
||||||
@ -387,5 +387,5 @@ ALTER TABLE ONLY public.public_blacklist_ips
|
|||||||
-- PostgreSQL database dump complete
|
-- PostgreSQL database dump complete
|
||||||
--
|
--
|
||||||
|
|
||||||
\unrestrict Jq3ohS02Qcz3l9bNbeQprTZolEFbFh84eEwk4en2HkAqc2Xojxrd4AFqHJvBETG
|
\unrestrict 4RPpnLLawnEzbPG06wcgYKnNzVGqIJuRjSjDeScvkTkNVXRvYDJ4WaTOJoMleVa
|
||||||
|
|
||||||
|
|||||||
@ -1,33 +0,0 @@
|
|||||||
-- Migration 009: Add Microsoft Azure and Meta/Facebook public lists
|
|
||||||
-- Date: 2026-01-02
|
|
||||||
|
|
||||||
-- Microsoft Azure IP ranges (whitelist - cloud provider)
|
|
||||||
INSERT INTO public_lists (name, url, type, format, enabled, description, fetch_interval)
|
|
||||||
VALUES (
|
|
||||||
'Microsoft Azure',
|
|
||||||
'https://raw.githubusercontent.com/femueller/cloud-ip-ranges/master/microsoft-azure-ip-ranges.json',
|
|
||||||
'whitelist',
|
|
||||||
'json',
|
|
||||||
true,
|
|
||||||
'Microsoft Azure cloud IP ranges - auto-updated from Azure Service Tags',
|
|
||||||
3600
|
|
||||||
) ON CONFLICT (name) DO UPDATE SET
|
|
||||||
url = EXCLUDED.url,
|
|
||||||
description = EXCLUDED.description;
|
|
||||||
|
|
||||||
-- Meta/Facebook IP ranges (whitelist - major service provider)
|
|
||||||
INSERT INTO public_lists (name, url, type, format, enabled, description, fetch_interval)
|
|
||||||
VALUES (
|
|
||||||
'Meta (Facebook)',
|
|
||||||
'https://raw.githubusercontent.com/parseword/util-misc/master/block-facebook/facebook-ip-ranges.txt',
|
|
||||||
'whitelist',
|
|
||||||
'plain',
|
|
||||||
true,
|
|
||||||
'Meta/Facebook IP ranges (includes Instagram, WhatsApp, Oculus) from BGP AS32934/AS54115/AS63293',
|
|
||||||
3600
|
|
||||||
) ON CONFLICT (name) DO UPDATE SET
|
|
||||||
url = EXCLUDED.url,
|
|
||||||
description = EXCLUDED.description;
|
|
||||||
|
|
||||||
-- Verify insertion
|
|
||||||
SELECT id, name, type, enabled, url FROM public_lists WHERE name IN ('Microsoft Azure', 'Meta (Facebook)');
|
|
||||||
@ -176,70 +176,6 @@ class GCPParser(ListParser):
|
|||||||
return ips
|
return ips
|
||||||
|
|
||||||
|
|
||||||
class AzureParser(ListParser):
|
|
||||||
"""Parser for Microsoft Azure IP ranges JSON (Service Tags format)"""
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def parse(content: str) -> Set[tuple[str, Optional[str]]]:
|
|
||||||
"""
|
|
||||||
Parse Azure Service Tags JSON format:
|
|
||||||
{
|
|
||||||
"values": [
|
|
||||||
{
|
|
||||||
"name": "ActionGroup",
|
|
||||||
"properties": {
|
|
||||||
"addressPrefixes": ["1.2.3.0/24", "5.6.7.0/24"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
ips = set()
|
|
||||||
|
|
||||||
try:
|
|
||||||
data = json.loads(content)
|
|
||||||
|
|
||||||
for value in data.get('values', []):
|
|
||||||
properties = value.get('properties', {})
|
|
||||||
prefixes = properties.get('addressPrefixes', [])
|
|
||||||
|
|
||||||
for prefix in prefixes:
|
|
||||||
if prefix and ListParser.validate_ip(prefix):
|
|
||||||
ips.add(ListParser.normalize_cidr(prefix))
|
|
||||||
|
|
||||||
except json.JSONDecodeError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return ips
|
|
||||||
|
|
||||||
|
|
||||||
class MetaParser(ListParser):
|
|
||||||
"""Parser for Meta/Facebook IP ranges (plain CIDR list from BGP)"""
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def parse(content: str) -> Set[tuple[str, Optional[str]]]:
|
|
||||||
"""
|
|
||||||
Parse Meta format (plain CIDR list):
|
|
||||||
31.13.24.0/21
|
|
||||||
31.13.64.0/18
|
|
||||||
157.240.0.0/17
|
|
||||||
"""
|
|
||||||
ips = set()
|
|
||||||
lines = content.strip().split('\n')
|
|
||||||
|
|
||||||
for line in lines:
|
|
||||||
line = line.strip()
|
|
||||||
|
|
||||||
# Skip empty lines and comments
|
|
||||||
if not line or line.startswith('#') or line.startswith('//'):
|
|
||||||
continue
|
|
||||||
|
|
||||||
if ListParser.validate_ip(line):
|
|
||||||
ips.add(ListParser.normalize_cidr(line))
|
|
||||||
|
|
||||||
return ips
|
|
||||||
|
|
||||||
|
|
||||||
class CloudflareParser(ListParser):
|
class CloudflareParser(ListParser):
|
||||||
"""Parser for Cloudflare IP list"""
|
"""Parser for Cloudflare IP list"""
|
||||||
|
|
||||||
@ -328,10 +264,6 @@ PARSERS: Dict[str, type[ListParser]] = {
|
|||||||
'aws': AWSParser,
|
'aws': AWSParser,
|
||||||
'gcp': GCPParser,
|
'gcp': GCPParser,
|
||||||
'google': GCPParser,
|
'google': GCPParser,
|
||||||
'azure': AzureParser,
|
|
||||||
'microsoft': AzureParser,
|
|
||||||
'meta': MetaParser,
|
|
||||||
'facebook': MetaParser,
|
|
||||||
'cloudflare': CloudflareParser,
|
'cloudflare': CloudflareParser,
|
||||||
'iana': IANAParser,
|
'iana': IANAParser,
|
||||||
'ntp': NTPPoolParser,
|
'ntp': NTPPoolParser,
|
||||||
|
|||||||
16
version.json
16
version.json
@ -1,13 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0.103",
|
"version": "1.0.102",
|
||||||
"lastUpdate": "2026-01-02T16:33:13.545Z",
|
"lastUpdate": "2026-01-02T16:16:47.939Z",
|
||||||
"changelog": [
|
"changelog": [
|
||||||
{
|
|
||||||
"version": "1.0.103",
|
|
||||||
"date": "2026-01-02",
|
|
||||||
"type": "patch",
|
|
||||||
"description": "Deployment automatico v1.0.103"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"version": "1.0.102",
|
"version": "1.0.102",
|
||||||
"date": "2026-01-02",
|
"date": "2026-01-02",
|
||||||
@ -301,6 +295,12 @@
|
|||||||
"date": "2025-11-24",
|
"date": "2025-11-24",
|
||||||
"type": "patch",
|
"type": "patch",
|
||||||
"description": "Deployment automatico v1.0.54"
|
"description": "Deployment automatico v1.0.54"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.0.53",
|
||||||
|
"date": "2025-11-24",
|
||||||
|
"type": "patch",
|
||||||
|
"description": "Deployment automatico v1.0.53"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user