i2p integration (#26)

* working on i2p integration

* finishing i2p setup

* fix comment

* include hidden txt for tor
This commit is contained in:
lalanza808 2023-04-26 13:39:17 -07:00 committed by GitHub
parent 8fa675c273
commit 181b448379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 93 additions and 4 deletions

View file

@ -8,7 +8,7 @@ import requests
from flask import Blueprint
from urllib.parse import urlparse
from xmrnodes.helpers import determine_crypto, is_onion, make_request
from xmrnodes.helpers import determine_crypto, is_onion, is_i2p, make_request
from xmrnodes.helpers import retrieve_peers, rw_cache, get_highest_block
from xmrnodes.models import Node, HealthCheck, Peer
from xmrnodes import config
@ -171,6 +171,7 @@ def validate():
node.datetime_checked = now
node.crypto = crypto
node.is_tor = is_onion(node.url)
node.is_i2p = is_i2p(node.url)
node.save()
else:
logging.info("unexpected nettype")