3524 Re-Add IP2Tor (#3643)

This commit is contained in:
/rootzoll 2023-02-03 17:44:24 +01:00 committed by GitHub
parent 6e3e82a6f0
commit 92f69bb29e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 104 additions and 52 deletions

View File

@ -31,7 +31,7 @@
- Update: Suez - Channel Visualization for LND & CL [details](https://github.com/prusnak/suez) - Update: Suez - Channel Visualization for LND & CL [details](https://github.com/prusnak/suez)
- Fixed: SCB/Emergency-Backup to USB drive (now also with CLN emergency.recover file) - Fixed: SCB/Emergency-Backup to USB drive (now also with CLN emergency.recover file)
- Info: Run RaspiBlitz on Proxmox [details](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms/Proxmox) - Info: Run RaspiBlitz on Proxmox [details](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms/Proxmox)
- Info: IP2Tor unavailable & deactivated in SSH menus [details](https://github.com/rootzoll/raspiblitz/issues/3417#issuecomment-1310303480) - Info: IP2Tor fix fulmo shop & added new ip2tor.com shop
- Info: 32GB sdcard is now enforced (after being recommended since v1.5) - Info: 32GB sdcard is now enforced (after being recommended since v1.5)
- Info: 'Reindex Blockchain' is not part of 'repair' menu - Info: 'Reindex Blockchain' is not part of 'repair' menu

View File

@ -772,7 +772,7 @@ Using pre-signed bitcoin transactions (PSBT) and [Hardware Wallet Interface](htt
At the moment it is very Linux-focused. At the moment it is very Linux-focused.
The same applies to multi-signature setups. The same applies to multi-signature setups.
The goal of the Specter Desktop wallet is to make a convenient and user-friendly GUI around Bitcoin Core, focusing on multi-signature setups with air-gapped hardware wallets like Trezor, Ledger, COLDCARD or the Specter-DIY. The goal of the Specter Desktop wallet is to make a sub and user-friendly GUI around Bitcoin Core, focusing on multi-signature setups with air-gapped hardware wallets like Trezor, Ledger, COLDCARD or the Specter-DIY.
![SPECTER](pictures/specter.jpg) ![SPECTER](pictures/specter.jpg)
@ -855,6 +855,11 @@ LNbits is a very simple server that sits on top of your Lightning Wallet.
![LNBITS](pictures/lnbits.png) ![LNBITS](pictures/lnbits.png)
It can be used together with IP2Tor to provide:
- Lightning Paper Vouchers (Plugin: LNURLw)
- Merchant Onboarding (Plugin: TPOS)
[![Video Tutorial](pictures/video-vouchers.png)](https://www.youtube.com/watch?v=0Bt3tHULAnw) [![Video Tutorial](pictures/video-vouchers.png)](https://www.youtube.com/watch?v=0Bt3tHULAnw)
You can also develop your own extensions on it. You can also develop your own extensions on it.
@ -1009,7 +1014,20 @@ At the moment, the following subscription services are available:
##### IP2TOR (paid) ##### IP2TOR (paid)
DEACTIVATED SINCE 1.9 --> see for background: https://github.com/rootzoll/raspiblitz/issues/3417#issuecomment-1310303480 IP2TOR is a tunnel service where you can run your RaspiBlitz anonymously behind TOR but you rent a port on a clearnet IP through which you can make services of your RaspiBlitz easy reachable for everybody on the internet.
You don't need to care about your local router or firewall settings.
You can pay for this service directly through Lightning from your RaspiBlitz as subscription.
At first you select what services of your RaspiBlitz you like to tunnel through a IP2TOR bridge.
You will get a list of available IP2TOR shops & bridge offerings.
Select `OK` on an IP2TOR bridge offering and you will see more details on it, such as how many satoshis the subscription will cost you.
Your node should be funded and have channels open already at this point.
If you choose `AGREE` on the details of a IP2TOR bridge offering the RaspiBlitz tries for you to setup the IP2TOR bridge.
If everything worked you will find now the subscription under `MAINMENU` > `SUBSCRIBE` > `LIST My Subscriptions` where you can cancel it again.
To try out the IP2TOR tunnel choose in `MAINMENU` the extra menu point of the Service you choose the bridge for and it should give you now an updated URL or try calling the API on the IP and Port that is displayed under the details of the subscription in the `LIST My Subscriptions` section.
##### HTTPS with LetsEncrypt (free) ##### HTTPS with LetsEncrypt (free)

View File

@ -595,37 +595,68 @@ def menuMakeSubscription(blitzServiceName, torAddress, torPort):
torTarget = "{0}:{1}".format(torAddress, torPort) torTarget = "{0}:{1}".format(torAddress, torPort)
############################ ############################
# PHASE 1: Enter Shop URL # PHASE 1: Choose Shop URL
# see if user had before entered another shop of preference
shopurl = DEFAULT_SHOPURL
try:
subscriptions = toml.load(SUBSCRIPTIONS_FILE)
shopurl = subscriptions['shop_ip2tor']
print("# using last shop url set in subscriptions.toml")
except Exception as e:
print("# using default shop url")
# remove https:// from shop url (to keep it short)
if shopurl.find("://") > 0:
shopurl = shopurl[shopurl.find("://") + 3:]
shopurl = ""
while True: while True:
# input shop url # see if user had before entered another shop of preference
lastusedShop = ""
try:
subscriptions = toml.load(SUBSCRIPTIONS_FILE)
lastusedShop = subscriptions['shop_ip2tor']
print("# using last shop url set in subscriptions.toml")
except Exception as e:
print("# using default shop url")
# set choices of shops
choices = []
# remove https:// from shop url (to keep it short)
if lastusedShop.find("://") > 0: lastusedShop = lastusedShop[lastusedShop.find("://") + 3:]
# IP2TOR.COM Shop
choice_url_ip2torcom="ip2tor.com"
choices.append(("A", "ip2tor.com Shop"))
if lastusedShop == choice_url_ip2torcom: lastusedShop=""
# FULMO Shop
choice_url_fulmo="fulmo7x6yvgz6zs2b2ptduvzwevxmizhq23klkenslt5drxx2physlqd.onion"
choices.append(("B", "Fulmo Shop"))
if lastusedShop == choice_url_fulmo: lastusedShop=""
# add before option if different from static options
if len(lastusedShop) > 0: choices.append(("Y", lastusedShop))
# enter own shop address option
choices.append(("X", "Enter a new Shop URL"))
# select dialog
d = Dialog(dialog="dialog", autowidgetsize=True) d = Dialog(dialog="dialog", autowidgetsize=True)
d.set_background_title("Select IP2TOR Bridge Shop (communication secured thru TOR)") d.set_background_title("IP2TOR - Select Shop")
code, text = d.inputbox( code, selected = d.menu(
"Enter Address of the IP2TOR Shop (OR JUST PRESS OK):", "\nChoose your IP2Tor provider/shop:",
height=10, width=72, init=shopurl, choices=choices, width=75, height=10, title="Select IP2Tor Shop")
title="Shop Address")
# if user canceled # if user canceled
if code != d.OK: if code != d.OK:
sys.exit(0) sys.exit(0)
# get host list from shop if selected == "A" : shopurl=choice_url_ip2torcom
shopurl = text if selected == "B" : shopurl=choice_url_fulmo
if selected == "Y" : shopurl=lastusedShop
# input shop url
if selected == "X":
d = Dialog(dialog="dialog", autowidgetsize=True)
d.set_background_title("IP2TOR - Add new Shop")
code, shopurl = d.inputbox(
"Enter Address of the IP2TOR Shop (OR JUST PRESS OK):",
height=10, width=72, init=shopurl,
title="Shop Address")
if shopurl.find("://") > 0: shopurl = shopurl[shopurl.find("://") + 3:]
# try & get host list from shop
os.system('clear') os.system('clear')
try: try:
hosts = shopList(shopurl) hosts = shopList(shopurl)
@ -686,6 +717,9 @@ Try again later, enter another address or cancel.
if len(host['terms_of_service']) == 0: host['terms_of_service'] = "-" if len(host['terms_of_service']) == 0: host['terms_of_service'] = "-"
if len(host['terms_of_service_url']) == 0: host['terms_of_service_url'] = "-" if len(host['terms_of_service_url']) == 0: host['terms_of_service_url'] = "-"
description=host['terms_of_service']
if "description" in host: description = "{0} / {1}".format(host['description'], host['terms_of_service'])
# show details of selected # show details of selected
d = Dialog(dialog="dialog", autowidgetsize=True) d = Dialog(dialog="dialog", autowidgetsize=True)
d.set_background_title("IP2TOR Bridge Offer Details: {0}".format(shopurl)) d.set_background_title("IP2TOR Bridge Offer Details: {0}".format(shopurl))
@ -704,7 +738,7 @@ the "SUBSCRIPTONS" menu on your RaspiBlitz.
There will be no refunds for not used hours. There will be no refunds for not used hours.
There is no guarantee for quality of service. There is no guarantee for quality of service.
The service has the following additional terms: The service has the following additional description & terms:
{5} {5}
More information on the service you can find under: More information on the service you can find under:
@ -715,7 +749,7 @@ More information on the service you can find under:
host['tor_bridge_price_extension_sats'], host['tor_bridge_price_extension_sats'],
host['ip'], host['ip'],
torTarget, torTarget,
host['terms_of_service'], description,
host['terms_of_service_url'], host['terms_of_service_url'],
blitzServiceName blitzServiceName
) )

View File

@ -225,7 +225,7 @@ def main():
choices = list() choices = list()
choices.append(("LIST", "My Subscriptions")) choices.append(("LIST", "My Subscriptions"))
#choices.append(("NEW1", "+ IP2TOR Bridge (paid)")) choices.append(("NEW1", "+ IP2TOR Bridge (paid)"))
choices.append(("NEW2", "+ LetsEncrypt HTTPS Domain (free)")) choices.append(("NEW2", "+ LetsEncrypt HTTPS Domain (free)"))
d = Dialog(dialog="dialog", autowidgetsize=True) d = Dialog(dialog="dialog", autowidgetsize=True)

View File

@ -216,10 +216,10 @@ SHA1 ${sslFingerprintTOR}"
IP2TOR: https://${ip2torIP}:${ip2torPort} IP2TOR: https://${ip2torIP}:${ip2torPort}
SHA1 ${sslFingerprintTOR} SHA1 ${sslFingerprintTOR}
go MAINMENU > SUBSCRIBE and add LetsEncrypt HTTPS Domain" go MAINMENU > SUBSCRIBE and add LetsEncrypt HTTPS Domain"
# elif [ ${#publicDomain} -eq 0 ]; then elif [ ${#publicDomain} -eq 0 ]; then
# text="${text}\n text="${text}\n
#To enable easy reachability with normal browser from the outside To enable easy reachability with normal browser from the outside
#consider adding a IP2TOR Bridge: MAINMENU > SUBSCRIBE > IP2TOR" consider adding a IP2TOR Bridge: MAINMENU > SUBSCRIBE > IP2TOR"
fi fi
text="${text}\n text="${text}\n

View File

@ -174,10 +174,10 @@ https://${ip2torDomain}:${ip2torPort} ready for public use"
IP2TOR: https://${ip2torIP}:${ip2torPort} IP2TOR: https://${ip2torIP}:${ip2torPort}
SHA1 ${sslFingerprintTOR}\n SHA1 ${sslFingerprintTOR}\n
Consider adding a LetsEncrypt HTTPS Domain under OPTIONS." Consider adding a LetsEncrypt HTTPS Domain under OPTIONS."
# elif [ ${#publicDomain} -eq 0 ]; then elif [ ${#publicDomain} -eq 0 ]; then
# text="${text}\n text="${text}\n
#To enable easy reachability with normal browser from the outside To enable easy reachability with normal browser from the outside
#Consider adding a IP2TOR Bridge under OPTIONS." Consider adding a IP2TOR Bridge under OPTIONS."
fi fi
whiptail --title " LNbits ${fundinginfo}" --yes-button "OK" --no-button "OPTIONS" --yesno "${text}" 18 69 whiptail --title " LNbits ${fundinginfo}" --yes-button "OK" --no-button "OPTIONS" --yesno "${text}" 18 69
@ -194,16 +194,16 @@ Consider adding a LetsEncrypt HTTPS Domain under OPTIONS."
OPTIONS=() OPTIONS=()
# IP2TOR options # IP2TOR options
#if [ "${ip2torDomain}" != "" ]; then if [ "${ip2torDomain}" != "" ]; then
# # IP2TOR+LetsEncrypt active - offer cancel # IP2TOR+LetsEncrypt active - offer cancel
# OPTIONS+=(IP2TOR-OFF "Cancel IP2Tor Subscription for LNbits") OPTIONS+=(IP2TOR-OFF "Cancel IP2Tor Subscription for LNbits")
#elif [ "${ip2torIP}" != "" ]; then elif [ "${ip2torIP}" != "" ]; then
# # just IP2TOR active - offer cancel or Lets Encrypt # just IP2TOR active - offer cancel or Lets Encrypt
# OPTIONS+=(HTTPS-ON "Add free HTTPS-Certificate for LNbits") OPTIONS+=(HTTPS-ON "Add free HTTPS-Certificate for LNbits")
# OPTIONS+=(IP2TOR-OFF "Cancel IP2Tor Subscription for LNbits") OPTIONS+=(IP2TOR-OFF "Cancel IP2Tor Subscription for LNbits")
#else else
# OPTIONS+=(IP2TOR-ON "Make Public with IP2Tor Subscription") OPTIONS+=(IP2TOR-ON "Make Public with IP2Tor Subscription")
#fi fi
# Change Funding Source options (only if available) # Change Funding Source options (only if available)
if [ "${LNBitsFunding}" == "lnd" ] && [ "${cl}" == "on" ]; then if [ "${LNBitsFunding}" == "lnd" ] && [ "${cl}" == "on" ]; then

View File

@ -108,9 +108,9 @@ iOS support is native, Android needs Orbot"
At the moment your Sphinx Relay Server is just available At the moment your Sphinx Relay Server is just available
within the local network - without transport encryption. within the local network - without transport encryption.
Local server for test & debug: ${publicURL}/app"#\n Local server for test & debug: ${publicURL}/app"#\n
#To enable easy reachability from the outside consider To enable easy reachability from the outside consider
#adding a IP2TOR Bridge and reconnect: adding a IP2TOR Bridge and reconnect:
#MAINMENU > SUBSCRIBE > IP2TOR > SPHINX" MAINMENU > SUBSCRIBE > IP2TOR > SPHINX"
extraPairInfo="You need to be on the same local network to make this work." extraPairInfo="You need to be on the same local network to make this work."
else else

View File

@ -136,9 +136,9 @@ elif [ "${exportType}" = "btcpay" ]; then
echo "NOTE: You have a IP2TOR connection for LND REST API .. so you can use this connection string also with a external BTCPay server." echo "NOTE: You have a IP2TOR connection for LND REST API .. so you can use this connection string also with a external BTCPay server."
else else
echo "IMPORTANT: You can only use this connection string for a BTCPay server running on this RaspiBlitz." echo "IMPORTANT: You can only use this connection string for a BTCPay server running on this RaspiBlitz."
#echo "If you want to connect from a external BTCPay server activate a IP2TOR tunnel for LND-REST first:" echo "If you want to connect from a external BTCPay server activate a IP2TOR tunnel for LND-REST first:"
#echo "MAIN MENU > SUBSCRIBE > IP2TOR > LND REST API" echo "MAIN MENU > SUBSCRIBE > IP2TOR > LND REST API"
#echo "Then come back and get a new connection string." echo "Then come back and get a new connection string."
fi fi
echo "" echo ""