From 0c6b93d8c5aa7570d545976b404415f92dd0c339 Mon Sep 17 00:00:00 2001 From: gSpot Date: Wed, 17 Dec 2025 18:56:25 +0300 Subject: [PATCH] Minor fixes. --- README.md | 36 +++++++++---------- internet-detector-mod-email/Makefile | 2 +- internet-detector-mod-modem-restart/Makefile | 2 +- internet-detector-mod-telegram/Makefile | 2 +- .../modules/mod_telegram.lua | 2 +- internet-detector/Makefile | 2 +- .../usr/lib/lua/internet-detector/main.lua | 2 +- .../modules/mod_public_ip.lua | 2 +- luci-app-internet-detector/Makefile | 2 +- .../resources/view/internet-detector.js | 3 +- 10 files changed, 28 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 0a50eaf..aecebcb 100644 --- a/README.md +++ b/README.md @@ -21,22 +21,22 @@ Internet-detector is an application for checking the availability of the Interne ## Installation notes: opkg update - wget --no-check-certificate -O /tmp/internet-detector_1.7.0-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.7.0-r1_all.ipk - opkg install /tmp/internet-detector_1.7.0-r1_all.ipk - rm /tmp/internet-detector_1.7.0-r1_all.ipk + wget --no-check-certificate -O /tmp/internet-detector_1.7.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.7.1-r1_all.ipk + opkg install /tmp/internet-detector_1.7.1-r1_all.ipk + rm /tmp/internet-detector_1.7.1-r1_all.ipk service internet-detector start service internet-detector enable - wget --no-check-certificate -O /tmp/luci-app-internet-detector_1.7.0-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-internet-detector_1.7.0-r1_all.ipk - opkg install /tmp/luci-app-internet-detector_1.7.0-r1_all.ipk - rm /tmp/luci-app-internet-detector_1.7.0-r1_all.ipk + wget --no-check-certificate -O /tmp/luci-app-internet-detector_1.7.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-internet-detector_1.7.1-r1_all.ipk + opkg install /tmp/luci-app-internet-detector_1.7.1-r1_all.ipk + rm /tmp/luci-app-internet-detector_1.7.1-r1_all.ipk service rpcd restart i18n-ru: - wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_1.7.0-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-internet-detector-ru_1.7.0-r1_all.ipk - opkg install /tmp/luci-i18n-internet-detector-ru_1.7.0-r1_all.ipk - rm /tmp/luci-i18n-internet-detector-ru_1.7.0-r1_all.ipk + wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_1.7.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-internet-detector-ru_1.7.1-r1_all.ipk + opkg install /tmp/luci-i18n-internet-detector-ru_1.7.1-r1_all.ipk + rm /tmp/luci-i18n-internet-detector-ru_1.7.1-r1_all.ipk ## Screenshots: @@ -48,9 +48,9 @@ i18n-ru: **Dependences:** modemmanager. - wget --no-check-certificate -O /tmp/internet-detector-mod-modem-restart_1.7.0-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-modem-restart_1.7.0-r1_all.ipk - opkg install /tmp/internet-detector-mod-modem-restart_1.7.0-r1_all.ipk - rm /tmp/internet-detector-mod-modem-restart_1.7.0-r1_all.ipk + wget --no-check-certificate -O /tmp/internet-detector-mod-modem-restart_1.7.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-modem-restart_1.7.1-r1_all.ipk + opkg install /tmp/internet-detector-mod-modem-restart_1.7.1-r1_all.ipk + rm /tmp/internet-detector-mod-modem-restart_1.7.1-r1_all.ipk service internet-detector restart ![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/04.jpg) @@ -59,9 +59,9 @@ i18n-ru: **Dependences:** mailsend. - wget --no-check-certificate -O /tmp/internet-detector-mod-email_1.7.0-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-email_1.7.0-r1_all.ipk - opkg install /tmp/internet-detector-mod-email_1.7.0-r1_all.ipk - rm /tmp/internet-detector-mod-email_1.7.0-r1_all.ipk + wget --no-check-certificate -O /tmp/internet-detector-mod-email_1.7.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-email_1.7.1-r1_all.ipk + opkg install /tmp/internet-detector-mod-email_1.7.1-r1_all.ipk + rm /tmp/internet-detector-mod-email_1.7.1-r1_all.ipk service internet-detector restart ![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/05.jpg) @@ -70,9 +70,9 @@ i18n-ru: **Dependences:** curl. - wget --no-check-certificate -O /tmp/internet-detector-mod-telegram_1.7.0-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-telegram_1.7.0-r1_all.ipk - opkg install /tmp/internet-detector-mod-telegram_1.7.0-r1_all.ipk - rm /tmp/internet-detector-mod-telegram_1.7.0-r1_all.ipk + wget --no-check-certificate -O /tmp/internet-detector-mod-telegram_1.7.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-telegram_1.7.1-r1_all.ipk + opkg install /tmp/internet-detector-mod-telegram_1.7.1-r1_all.ipk + rm /tmp/internet-detector-mod-telegram_1.7.1-r1_all.ipk service internet-detector restart ![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/06.jpg) diff --git a/internet-detector-mod-email/Makefile b/internet-detector-mod-email/Makefile index f343e3d..14262b3 100644 --- a/internet-detector-mod-email/Makefile +++ b/internet-detector-mod-email/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=internet-detector-mod-email -PKG_VERSION:=1.7.0 +PKG_VERSION:=1.7.1 PKG_RELEASE:=1 PKG_MAINTAINER:=gSpot diff --git a/internet-detector-mod-modem-restart/Makefile b/internet-detector-mod-modem-restart/Makefile index 5cae72a..adec89e 100644 --- a/internet-detector-mod-modem-restart/Makefile +++ b/internet-detector-mod-modem-restart/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=internet-detector-mod-modem-restart -PKG_VERSION:=1.7.0 +PKG_VERSION:=1.7.1 PKG_RELEASE:=1 PKG_MAINTAINER:=gSpot diff --git a/internet-detector-mod-telegram/Makefile b/internet-detector-mod-telegram/Makefile index af58e52..9628a9f 100644 --- a/internet-detector-mod-telegram/Makefile +++ b/internet-detector-mod-telegram/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=internet-detector-mod-telegram -PKG_VERSION:=1.7.0 +PKG_VERSION:=1.7.1 PKG_RELEASE:=1 PKG_MAINTAINER:=gSpot diff --git a/internet-detector-mod-telegram/files/usr/lib/lua/internet-detector/modules/mod_telegram.lua b/internet-detector-mod-telegram/files/usr/lib/lua/internet-detector/modules/mod_telegram.lua index e217ba5..af595eb 100644 --- a/internet-detector-mod-telegram/files/usr/lib/lua/internet-detector/modules/mod_telegram.lua +++ b/internet-detector-mod-telegram/files/usr/lib/lua/internet-detector/modules/mod_telegram.lua @@ -28,7 +28,7 @@ local Module = { msgSendAttempts = 3, msgSendTimeout = 5, curlExec = "/usr/bin/curl", - curlParams = "-s --no-keepalive", + curlParams = "-s -g --no-keepalive", status = nil, _enabled = false, _deadCounter = 0, diff --git a/internet-detector/Makefile b/internet-detector/Makefile index 93ec9d3..40d2c2a 100644 --- a/internet-detector/Makefile +++ b/internet-detector/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=internet-detector -PKG_VERSION:=1.7.0 +PKG_VERSION:=1.7.1 PKG_RELEASE:=1 PKG_MAINTAINER:=gSpot diff --git a/internet-detector/files/usr/lib/lua/internet-detector/main.lua b/internet-detector/files/usr/lib/lua/internet-detector/main.lua index 55a4eb1..c8c98d9 100644 --- a/internet-detector/files/usr/lib/lua/internet-detector/main.lua +++ b/internet-detector/files/usr/lib/lua/internet-detector/main.lua @@ -27,7 +27,7 @@ local InternetDetector = { pingCmd = "/bin/ping", pingParams = "-c 1", curlExec = "/usr/bin/curl", - curlParams = '-s --no-keepalive --head --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0"', + curlParams = '-s -g --no-keepalive --head --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0"', mode = 0, -- 0: disabled, 1: Service, 2: UI detector loggingLevel = 6, hostname = "OpenWrt", diff --git a/internet-detector/files/usr/lib/lua/internet-detector/modules/mod_public_ip.lua b/internet-detector/files/usr/lib/lua/internet-detector/modules/mod_public_ip.lua index 0a60e49..1affda9 100644 --- a/internet-detector/files/usr/lib/lua/internet-detector/modules/mod_public_ip.lua +++ b/internet-detector/files/usr/lib/lua/internet-detector/modules/mod_public_ip.lua @@ -27,7 +27,7 @@ local Module = { requestAttempts = 2, timeout = 3, curlExec = "/usr/bin/curl", - curlParams = '-s --no-keepalive --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0"', + curlParams = '-s -g --no-keepalive --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0"', providers = { opendns1 = { name = "opendns1", type = "dns", host = "myip.opendns.com", diff --git a/luci-app-internet-detector/Makefile b/luci-app-internet-detector/Makefile index 7217fdc..f431764 100644 --- a/luci-app-internet-detector/Makefile +++ b/luci-app-internet-detector/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-internet-detector -PKG_VERSION:=1.7.0 +PKG_VERSION:=1.7.1 PKG_RELEASE:=1 LUCI_TITLE:=LuCI support for internet-detector LUCI_DEPENDS:=+internet-detector diff --git a/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js b/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js index 4ca602a..958a70c 100644 --- a/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js +++ b/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js @@ -436,7 +436,7 @@ return view.extend({ }, validateUrl(section, value) { - return (/^$|^https?:\/\/[\w.-]+(:[0-9]{2,5})?[\w\/~.&?+=-]*$/.test(value)) ? + return (/^$|^https?:\/\/([\w.-]+|\[[a-fA-F0-9:.]+\])(:[0-9]{2,5})?((\/|\?).*)?$/.test(value)) ? true : _('Expecting:') + ` ${_('valid URL')}\n`; }, @@ -1698,6 +1698,7 @@ return view.extend({ o.password = true; o.modalonly = true; + // tg_chat_id o = s.taboption('telegram', this.CBITextfieldButtonInput, 'mod_telegram_chat_id', _('Chat ID'), _('ID of the Telegram chat to which messages will be sent.')