mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-17 21:31:45 +01:00
parent
b8126501cf
commit
1f350dbeb4
@ -1,5 +1,9 @@
|
||||
# CHANGES between Releases
|
||||
|
||||
## Whats new in Version 1.6.1 of RaspiBlitz?
|
||||
|
||||
- Update: IP2Tor+LetsEncrypt Functional Test [details](https://github.com/rootzoll/raspiblitz/issues/1412)
|
||||
|
||||
## Whats new in Version 1.6 of RaspiBlitz?
|
||||
|
||||
- Update: Raspberry Pi OS Base Image (May 2020)
|
||||
|
@ -23,11 +23,11 @@ from blitzpy import RaspiBlitzConfig,BlitzError
|
||||
if len(sys.argv) <= 1 or sys.argv[1] == "-h" or sys.argv[1] == "help":
|
||||
print("# manage letsencrypt HTTPS certificates for raspiblitz")
|
||||
print("# blitz.subscriptions.letsencrypt.py create-ssh-dialog")
|
||||
print("# blitz.subscriptions.ip2tor.py subscriptions-list")
|
||||
print("# blitz.subscriptions.ip2tor.py subscription-new <dyndns|ip> <duckdns> <id> <token> [ip|tor|ip&tor]")
|
||||
print("# blitz.subscriptions.ip2tor.py subscription-detail <id>")
|
||||
print("# blitz.subscriptions.ip2tor.py domain-by-ip <ip>")
|
||||
print("# blitz.subscriptions.ip2tor.py subscription-cancel <id>")
|
||||
print("# blitz.subscriptions.letsencrypt.py subscriptions-list")
|
||||
print("# blitz.subscriptions.letsencrypt.py subscription-new <dyndns|ip> <duckdns> <id> <token> [ip|tor|ip&tor]")
|
||||
print("# blitz.subscriptions.letsencrypt.py subscription-detail <id>")
|
||||
print("# blitz.subscriptions.letsencrypt.py subscription-cancel <id>")
|
||||
print("# blitz.subscriptions.letsencrypt.py domain-by-ip <ip>")
|
||||
sys.exit(1)
|
||||
|
||||
# constants for standard services
|
||||
@ -517,6 +517,7 @@ def subscriptions_list():
|
||||
#######################
|
||||
# SUBSCRIPTION DETAIL
|
||||
#######################
|
||||
|
||||
def subscription_detail():
|
||||
# check parameters
|
||||
try:
|
||||
@ -526,8 +527,35 @@ def subscription_detail():
|
||||
handleException(e)
|
||||
|
||||
subscription_id = sys.argv[2]
|
||||
httpsTestport = ""
|
||||
if len(sys.argv) > 3:
|
||||
httpsTestport = sys.argv[3]
|
||||
try:
|
||||
sub = get_subscription(subscription_id)
|
||||
|
||||
# use unix 'getent' to resolve DNS to IP
|
||||
dns_result = subprocess.Popen(
|
||||
["getent", "hosts", subscription_id],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf8')
|
||||
out, err = dns_result.communicate()
|
||||
sub['dns_response'] = "unknown"
|
||||
if subscription_id in out:
|
||||
sub['dns_response'] = out.split(" ")[0]
|
||||
if sub['dns_response']!=sub['ip'] and len(sub['warning'])==0:
|
||||
sub['warning'] = "Domain resolves not to target IP yet."
|
||||
|
||||
# when https testport is set - check if you we get a https response
|
||||
sub['https_response'] = -1
|
||||
if len(httpsTestport) > 0:
|
||||
url = "https://{0}:{1}".format(subscription_id, httpsTestport)
|
||||
try:
|
||||
response = session.get(url)
|
||||
sub['https_response'] = response.status_code
|
||||
except Exception as e:
|
||||
sub['https_response'] = 0
|
||||
if sub['https_response']!=200 and len(sub['warning'])==0:
|
||||
sub['warning'] = "Not able to get HTTPS response."
|
||||
|
||||
print(json.dumps(sub, indent=2))
|
||||
|
||||
except Exception as e:
|
||||
|
@ -55,6 +55,10 @@ if [ "$1" = "status" ]; then
|
||||
source <(sudo /home/admin/config.scripts/blitz.subscriptions.letsencrypt.py domain-by-ip $ip)
|
||||
if [ ${#error} -eq 0 ]; then
|
||||
echo "ip2torDomain='${domain}'"
|
||||
domainWarning=$(sudo /home/admin/config.scripts/blitz.subscriptions.letsencrypt.py subscription-detail ${domain} ${port} | jq -r ".warning")
|
||||
if [ ${#domainWarning} -gt 0 ]; then
|
||||
echo "ip2torWarn='${domainWarning}'"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -89,6 +93,10 @@ if [ "$1" = "menu" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ${#ip2torWarn} -gt 0 ]; then
|
||||
whiptail --title " Warning " --msgbox "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}" 8 55
|
||||
fi
|
||||
|
||||
text="Local Webrowser: https://${localIP}:${httpsPort}"
|
||||
|
||||
if [ ${#publicDomain} -gt 0 ]; then
|
||||
|
@ -18,6 +18,10 @@ if [ "$1" = "menu" ]; then
|
||||
echo "# collecting status info ... (please wait)"
|
||||
source <(sudo /home/admin/config.scripts/bonus.lnbits.sh status)
|
||||
|
||||
if [ ${#ip2torWarn} -gt 0 ]; then
|
||||
whiptail --title " Warning " --msgbox "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}" 8 55
|
||||
fi
|
||||
|
||||
text="Local Webrowser: https://${localIP}:${httpsPort}"
|
||||
|
||||
if [ ${#publicDomain} -gt 0 ]; then
|
||||
@ -103,6 +107,10 @@ if [ "$1" = "status" ]; then
|
||||
source <(sudo /home/admin/config.scripts/blitz.subscriptions.letsencrypt.py domain-by-ip $ip)
|
||||
if [ ${#error} -eq 0 ]; then
|
||||
echo "ip2torDomain='${domain}'"
|
||||
domainWarning=$(sudo /home/admin/config.scripts/blitz.subscriptions.letsencrypt.py subscription-detail ${domain} ${port} | jq -r ".warning")
|
||||
if [ ${#domainWarning} -gt 0 ]; then
|
||||
echo "ip2torWarn='${domainWarning}'"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user