From 1b6e77a4d56423ad891cb898f6087235f133d60e Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Wed, 3 Nov 2021 22:24:48 -0500 Subject: [PATCH] Remove tor v2 services --- rootfs/standard/etc/tor/torrc | 6 ---- rootfs/standard/var/www/mynode/device_info.py | 2 +- .../var/www/mynode/templates/tor.html | 34 +------------------ rootfs/standard/var/www/mynode/tor.py | 9 +---- 4 files changed, 3 insertions(+), 48 deletions(-) diff --git a/rootfs/standard/etc/tor/torrc b/rootfs/standard/etc/tor/torrc index 4d1d6553..a9ee2a69 100644 --- a/rootfs/standard/etc/tor/torrc +++ b/rootfs/standard/etc/tor/torrc @@ -246,12 +246,6 @@ HiddenServiceDir /var/lib/tor/mynode_btc/ HiddenServiceVersion 3 HiddenServicePort 8332 127.0.0.1:8332 -# Hidden Service for myNode (BTC) v2 -HiddenServiceDir /var/lib/tor/mynode_btc_v2/ -HiddenServiceVersion 2 -HiddenServiceAuthorizeClient stealth mynode -HiddenServicePort 8332 127.0.0.1:8332 - # Hidden Service for myNode (LND) HiddenServiceDir /var/lib/tor/mynode_lnd/ HiddenServiceVersion 3 diff --git a/rootfs/standard/var/www/mynode/device_info.py b/rootfs/standard/var/www/mynode/device_info.py index 2bd139ce..6699d8e3 100644 --- a/rootfs/standard/var/www/mynode/device_info.py +++ b/rootfs/standard/var/www/mynode/device_info.py @@ -1056,7 +1056,7 @@ def get_tor_version(): 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(".") + cached_data["tor_version"] = subprocess.check_output("tor --version | head -n 1 | egrep -o '[0-9\\.]+[0-9]'", shell=True).strip().strip(".") return cached_data["tor_version"] diff --git a/rootfs/standard/var/www/mynode/templates/tor.html b/rootfs/standard/var/www/mynode/templates/tor.html index 4afbdc8a..6b15df32 100644 --- a/rootfs/standard/var/www/mynode/templates/tor.html +++ b/rootfs/standard/var/www/mynode/templates/tor.html @@ -87,7 +87,7 @@
-
v3 Addresses
+
Tor Services
@@ -127,38 +127,6 @@
Service

-
v2 Addresses
- - - - - - - - - - {% for service in v2_services %} - - - - - - - - {% endfor %} - -
ServiceAddressPasswordPortGuide
{{ service.service }} - {{ service.url }} - .......................................... - - {{ service.password }} - .......................................... - {{ service.port }} - {% if service.guide|length %} - Guide - {% endif %} -
-
Tor Connected Apps
diff --git a/rootfs/standard/var/www/mynode/tor.py b/rootfs/standard/var/www/mynode/tor.py index 489fd31e..06f8c5e9 100644 --- a/rootfs/standard/var/www/mynode/tor.py +++ b/rootfs/standard/var/www/mynode/tor.py @@ -53,10 +53,7 @@ def page_tor(): btcpay_onion_url = get_onion_url_btcpay() sphinxrelay_onion_url = get_onion_url_sphinxrelay() - btc_info_v2 = get_onion_info_btc_v2() - - - # Services + # v3 Services v3_services = [] v3_services.append(create_v3_service("myNode Web", general_onion_url, "80", True, "")) v3_services.append(create_v3_service("WebSSH", general_onion_url, "2222 / 2223", True, "")) @@ -81,9 +78,6 @@ def page_tor(): v3_services.append(create_v3_service("Electrum Server", electrs_onion_url, "50002", False, "https://mynodebtc.github.io/tor/electrum.html")) v3_services.append(create_v3_service("Sphinx Relay", sphinxrelay_onion_url, "53001", True, "")) - v2_services = [] - v2_services.append({"service": "Bitcoin API (REST)", "url": btc_info_v2["url"], "password": btc_info_v2["pass"], "port": "8332","guide":""}) - # App links rpc_password = get_bitcoin_rpc_password() fully_noded_link = "btcstandup://mynode:{}@{}:8332?label=myNode%20Tor".format(rpc_password, btc_onion_url) @@ -93,7 +87,6 @@ def page_tor(): "title": "myNode Tor Services", "version": get_tor_version(), "v3_services": v3_services, - "v2_services": v2_services, "fully_noded_link": fully_noded_link, "ui_settings": read_ui_settings() }