Show tor version

This commit is contained in:
Taylor Helsper 2020-06-09 21:10:32 -05:00
parent 67e19caa21
commit 63a0ca3b7a
3 changed files with 13 additions and 0 deletions

View File

@ -672,6 +672,14 @@ def get_onion_info_btc_v2():
pass
return info
def get_tor_version():
global cached_data
if "tor_version" in cached_data:
return cached_data["tor_version"]
cached_data["tor_version"] = subprocess.check_output("tor --version | egrep -o '[0-9\\.]+'", shell=True).strip().strip(".")
return cached_data["tor_version"]
#==================================
# Firewall Functions

View File

@ -76,6 +76,10 @@
<div class="info_tile_header">Lightning</div>
<div class="info_tile_contents">Tor Enabled</div>
</div>
<div class="info_tile">
<div class="info_tile_header">Version</div>
<div class="info_tile_contents">{{version}}</div>
</div>
</div>
<br/>

View File

@ -55,6 +55,7 @@ def page_tor():
# Load page
templateData = {
"title": "myNode Tor Services",
"version": get_tor_version(),
"v3_services": v3_services,
"v2_services": v2_services,
"fully_noded_link": fully_noded_link,