"reason" : block["reason"],
})
+ logger.debug("Settings obfuscated=%d for row[domain]='%s' ...", obfuscated, row["domain"])
+ instances.set_obfuscated_blocks(row["domain"], obfuscated)
+
logger.info("domain='%s' has %d obfuscated domain(s)", row["domain"], obfuscated)
if obfuscated == 0 and len(blocking) > 0:
logger.info("Block list from domain='%s' has been fully deobfuscated.", row["domain"])
"localhost.run" : "Floods federation tables with fake nodes",
"loca.lt" : "Floods federation tables with fake nodes",
"grid.tf" : "Floods federation tables with fake nodes",
+ "gitpod.io" : "Floods federation tables with fake nodes",
"ngrok.io" : "Testing/developing instances shouldn't be part of public instances",
"ngrok.app" : "Testing/developing instances shouldn't be part of public instances",
"ngrok-free.app" : "Testing/developing instances shouldn't be part of public instances",
"total_peers" : {},
# Found total blocks
"total_blocks" : {},
+ # Obfuscated domains
+ "obfuscated_blocks" : {},
# Last fetched instances
"last_instance_fetch": {},
# Last updated
_set_data("total_blocks", domain, len(blocks))
logger.debug("EXIT!")
+def set_obfuscated_blocks(domain: str, obfuscated: int):
+ logger.debug("domain='%s',obfuscated=%d - CALLED!", domain, obfuscated)
+ domain_helper.raise_on(domain)
+
+ if not isinstance(obfuscated, int):
+ raise ValueError(f"Parameter obfuscated[]='{type(blocks)}' is not of type 'int'")
+ elif obfuscated < 0:
+ raise ValueError(f"Parameter obfuscated={obfuscated} is not valid")
+
+ # Set timestamp
+ _set_data("obfuscated_blocks", domain, obfuscated)
+ logger.debug("EXIT!")
+
def set_nodeinfo_url(domain: str, url: str):
logger.debug("domain='%s',url='%s' - CALLED!", domain, url)
domain_helper.raise_on(domain)
<td>{{instance['total_blocks']}}</td>
</tr>
+ <tr>
+ <td>Obfuscated blocks:</td>
+ <td>{{instance['obfuscated_blocks']}}</td>
+ </tr>
+
<tr>
<td>Has obfuscated block list:</td>
<td>{% if instance['has_obfuscation']%}Yes{%elif not instance['has_obfuscation']%}No{%else%}-{%endif%}</td>