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)
- 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: 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: '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.
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)
@ -855,6 +855,11 @@ LNbits is a very simple server that sits on top of your Lightning Wallet.
![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)
You can also develop your own extensions on it.
@ -1009,7 +1014,20 @@ At the moment, the following subscription services are available:
##### 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)

View File

@ -595,37 +595,68 @@ def menuMakeSubscription(blitzServiceName, torAddress, torPort):
torTarget = "{0}:{1}".format(torAddress, torPort)
############################
# PHASE 1: Enter 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:]
# PHASE 1: Choose Shop URL
shopurl = ""
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.set_background_title("Select IP2TOR Bridge Shop (communication secured thru TOR)")
code, text = d.inputbox(
"Enter Address of the IP2TOR Shop (OR JUST PRESS OK):",
height=10, width=72, init=shopurl,
title="Shop Address")
d.set_background_title("IP2TOR - Select Shop")
code, selected = d.menu(
"\nChoose your IP2Tor provider/shop:",
choices=choices, width=75, height=10, title="Select IP2Tor Shop")
# if user canceled
if code != d.OK:
sys.exit(0)
# get host list from shop
shopurl = text
if selected == "A" : shopurl=choice_url_ip2torcom
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')
try:
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_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
d = Dialog(dialog="dialog", autowidgetsize=True)
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 is no guarantee for quality of service.
The service has the following additional terms:
The service has the following additional description & terms:
{5}
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['ip'],
torTarget,
host['terms_of_service'],
description,
host['terms_of_service_url'],
blitzServiceName
)

View File

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

View File

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

View File

@ -174,10 +174,10 @@ https://${ip2torDomain}:${ip2torPort} ready for public use"
IP2TOR: https://${ip2torIP}:${ip2torPort}
SHA1 ${sslFingerprintTOR}\n
Consider adding a LetsEncrypt HTTPS Domain under OPTIONS."
# elif [ ${#publicDomain} -eq 0 ]; then
# text="${text}\n
#To enable easy reachability with normal browser from the outside
#Consider adding a IP2TOR Bridge under OPTIONS."
elif [ ${#publicDomain} -eq 0 ]; then
text="${text}\n
To enable easy reachability with normal browser from the outside
Consider adding a IP2TOR Bridge under OPTIONS."
fi
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=()
# IP2TOR options
#if [ "${ip2torDomain}" != "" ]; then
# # IP2TOR+LetsEncrypt active - offer cancel
# OPTIONS+=(IP2TOR-OFF "Cancel IP2Tor Subscription for LNbits")
#elif [ "${ip2torIP}" != "" ]; then
# # just IP2TOR active - offer cancel or Lets Encrypt
# OPTIONS+=(HTTPS-ON "Add free HTTPS-Certificate for LNbits")
# OPTIONS+=(IP2TOR-OFF "Cancel IP2Tor Subscription for LNbits")
#else
# OPTIONS+=(IP2TOR-ON "Make Public with IP2Tor Subscription")
#fi
if [ "${ip2torDomain}" != "" ]; then
# IP2TOR+LetsEncrypt active - offer cancel
OPTIONS+=(IP2TOR-OFF "Cancel IP2Tor Subscription for LNbits")
elif [ "${ip2torIP}" != "" ]; then
# just IP2TOR active - offer cancel or Lets Encrypt
OPTIONS+=(HTTPS-ON "Add free HTTPS-Certificate for LNbits")
OPTIONS+=(IP2TOR-OFF "Cancel IP2Tor Subscription for LNbits")
else
OPTIONS+=(IP2TOR-ON "Make Public with IP2Tor Subscription")
fi
# Change Funding Source options (only if available)
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
within the local network - without transport encryption.
Local server for test & debug: ${publicURL}/app"#\n
#To enable easy reachability from the outside consider
#adding a IP2TOR Bridge and reconnect:
#MAINMENU > SUBSCRIBE > IP2TOR > SPHINX"
To enable easy reachability from the outside consider
adding a IP2TOR Bridge and reconnect:
MAINMENU > SUBSCRIBE > IP2TOR > SPHINX"
extraPairInfo="You need to be on the same local network to make this work."
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."
else
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 "MAIN MENU > SUBSCRIBE > IP2TOR > LND REST API"
#echo "Then come back and get a new connection string."
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 "Then come back and get a new connection string."
fi
echo ""