diff --git a/SYSTEM_NOTES.md b/SYSTEM_NOTES.md index e435bdcc..c4eca5a6 100644 --- a/SYSTEM_NOTES.md +++ b/SYSTEM_NOTES.md @@ -1,6 +1,6 @@ # myNode System Notes -Various restrictions and behaviors of myNode and the various applications will be documented below. +Various restrictions and behaviors of myNode and the various applications are documented below. ## Thunderhub @@ -8,4 +8,13 @@ Various restrictions and behaviors of myNode and the various applications will b ## BTC Pay Server -- The upgrade button within BTC Pay Server will not work on myNode. Upgrades are performed as part of the myNode upgrade process. \ No newline at end of file +- The upgrade button within BTC Pay Server will not work on myNode. Upgrades are performed as part of the myNode upgrade process. + +## CKBunker + +- On some occasions, the CKBunker application will stop detecting a ColdCard that has been attached for a significant period of time. +-- Workaround: Run these commands as root. + echo 0 > /sys/bus/usb/devices//authorized + echo 1 > /sys/bus/usb/devices//authorized +- CKBunker uses a separate password that starts as "bolt" and can be updated within the app +- The password is stored in plaintext on the myNode drive \ No newline at end of file diff --git a/rootfs/standard/etc/nginx/sites-enabled/https_ckbunker.conf b/rootfs/standard/etc/nginx/sites-enabled/https_ckbunker.conf new file mode 100644 index 00000000..46d483ca --- /dev/null +++ b/rootfs/standard/etc/nginx/sites-enabled/https_ckbunker.conf @@ -0,0 +1,23 @@ +server { + listen 9824 ssl; + server_name ckbunker; + + include /etc/nginx/mynode/mynode_ssl_params.conf; + include /etc/nginx/mynode/mynode_ssl_cert_key.conf; + + access_log /var/log/nginx/access_ckbunker.log; + error_log /var/log/nginx/error_ckbunker.log; + + location / { + proxy_pass http://127.0.0.1:9823; + + include /etc/nginx/mynode/mynode_ssl_proxy_params.conf; + } + location /websocket { + proxy_pass http://127.0.0.1:9823/websocket; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } +} \ No newline at end of file diff --git a/rootfs/standard/usr/share/mynode/ckbunker_settings.yaml b/rootfs/standard/usr/share/mynode/ckbunker_settings.yaml index 7c4a6334..df05e280 100644 --- a/rootfs/standard/usr/share/mynode/ckbunker_settings.yaml +++ b/rootfs/standard/usr/share/mynode/ckbunker_settings.yaml @@ -1,7 +1,7 @@ ALLOW_REBOOTS: true DATA_FILES: /mnt/hdd/mynode/ckbunker EASY_CAPTCHA: false -#EXPLORA: http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion +EXPLORA: http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion MASTER_PW: bolt MAX_IDLE_TIME: 600 MAX_LOGIN_WAIT_TIME: 300 diff --git a/rootfs/standard/var/www/mynode/api.py b/rootfs/standard/var/www/mynode/api.py index 66f3a071..ba597f11 100644 --- a/rootfs/standard/var/www/mynode/api.py +++ b/rootfs/standard/var/www/mynode/api.py @@ -93,6 +93,10 @@ def api_get_service_status(): data["status"], data["color"] = get_lnbits_status_and_color() elif service == "thunderhub": data["status"], data["color"] = get_thunderhub_status_and_color() + elif service == "ckbunker": + data["status"], data["color"] = get_ckbunker_status_and_color() + elif service == "sphinxrelay": + data["status"], data["color"] = get_sphinxrelay_status_and_color() elif service == "tor": data["status"] = "Private Connections" data["color"] = get_service_status_color("tor@default") diff --git a/rootfs/standard/var/www/mynode/device_info.py b/rootfs/standard/var/www/mynode/device_info.py index 7f8f7404..6916ac4d 100644 --- a/rootfs/standard/var/www/mynode/device_info.py +++ b/rootfs/standard/var/www/mynode/device_info.py @@ -565,6 +565,30 @@ def get_thunderhub_status_and_color(): status = "Waiting on LND..." return status,color +def get_ckbunker_status_and_color(): + status = "Coldcard Signing Tool" + color = "gray" + if is_bitcoind_synced(): + if is_ckbunker_enabled(): + color = get_service_status_color("lndhub") + else: + status = "Waiting on Bitcoin..." + return status,color + +def get_sphinxrelay_status_and_color(): + color = "gray" + status = "Chat" + if is_lnd_ready(): + if is_sphinxrelay_enabled(): + status_code = get_service_status_code("sphinxrelay") + if status_code != 0: + color = "red" + else: + color = "green" + else: + status = "Waiting on LND..." + return status,color + def get_lndhub_status_and_color(): status = "BlueWallet Backend" color = "gray" diff --git a/rootfs/standard/var/www/mynode/enable_disable_functions.py b/rootfs/standard/var/www/mynode/enable_disable_functions.py index dca91912..75ef27f2 100644 --- a/rootfs/standard/var/www/mynode/enable_disable_functions.py +++ b/rootfs/standard/var/www/mynode/enable_disable_functions.py @@ -71,6 +71,26 @@ def disable_thunderhub(): os.system("systemctl disable thunderhub --no-pager") +def is_ckbunker_enabled(): + return is_service_enabled("ckbunker") +def enable_ckbunker(): + os.system("systemctl enable ckbunker --no-pager") + os.system("systemctl start ckbunker --no-pager") +def disable_ckbunker(): + os.system("systemctl stop ckbunker --no-pager") + os.system("systemctl disable ckbunker --no-pager") + + +def is_sphinxrelay_enabled(): + return is_service_enabled("thunderhub") +def enable_sphinxrelay(): + os.system("systemctl enable sphinx-relay --no-pager") + os.system("systemctl start sphinx-relay --no-pager") +def disable_sphinxrelay(): + os.system("systemctl stop sphinx-relay --no-pager") + os.system("systemctl disable sphinx-relay --no-pager") + + def is_btcrpcexplorer_enabled(): if os.path.isfile(BTCRPCEXPLORER_ENABLED_FILE): return True diff --git a/rootfs/standard/var/www/mynode/mynode.py b/rootfs/standard/var/www/mynode/mynode.py index a9950740..8f1b37d8 100644 --- a/rootfs/standard/var/www/mynode/mynode.py +++ b/rootfs/standard/var/www/mynode/mynode.py @@ -486,6 +486,12 @@ def index(): # Find Thunderhub status thunderhub_status, thunderhub_status_color = get_thunderhub_status_and_color() + # Find CKBunker status + ckbunker_status, ckbunker_status_color = get_ckbunker_status_and_color() + + # Find Sphinx Relay status + sphinxrelay_status, sphinxrelay_status_color = get_sphinxrelay_status_and_color() + # Find electrs status electrs_status, electrs_status_color = get_electrs_status_and_color() @@ -562,6 +568,12 @@ def index(): "thunderhub_status_color": thunderhub_status_color, "thunderhub_status": thunderhub_status, "thunderhub_enabled": is_thunderhub_enabled(), + "ckbunker_status_color": ckbunker_status_color, + "ckbunker_status": ckbunker_status, + "ckbunker_enabled": is_ckbunker_enabled(), + "sphinxrelay_status_color": sphinxrelay_status_color, + "sphinxrelay_status": sphinxrelay_status, + "sphinxrelay_enabled": is_sphinxrelay_enabled(), "lndhub_status_color": lndhub_status_color, "lndhub_status": lndhub_status, "lndhub_enabled": is_lndhub_enabled(), @@ -683,6 +695,24 @@ def page_toggle_thunderhub(): enable_thunderhub() return redirect("/") +@app.route("/toggle-ckbunker") +def page_toggle_ckbunker(): + check_logged_in() + if is_ckbunker_enabled(): + disable_ckbunker() + else: + enable_ckbunker() + return redirect("/") + +@app.route("/toggle-sphinxrelay") +def page_toggle_sphinxrelay(): + check_logged_in() + if is_sphinxrelay_enabled(): + disable_sphinxrelay() + else: + enable_sphinxrelay() + return redirect("/") + @app.route("/toggle-electrs") def page_toggle_electrs(): check_logged_in() @@ -921,10 +951,10 @@ def start_threads(): app.logger.info("STARTING THREADS") # Start threads - btc_thread1 = BackgroundThread(update_bitcoin_main_info_thread, 10) + btc_thread1 = BackgroundThread(update_bitcoin_main_info_thread, 15) btc_thread1.start() threads.append(btc_thread1) - btc_thread2 = BackgroundThread(update_bitcoin_other_info_thread, 30) + btc_thread2 = BackgroundThread(update_bitcoin_other_info_thread, 60) btc_thread2.start() threads.append(btc_thread2) electrs_info_thread = BackgroundThread(update_electrs_info_thread, 60) diff --git a/rootfs/standard/var/www/mynode/static/css/mynode.css b/rootfs/standard/var/www/mynode/static/css/mynode.css index e7d7c817..2440b361 100644 --- a/rootfs/standard/var/www/mynode/static/css/mynode.css +++ b/rootfs/standard/var/www/mynode/static/css/mynode.css @@ -197,7 +197,7 @@ td { position: relative; border: none; border-radius: 10px; - width: 300px; + width: 385px; height: 180px; padding: 10px; margin: 6px 10px 6px 10px; @@ -209,7 +209,7 @@ td { position: relative; border: none; border-radius: 10px; - width: 640px; + width: 810px; height: 120px; padding: 10px; margin: 6px 10px 6px 10px; @@ -308,6 +308,13 @@ td { font-size: 12px; line-height: 130%; } +.app_beta_tag_image { + width: 40px; + height: 40px; + position: absolute; + left: 110px; + top: 0px; +} .app_contents { font-size: 12px; position: absolute; @@ -532,7 +539,7 @@ a:link.ui-button, a:visited.ui-button, .ui-button { color: #333333; border: 3px solid orange; background-color: rgb(255, 250, 238); - width: 600px; + width: 800px; border-radius: 25px; text-align: justify; display: block; @@ -546,7 +553,7 @@ a:link.ui-button, a:visited.ui-button, .ui-button { color: #333333; border: 3px solid red; background-color: rgb(255, 238, 238); - width: 600px; + width: 800px; border-radius: 25px; text-align: justify; display: block; @@ -562,21 +569,6 @@ a:link.ui-button, a:visited.ui-button, .ui-button { text-align: center; } -.upgrade_ad_main_page { - color: #333333; - border: 3px solid orange; - background-color: rgb(255, 250, 238); - width: 600px; - border-radius: 25px; - text-align: justify; - display: block; - font-size: 12px; - padding: 5px; - padding-left: 12px; - margin: auto; - margin-bottom: 20px; -} - .port_forwarded_icon { width: 26px; height: 24px; diff --git a/rootfs/standard/var/www/mynode/static/css/mynode_dark.css b/rootfs/standard/var/www/mynode/static/css/mynode_dark.css index 21fc9b4e..883a9923 100644 --- a/rootfs/standard/var/www/mynode/static/css/mynode_dark.css +++ b/rootfs/standard/var/www/mynode/static/css/mynode_dark.css @@ -94,7 +94,6 @@ td { } .main_page_warning_block, -.upgrade_ad_main_page, .halving_message_main_page { color: #eee; border: 3px solid #f9c132; diff --git a/rootfs/standard/var/www/mynode/static/images/beta.png b/rootfs/standard/var/www/mynode/static/images/beta.png new file mode 100644 index 00000000..eadf0711 Binary files /dev/null and b/rootfs/standard/var/www/mynode/static/images/beta.png differ diff --git a/rootfs/standard/var/www/mynode/static/images/ckbunker.png b/rootfs/standard/var/www/mynode/static/images/ckbunker.png new file mode 100644 index 00000000..8372b944 Binary files /dev/null and b/rootfs/standard/var/www/mynode/static/images/ckbunker.png differ diff --git a/rootfs/standard/var/www/mynode/static/images/sphinx.png b/rootfs/standard/var/www/mynode/static/images/sphinx.png new file mode 100644 index 00000000..04c7b763 Binary files /dev/null and b/rootfs/standard/var/www/mynode/static/images/sphinx.png differ diff --git a/rootfs/standard/var/www/mynode/templates/includes/apps.html b/rootfs/standard/var/www/mynode/templates/includes/apps.html index d031264b..5e73570d 100644 --- a/rootfs/standard/var/www/mynode/templates/includes/apps.html +++ b/rootfs/standard/var/www/mynode/templates/includes/apps.html @@ -1,4 +1,6 @@
Apps
+ +
@@ -48,6 +50,26 @@ {% endif %}
+
+
+ +
Mempool
+
{{ mempoolspace_status }}
+
+ {% if product_key_skipped %} + Premium Feature + {% else %} + {% if not is_installing_docker_images %} + {% if mempoolspace_enabled %} + View + Disable + {% else %} + Enable + {% endif %} + {% endif %} + {% endif %} +
+
@@ -62,21 +84,10 @@ {% endif %}
- + +
@@ -133,20 +144,40 @@
{% endif %}
-
- -
Mempool
-
{{ mempoolspace_status }}
+
+ +
Thunderhub
+
{{ thunderhub_status }}
{% if product_key_skipped %} Premium Feature {% else %} - {% if not is_installing_docker_images %} - {% if mempoolspace_enabled %} - View - Disable + {% if lnd_ready %} + {% if thunderhub_enabled %} + Thunderhub + Disable {% else %} - Enable + Enable + {% endif %} + {% endif %} + {% endif %} +
+
+
+
+ +
LNbits
+
{{ lnbits_status }}
+
+ {% if product_key_skipped %} + Premium Feature + {% else %} + {% if lnd_ready %} + {% if lnbits_enabled %} + LNbits + Disable + {% else %} + Enable {% endif %} {% endif %} {% endif %} @@ -154,6 +185,8 @@
+ +
@@ -192,41 +225,21 @@
-
- -
LNbits
-
{{ lnbits_status }}
+
+ + + +
CKBunker
+
{{ ckbunker_status }}
{% if product_key_skipped %} Premium Feature {% else %} - {% if lnd_ready %} - {% if lnbits_enabled %} - LNbits - Disable - {% else %} - Enable - {% endif %} - {% endif %} - {% endif %} -
-
-
-
- -
Thunderhub
-
{{ thunderhub_status }}
-
- {% if product_key_skipped %} - Premium Feature - {% else %} - {% if lnd_ready %} - {% if thunderhub_enabled %} - Thunderhub - Disable - {% else %} - Enable - {% endif %} + {% if ckbunker_enabled %} + CKBunker + Disable + {% else %} + Enable {% endif %} {% endif %}
diff --git a/rootfs/standard/var/www/mynode/templates/includes/main_page_messages.html b/rootfs/standard/var/www/mynode/templates/includes/main_page_messages.html index b77282ef..4f4e154c 100644 --- a/rootfs/standard/var/www/mynode/templates/includes/main_page_messages.html +++ b/rootfs/standard/var/www/mynode/templates/includes/main_page_messages.html @@ -27,7 +27,7 @@ {% endif %} {% if not has_changed_password %} -
+

