diff --git a/rootfs/standard/usr/bin/mynode_post_upgrade.sh b/rootfs/standard/usr/bin/mynode_post_upgrade.sh index fb90fc20..239cf69e 100755 --- a/rootfs/standard/usr/bin/mynode_post_upgrade.sh +++ b/rootfs/standard/usr/bin/mynode_post_upgrade.sh @@ -1166,7 +1166,6 @@ systemctl enable docker_images systemctl enable glances systemctl enable webssh2 systemctl enable tor -systemctl enable i2pd systemctl enable loop systemctl enable pool systemctl enable rotate_logs diff --git a/rootfs/standard/var/www/mynode/settings.py b/rootfs/standard/var/www/mynode/settings.py index c791929a..e22adf04 100644 --- a/rootfs/standard/var/www/mynode/settings.py +++ b/rootfs/standard/var/www/mynode/settings.py @@ -97,6 +97,7 @@ def page_settings(): "upload_rate": upload_rate, "electrs_tx_lookup_limit": get_electrs_index_lookup_limit(), "btcrpcexplorer_token_enabled": is_btcrpcexplorer_token_enabled(), + "is_i2p_enabled": is_service_enabled("i2pd"), "is_btc_ipv4_enabled": settings_file_exists("btc_ipv4_enabled"), "is_btc_tor_enabled": settings_file_exists("btc_tor_enabled"), "is_btc_i2p_enabled": settings_file_exists("btc_i2p_enabled"), @@ -850,6 +851,19 @@ def page_reset_tor_connections(): flash("Tor connections reset", category="message") return redirect("/settings") +@mynode_settings.route("/settings/i2p") +def page_i2p(): + check_logged_in() + + enable = request.args.get('enable') + if enable == "1": + enable_service("i2pd") + else: + disable_service("i2pd") + + flash("I2P Setting Saved", category="message") + return redirect(url_for(".page_settings")) + @mynode_settings.route("/settings/btcrpcexplorer_token") def page_btcrpcexplorer_token(): check_logged_in() diff --git a/rootfs/standard/var/www/mynode/templates/settings.html b/rootfs/standard/var/www/mynode/templates/settings.html index 9b31ed0f..f0a1e000 100644 --- a/rootfs/standard/var/www/mynode/templates/settings.html +++ b/rootfs/standard/var/www/mynode/templates/settings.html @@ -666,6 +666,22 @@ } }); + $('#i2p_checkbox').change(function () { + $("#i2p").show(); + }); + $("#i2p").on("click", function() { + checked=$('#i2p_checkbox').is(":checked") + $('#loading_spinner_overlay').fadeIn(); + if (checked) + { + window.location.href='/settings/i2p?enable=1' + } + else + { + window.location.href='/settings/i2p?enable=0' + } + }); + $('#tor_repo_checkbox').change(function () { $("#tor_repo").show(); }); @@ -962,10 +978,14 @@ + {% if is_i2p_enabled %} + {% else %} + disabled + {% endif %} @@ -992,6 +1012,19 @@ +
+ +
I2P
+ A privacy network option, similar to Tor, can be be enabled. Enabling I2P will run the service in the background and it can be used as a network for Bitcoin. +

+ +

+ + + diff --git a/setup/setup_device.sh b/setup/setup_device.sh index 5e106ec8..e2d316ee 100755 --- a/setup/setup_device.sh +++ b/setup/setup_device.sh @@ -1062,7 +1062,6 @@ systemctl enable redis-server #systemctl enable btcrpcexplorer # DISABLED BY DEFAULT systemctl enable rtl systemctl enable tor -systemctl enable i2pd systemctl enable invalid_block_check systemctl enable usb_driver_check systemctl enable docker_images