diff options
-rw-r--r-- | bin/ncp-diag | 5 | ||||
-rw-r--r-- | changelog.md | 14 | ||||
-rw-r--r-- | ncp-web/ncp-launcher.php | 3 |
3 files changed, 12 insertions, 10 deletions
diff --git a/bin/ncp-diag b/bin/ncp-diag index b7d65e26..e7f2223a 100644 --- a/bin/ncp-diag +++ b/bin/ncp-diag @@ -66,16 +66,15 @@ function is_port_open() { local port=$1 local public_ip - public_ip="$(curl icanhazip.com 2>/dev/null)" || { echo "closed"; return 1; } - + public_ip="$(curl -4 https://icanhazip.com 2>/dev/null)" || { echo "closed"; return 1; } local tmp_file=$(mktemp) local token=$(wget -T2 -t1 -qO- --keep-session-cookies --save-cookies $tmp_file https://portchecker.co | grep -oP "_csrf\" value=\"\K.*\"") - rm $tmp_file if [[ "${token}" != "" ]]; then wget -T2 -t1 -qO- --load-cookies $tmp_file https://portchecker.co --post-data "target_ip=${public_ip}&port=${port}&_csrf=${token::-1}" \ | grep -q '<span class="green">open</span>' && { echo "open"; return 1; } fi + rm $tmp_file echo "closed" } diff --git a/changelog.md b/changelog.md index ea0d65b3..da1c3208 100644 --- a/changelog.md +++ b/changelog.md @@ -1,15 +1,17 @@ -[v1.36.2](https://github.com/nextcloud/nextcloudpi/commit/fccc04c) (2021-05-11) ncp-web: fix port checking +[v1.36.3](https://github.com/nextcloud/nextcloudpi/commit/4d4717d) (2021-05-13) ncp-web: fix port checking for IPv6 dual stack -[v1.36.1](https://github.com/nextcloud/nextcloudpi/commit/c7f2939) (2021-05-09) lamp: allow only TLSv12 and TLSv13 +[v1.36.2](https://github.com/nextcloud/nextcloudpi/commit/1a8ac71) (2021-05-11) ncp-web: fix port checking -[v1.36.0 ](https://github.com/nextcloud/nextcloudpi/commit/24b6018) (2020-09-16) Namecheap dynamic DNS client +[v1.36.1 ](https://github.com/nextcloud/nextcloudpi/commit/67aa599) (2021-05-09) lamp: allow only TLSv12 and TLSv13 -[v1.35.2 ](https://github.com/nextcloud/nextcloudpi/commit/bfab195) (2021-04-29) ncp-web: fix display of big files for 32 bit +[v1.36.0 ](https://github.com/nextcloud/nextcloudpi/commit/7aef967) (2020-09-16) Namecheap dynamic DNS client -[v1.35.1 ](https://github.com/nextcloud/nextcloudpi/commit/e64ca34) (2021-04-29) ncp-web: fix backup download for big files in 32-bit +[v1.35.2 ](https://github.com/nextcloud/nextcloudpi/commit/8d76a6b) (2021-04-29) ncp-web: fix display of big files for 32 bit -[v1.35.0](https://github.com/nextcloud/nextcloudpi/commit/be30663) (2021-02-27) upgrade to NC20.0.8 +[v1.35.1 ](https://github.com/nextcloud/nextcloudpi/commit/0ee3aa9) (2021-04-29) ncp-web: fix backup download for big files in 32-bit + +[v1.35.0 ](https://github.com/nextcloud/nextcloudpi/commit/be30663) (2021-02-27) upgrade to NC20.0.8 [v1.34.9 ](https://github.com/nextcloud/nextcloudpi/commit/7d15924) (2021-01-19) nc-autoupdate-ncp: Append to log instead of replace diff --git a/ncp-web/ncp-launcher.php b/ncp-web/ncp-launcher.php index c7d26ae0..d6c52b37 100644 --- a/ncp-web/ncp-launcher.php +++ b/ncp-web/ncp-launcher.php @@ -111,7 +111,8 @@ else if ( $_POST['action'] == "info" ) || strpos( $fields[1], "open" ) !== false ) $class = 'ok-field'; if ( strpos( $fields[1], "down" ) !== false - || strpos( $fields[1], "error" ) !== false ) + || strpos( $fields[1], "error" ) !== false + || strpos( $fields[1], "closed") !== false ) $class = 'error-field'; $table .= "<td class=\"$class\">$fields[1]</td>"; |