|
|
@ -26,6 +26,7 @@ def index():
|
|
|
|
crypto = request.args.get("chain", "monero")
|
|
|
|
crypto = request.args.get("chain", "monero")
|
|
|
|
onion = request.args.get("onion", False)
|
|
|
|
onion = request.args.get("onion", False)
|
|
|
|
i2p = request.args.get("i2p", False)
|
|
|
|
i2p = request.args.get("i2p", False)
|
|
|
|
|
|
|
|
country = request.args.get('country')
|
|
|
|
show_all = "true" == request.args.get("all", "false")
|
|
|
|
show_all = "true" == request.args.get("all", "false")
|
|
|
|
web_compatible = request.args.get("cors", False)
|
|
|
|
web_compatible = request.args.get("cors", False)
|
|
|
|
highest_block = get_highest_block(nettype, crypto)
|
|
|
|
highest_block = get_highest_block(nettype, crypto)
|
|
|
@ -52,9 +53,6 @@ def index():
|
|
|
|
if i2p:
|
|
|
|
if i2p:
|
|
|
|
nodes = nodes.where(Node.is_i2p == True)
|
|
|
|
nodes = nodes.where(Node.is_i2p == True)
|
|
|
|
|
|
|
|
|
|
|
|
nodes = [n for n in nodes]
|
|
|
|
|
|
|
|
shuffle(nodes)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
countries = {}
|
|
|
|
countries = {}
|
|
|
|
for node in nodes:
|
|
|
|
for node in nodes:
|
|
|
|
c = node.country_code
|
|
|
|
c = node.country_code
|
|
|
@ -64,6 +62,14 @@ def index():
|
|
|
|
countries[c] = 0
|
|
|
|
countries[c] = 0
|
|
|
|
countries[c] += 1
|
|
|
|
countries[c] += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if country:
|
|
|
|
|
|
|
|
if country == '??':
|
|
|
|
|
|
|
|
country = None
|
|
|
|
|
|
|
|
nodes = nodes.where(Node.country_code == country)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nodes = [n for n in nodes]
|
|
|
|
|
|
|
|
shuffle(nodes)
|
|
|
|
|
|
|
|
|
|
|
|
return render_template(
|
|
|
|
return render_template(
|
|
|
|
"index.html",
|
|
|
|
"index.html",
|
|
|
|
nodes=nodes,
|
|
|
|
nodes=nodes,
|
|
|
|