travelmate: release 2.1.4
authorDirk Brenken <[email protected]>
Tue, 16 Sep 2025 16:29:45 +0000 (18:29 +0200)
committerDirk Brenken <[email protected]>
Tue, 16 Sep 2025 16:30:44 +0000 (18:30 +0200)
- fixed  telekom login script (#27072)
- fixed the connection tracking/f_net function,
  to stabilize (vpn) connections (#27235)
- removed needless log message

Signed-off-by: Dirk Brenken <[email protected]>
net/travelmate/Makefile
net/travelmate/files/telekom.login
net/travelmate/files/travelmate.sh
net/travelmate/files/travelmate.vpn

index dfaf419ef34eda26e5d3ebfc8c6d658327f0ca2e..f7925caa63e5471d0e4984a9b1fe47980f2f8f2d 100644 (file)
@@ -1,13 +1,13 @@
 #
-# Copyright (c) 2016-2024 Dirk Brenken ([email protected])
+# Copyright (c) 2016-2025 Dirk Brenken ([email protected])
 # This is free software, licensed under the GNU General Public License v3.
 #
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=travelmate
-PKG_VERSION:=2.1.3
-PKG_RELEASE:=3
+PKG_VERSION:=2.1.4
+PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <[email protected]>
 
index 2cef0e82e7ff63988b5f7b8ca3dae10f90052e38..8c37b3b3676318070f12c1a6479cf29fb4fc0e2a 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 # captive portal auto-login script for telekom hotspots (DE)
-# Copyright (c) 2021-2022 Dirk Brenken ([email protected])
+# Copyright (c) 2021-2025 Dirk Brenken ([email protected])
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,3040,3043,3057
+# shellcheck disable=all
 
 . "/lib/functions.sh"
 
@@ -36,7 +36,7 @@ export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 
 username="$(urlencode "${1}")"
 password="$(urlencode "${2}")"
-trm_domain="telekom.portal.fon.com"
+trm_domain="hotspot.t-mobile.net"
 trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
 trm_captiveurl="$(uci_get travelmate global trm_captiveurl "http://detectportal.firefox.com")"
 trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
@@ -50,6 +50,6 @@ redirect_url="$(printf "%s" "${raw_html}" | awk 'match(tolower($0),/<loginurl>.*
 
 # final login request
 #
-raw_html="$("${trm_fetch}" --user-agent "${trm_useragent}" --referer "https://${trm_domain}" --connect-timeout $((trm_maxwait / 6)) --header "content-type: application/x-www-form-urlencoded" --location --silent --show-error --data "UserName=${username}&Password=${password}&FNAME=0&button=Login&OriginatingServer=http%3A%2F%2F${trm_captiveurl}" "${redirect_url}")"
+raw_html="$("${trm_fetch}" --user-agent "${trm_useragent}" --referer "https://${trm_domain}/wlan/rest/freeLogin" --connect-timeout $((trm_maxwait / 6)) --header "content-type: application/x-www-form-urlencoded" --location --silent --show-error --data "UserName=${username}&Password=${password}&FNAME=0&button=Login&OriginatingServer=http%3A%2F%2F${trm_captiveurl}" "${redirect_url}")"
 login_url="$(printf "%s" "${raw_html}" | awk 'match(tolower($0),/<logoffurl>.*<\/logoffurl>/){printf "%s",substr($0,RSTART+11,RLENGTH-23)}' 2>/dev/null)"
 [ -n "${login_url}" ] && exit 0 || exit 255
index 442918d6b8d7e6dcb4f8ba0e53a0b7c3fdd0615c..db9c35e62dd963d89d47031877fdedef5865296d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # travelmate, a wlan connection manager for travel router
-# Copyright (c) 2016-2024 Dirk Brenken ([email protected])
+# Copyright (c) 2016-2025 Dirk Brenken ([email protected])
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
@@ -624,7 +624,7 @@ f_addsta() {
 f_net() {
        local err_msg raw json_raw html_raw html_cp js_cp json_ec json_rc json_cp json_ed result="net nok"
 
-       raw="$("${trm_fetchcmd}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --header "Cache-Control: no-cache, no-store, must-revalidate, max-age=0" --write-out "%{json}" --silent --max-time $((trm_maxwait / 6)) "${trm_captiveurl}")"
+       raw="$("${trm_fetchcmd}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --header "Cache-Control: no-cache, no-store, must-revalidate, max-age=0" --write-out "%{json}" --silent --retry 5 --max-time $((trm_maxwait / 6)) "${trm_captiveurl}")"
        json_raw="${raw#*\{}"
        html_raw="${raw%%\{*}"
        if [ -n "${json_raw}" ]; then
@@ -916,7 +916,6 @@ f_main() {
                for radio in ${trm_radiolist}; do
                        if ! printf "%s" "${trm_stalist}" | "${trm_grepcmd}" -q "\\-${radio}"; then
                                if [ "${trm_autoadd}" = "0" ]; then
-                                       f_log "info" "no enabled station on radio '${radio}'"
                                        continue
                                fi
                        fi
index 77c94634cde83e8d0c918a67a3b07523f369cd05..053e159217c35ac343b0740384e021198161225e 100755 (executable)
@@ -1,13 +1,11 @@
 #!/bin/sh
 # vpn handler called by travelmate
-# Copyright (c) 2020-2023 Dirk Brenken ([email protected])
+# Copyright (c) 2020-2025 Dirk Brenken ([email protected])
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
 # shellcheck disable=all
 
-# Please note: you have to setup the package 'wireguard' or 'openvpn' before using this script
-
 . "/lib/functions.sh"
 
 export LC_ALL=C
@@ -30,7 +28,7 @@ trm_vpnfile="/var/state/travelmate.vpn"
 f_net() {
        local json_rc
 
-       json_rc="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --header "Cache-Control: no-cache, no-store, must-revalidate, max-age=0" --write-out "%{response_code}" --silent --output /dev/null --max-time $((trm_maxwait / 6)) "${trm_captiveurl}")"
+       json_rc="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --header "Cache-Control: no-cache, no-store, must-revalidate, max-age=0" --write-out "%{response_code}" --silent --retry 5 --output /dev/null --max-time $((trm_maxwait / 6)) "${trm_captiveurl}")"
        if [ "${json_rc}" = "200" ] || [ "${json_rc}" = "204" ]; then
                json_rc="net ok"
        fi