parent
a743788dcf
commit
1233d8998a
2 changed files with 21 additions and 0 deletions
|
@ -12,6 +12,7 @@ from app.terraform import BaseAutomation
|
|||
from app.terraform.block.bridge_dnsc import BlockBridgeDnscAutomation
|
||||
from app.terraform.block.bridge_github import BlockBridgeGitHubAutomation
|
||||
from app.terraform.block.bridge_gitlab import BlockBridgeGitlabAutomation
|
||||
from app.terraform.block.bridge_roskomsvoboda import BlockBridgeRoskomsvobodaAutomation
|
||||
from app.terraform.block_external import BlockExternalAutomation
|
||||
from app.terraform.block_ooni import BlockOONIAutomation
|
||||
from app.terraform.block_roskomsvoboda import BlockRoskomsvobodaAutomation
|
||||
|
@ -45,6 +46,7 @@ jobs = {
|
|||
BlockBridgeDnscAutomation,
|
||||
BlockBridgeGitHubAutomation,
|
||||
BlockBridgeGitlabAutomation,
|
||||
BlockBridgeRoskomsvobodaAutomation,
|
||||
BlockExternalAutomation,
|
||||
BlockOONIAutomation,
|
||||
BlockRoskomsvobodaAutomation,
|
||||
|
|
19
app/terraform/block/bridge_roskomsvoboda.py
Normal file
19
app/terraform/block/bridge_roskomsvoboda.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from typing import Any
|
||||
|
||||
import requests
|
||||
|
||||
from app.terraform.block.bridge import BlockBridgeAutomation
|
||||
|
||||
|
||||
class BlockBridgeRoskomsvobodaAutomation(BlockBridgeAutomation):
|
||||
short_name = "block_bridge_roskomsvoboda"
|
||||
description = "Import the RosKomSvoboda IP blocklist"
|
||||
frequency = 300
|
||||
|
||||
_data: Any
|
||||
|
||||
def fetch(self) -> None:
|
||||
self._data = requests.get("https://reestr.rublacklist.net/api/v3/ips/").json()
|
||||
|
||||
def parse(self) -> None:
|
||||
self.ips.extend(self._data)
|
Loading…
Add table
Add a link
Reference in a new issue