mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-26 14:34:00 +00:00
GUI changes for Tor
This commit is contained in:
parent
6a474b259b
commit
d1e1a80181
|
@ -89,12 +89,25 @@ def electrum_server_page():
|
|||
|
||||
server_url = get_local_ip() + ":50002:s"
|
||||
|
||||
# Get Onion URLs
|
||||
electrs_onion_hostname = "..."
|
||||
electrs_onion_command = "..."
|
||||
if os.path.isfile("/var/lib/tor/electrs_hidden_service/hostname"):
|
||||
with open("/var/lib/tor/electrs_hidden_service/hostname") as f:
|
||||
electrs_onion_hostname = f.read().strip()
|
||||
electrs_onion_command = "./electrum -1 -s {}:50001:t -p socks5:localhost:9050".format(electrs_onion_hostname)
|
||||
else:
|
||||
electrs_onion_hostname = "disabled"
|
||||
electrs_onion_command = "disabled"
|
||||
|
||||
# Load page
|
||||
templateData = {
|
||||
"title": "myNode Electrum Server",
|
||||
"port": 50002,
|
||||
"status": status,
|
||||
"current_block": current_block,
|
||||
"server_url": server_url
|
||||
"server_url": server_url,
|
||||
"electrs_onion_hostname": electrs_onion_hostname,
|
||||
"electrs_onion_command": electrs_onion_command
|
||||
}
|
||||
return render_template('electrum_server.html', **templateData)
|
||||
|
|
|
@ -43,6 +43,29 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="app_tile_row">
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Electrum Tor Service</div>
|
||||
<div class="info_tile_contents">{% if not product_key_skipped %}Enabled{% else %}Premium Feature{% endif %}</div>
|
||||
</div>
|
||||
{% if not product_key_skipped %}
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Electrum Tor Hostname</div>
|
||||
<div class="info_tile_contents">{{electrs_onion_hostname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app_tile_row">
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Electrum Tor Command</div>
|
||||
<div class="info_tile_contents">{{electrs_onion_command}}</div>
|
||||
</div>
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Electrum Tor Help</div>
|
||||
<div class="info_tile_contents"><a href="http://docs.electrum.org/en/latest/tor.html" target="_blank">Link</a></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'includes/footer.html' %}
|
||||
</body>
|
||||
</html>
|
|
@ -43,15 +43,17 @@
|
|||
<div class="info_tile_contents">Tor Enabled</div>
|
||||
</div>
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Onion Hostname</div>
|
||||
<div class="info_tile_header">Electrum Tor Hostname</div>
|
||||
<div class="info_tile_contents">{{electrs_onion_hostname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app_tile_row">
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Electrum Command</div>
|
||||
<div class="info_tile_header">Electrum Tor Command</div>
|
||||
<div class="info_tile_contents">{{electrs_onion_command}}</div>
|
||||
</div>
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Help</div>
|
||||
<div class="info_tile_header">Electrum Tor Help</div>
|
||||
<div class="info_tile_contents"><a href="http://docs.electrum.org/en/latest/tor.html" target="_blank">Link</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user