Add distinct tor service for lnbits

This commit is contained in:
Taylor Helsper 2021-05-08 15:59:06 -05:00
parent b8f6ac9d0a
commit 62f0f7098b
3 changed files with 17 additions and 1 deletions

View File

@ -264,6 +264,12 @@ HiddenServiceVersion 3
HiddenServicePort 3000 127.0.0.1:3000
HiddenServicePort 3001 127.0.0.1:3001
# Hidden Service for myNode (LNBits)
HiddenServiceDir /var/lib/tor/mynode_lnbits/
HiddenServiceVersion 3
HiddenServicePort 5000 127.0.0.1:5000
HiddenServicePort 5001 127.0.0.1:5001
# Hidden Service for myNode (Electrum Server)
HiddenServiceDir /var/lib/tor/mynode_electrs/
HiddenServiceVersion 3

View File

@ -937,6 +937,15 @@ def get_onion_url_lndhub():
pass
return "error"
def get_onion_url_lnbits():
try:
if os.path.isfile("/var/lib/tor/mynode_lnbits/hostname"):
with open("/var/lib/tor/mynode_lnbits/hostname") as f:
return f.read().strip()
except:
pass
return "error"
def get_onion_url_btcpay():
try:
if os.path.isfile("/var/lib/tor/mynode_btcpay/hostname"):

View File

@ -48,6 +48,7 @@ def page_tor():
btc_onion_url = get_onion_url_btc()
lnd_onion_url = get_onion_url_lnd()
lndhub_onion_url = get_onion_url_lndhub()
lnbits_onion_url = get_onion_url_lnbits()
electrs_onion_url = get_onion_url_electrs()
btcpay_onion_url = get_onion_url_btcpay()
sphinxrelay_onion_url = get_onion_url_sphinxrelay()
@ -65,7 +66,7 @@ def page_tor():
v3_services.append(create_v3_service("Caravan", general_onion_url, "3020", True, ""))
v3_services.append(create_v3_service("Thunderhub", general_onion_url, "3030 / 3031", True, ""))
v3_services.append(create_v3_service("Mempool", general_onion_url, "4080 / 4081", True, ""))
v3_services.append(create_v3_service("LNbits", general_onion_url, "5000 / 5001", True, ""))
v3_services.append(create_v3_service("LNbits", lnbits_onion_url, "5000 / 5001", True, ""))
v3_services.append(create_v3_service("Lightning Terminal", general_onion_url, "8443", True, ""))
v3_services.append(create_v3_service("Whirlpool", general_onion_url, "8899", False, ""))
v3_services.append(create_v3_service("Netdata", general_onion_url, "19999 / 20000", True, ""))