Warning!
You appear to be using the default password! You should change it to something else on the settings page.

{% endif %} diff --git a/rootfs/standard/var/www/mynode/templates/includes/services.html b/rootfs/standard/var/www/mynode/templates/includes/services.html index 1e93e8a7..28bcac38 100644 --- a/rootfs/standard/var/www/mynode/templates/includes/services.html +++ b/rootfs/standard/var/www/mynode/templates/includes/services.html @@ -10,7 +10,7 @@ Manage
-
+
@@ -50,7 +50,7 @@ Manage -
+
Height
@@ -131,6 +131,14 @@
???
+
+
+
0.00 MB
+
0 TXs
+
999 min ago
+
+
???
+
\ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/templates/main.html b/rootfs/standard/var/www/mynode/templates/main.html index 4be25daf..9a1ed3c2 100644 --- a/rootfs/standard/var/www/mynode/templates/main.html +++ b/rootfs/standard/var/www/mynode/templates/main.html @@ -156,6 +156,14 @@ update_status("thunderhub_status", data); update_status_icon("thunderhub_status_icon", data); }); + $.getJSON("/api/get_service_status?service=ckbunker", function( data ) { + update_status("ckbunker_status", data); + update_status_icon("ckbunker_status_icon", data); + }); + $.getJSON("/api/get_service_status?service=sphinxrelay", function( data ) { + update_status("sphinxrelay_status", data); + update_status_icon("sphinxrelay_status_icon", data); + }); $.getJSON("/api/get_service_status?service=tor", function( data ) { update_status("tor_status", data); update_status_icon("tor_status_icon", data); @@ -245,6 +253,19 @@ window.open(url,'_blank'); }) + $("#ckbunker").on("click", function() { + port="9823" + if (location.protocol == "https:") { + port="9824" + } + url = location.protocol+'//'+location.hostname+':'+port + window.open(url,'_blank'); + }) + + $("#sphinxrelay").on("click", function() { + alert("TODO???") + }) + $("#btcrpcexplorer").on("click", function() { port="3002" if (location.protocol == "https:") { @@ -349,6 +370,14 @@ window.location.href="/toggle-thunderhub" }); + $("#toggle-ckbunker").on("click", function() { + window.location.href="/toggle-ckbunker" + }); + + $("#toggle-sphinxrelay").on("click", function() { + window.location.href="/toggle-sphinxrelay" + }); + function lndconnect() { $("#lndconnect_form").submit(); lndconnect_dialog.dialog( "close" ); @@ -413,7 +442,7 @@
{% if upgrade_available %} - upgrade available  + upgrade  {% endif %}   @@ -446,7 +475,7 @@ {% if product_key_skipped %}
Community Edition
-
+

You are currently running myNode Community Edition. Upgrading to myNode Premium provides:
@@ -518,7 +547,7 @@

{% if product_key_skipped %} -
+

Tip Address
bc1q75z4fj946pqucfu9gasxdrzma0z4seh8f58sfd

{% endif %} diff --git a/rootfs/standard/var/www/mynode/thread_functions.py b/rootfs/standard/var/www/mynode/thread_functions.py index fb5aa5bb..66342f20 100644 --- a/rootfs/standard/var/www/mynode/thread_functions.py +++ b/rootfs/standard/var/www/mynode/thread_functions.py @@ -100,7 +100,7 @@ def update_bitcoin_main_info_thread(): bitcoin_block_height = get_bitcoin_block_height() mynode_block_height = get_mynode_block_height() remaining = bitcoin_block_height - mynode_block_height - if remaining == 0 and bitcoin_block_height > 630000: + if remaining == 0 and bitcoin_block_height > 670000: if not os.path.isfile(BITCOIN_SYNCED_FILE): open(BITCOIN_SYNCED_FILE, 'a').close() # touch file elif remaining > 18:
Peers