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

@ -19,6 +19,7 @@ def index():
nettype = request.args.get("network", "mainnet")
crypto = request.args.get("chain", "monero")
onion = request.args.get("onion", False)
i2p = request.args.get("i2p", False)
show_all = "true" == request.args.get("all", "false")
web_compatible = request.args.get("cors", False)
highest_block = get_highest_block(nettype, crypto)
@ -42,6 +43,8 @@ def index():
nodes = nodes.order_by(Node.datetime_entered.desc())
if onion:
nodes = nodes.where(Node.is_tor == True)
if i2p:
nodes = nodes.where(Node.is_i2p == True)
nodes = [n for n in nodes]
shuffle(nodes)