From d54d551cd53032b4b2ff64ade95ddce1d0822dd3 Mon Sep 17 00:00:00 2001 From: kzolotarev95 Date: Sun, 11 Oct 2026 15:30:40 +0400 Subject: [PATCH] chore: bump release to v113 --- files/usr/lib/owrt-remote/wan.sh | 6 +- files/usr/sbin/owrt-remote | 11 ++- files/www/cgi-bin/owrt-remote | 4 +- .../luci-static/resources/view/owrt_remote.js | 4 +- tests/HOST_POLICY.md | 20 ++-- tests/RECAPTCHA_V3.md | 6 +- tests/RESOURCE_AUDIT.md | 6 +- tests/VPS_WIDGETS.md | 8 +- tests/WAN_INTERFACE_PICKER.md | 4 +- tests/XRAY_APPLY.md | 4 +- tests/test_host_policy.py | 18 ++++ tests/test_resource_lifecycle.py | 24 ++++- vps/deploy-heartbeat-redirect.ps1 | 94 +++++++++++++++++++ vps/deploy-host-policy.ps1 | 18 ++-- vps/deploy-online-status-fix.ps1 | 90 ++++++++++++++++++ vps/deploy-recaptcha-v3.ps1 | 12 +-- vps/deploy-resource-fix.ps1 | 8 +- vps/deploy-vps-widgets.ps1 | 6 +- vps/deploy-wan-multi.ps1 | 4 +- vps/deploy-xray-apply-fix.ps1 | 2 +- vps/owrt-remote-hub.py | 27 ++++-- 21 files changed, 310 insertions(+), 66 deletions(-) create mode 100644 vps/deploy-heartbeat-redirect.ps1 create mode 100644 vps/deploy-online-status-fix.ps1 diff --git a/files/usr/lib/owrt-remote/wan.sh b/files/usr/lib/owrt-remote/wan.sh index 1a80e10..43e4154 100644 --- a/files/usr/lib/owrt-remote/wan.sh +++ b/files/usr/lib/owrt-remote/wan.sh @@ -380,8 +380,10 @@ wan_post_json() { grep -Fqx "$ip $port" "$WAN_STATE/endpoints" || return 1 fi case "$ip" in *:*) ip="[$ip]" ;; esac - # No redirect-following or certificate bypass; Host and SNI remain the URL's. - curl -fsS --noproxy '*' --interface "$device" --connect-timeout 4 --max-time 10 \ + # Follow nginx HTTP-to-HTTPS redirects while preserving this JSON POST. + # Host and TLS SNI remain the configured URL's; no certificate bypass is used. + curl -fsSL --location --max-redirs 3 --post301 --post302 --post303 \ + --noproxy '*' --interface "$device" --connect-timeout 4 --max-time 10 \ --resolve "$host:$port:$ip" \ -H "Authorization: Bearer $token" -H 'Content-Type: application/json' \ --data-binary "@$file" "$url" diff --git a/files/usr/sbin/owrt-remote b/files/usr/sbin/owrt-remote index 56f42c9..4cc3611 100644 --- a/files/usr/sbin/owrt-remote +++ b/files/usr/sbin/owrt-remote @@ -664,13 +664,15 @@ run_xray() { } heartbeat_json() { - local router_id router_name role public_url hub_url xray_state service_state ssh_state event + local router_id router_name role public_url hub_url xray_state service_state ssh_state event heartbeat_interval event="${1:-}" router_id="$(safe_id "$(uci_get router_id main)")" router_name="$(uci_get router_name "$router_id")" role="$(uci_get role node)" public_url="$(uci_get public_url '')" hub_url="$(uci_get hub_url '')" + heartbeat_interval="$(safe_num "$(uci_get heartbeat_interval 30)" 30)" + [ "$heartbeat_interval" -lt 10 ] && heartbeat_interval=10 if xray_running; then xray_state="running" @@ -706,6 +708,7 @@ heartbeat_json() { "vps_host": $(json_string "$(uci_get vps_host '')"), "vps_host_mode": $(json_string "$(vps_host_mode)"), "wan_direct": $(json_string "$(uci_get wan_direct 0)"), + "heartbeat_interval": $heartbeat_interval, "uptime": $(safe_num "$(uptime_seconds)" 0), "load": $(json_string "$(load_text)"), "memory": $(json_string "$(memory_text)"), @@ -730,7 +733,8 @@ post_json() { fi if command -v curl >/dev/null 2>&1; then - curl -fsS --connect-timeout 4 --max-time 10 --noproxy '*' \ + curl -fsSL --location --max-redirs 3 --post301 --post302 --post303 \ + --connect-timeout 4 --max-time 10 --noproxy '*' \ -H "Authorization: Bearer $token" \ -H "Content-Type: application/json" \ --data-binary "@$file" "$url" @@ -850,7 +854,8 @@ send_heartbeat() { used=0 for endpoint in $(heartbeat_candidate_endpoints); do used=1 - if post_json "$endpoint" "$token" "$tmp" >"$response"; then + if post_json "$endpoint" "$token" "$tmp" >"$response" \ + && grep -Eq '"ok"[[:space:]]*:[[:space:]]*true' "$response"; then fallback_base="$(heartbeat_base_from_endpoint "$endpoint")" if ! heartbeat_apply_hub_update "$response" "$fallback_base"; then rm -f "$tmp" "$response" diff --git a/files/www/cgi-bin/owrt-remote b/files/www/cgi-bin/owrt-remote index d0e8294..96dec2a 100644 --- a/files/www/cgi-bin/owrt-remote +++ b/files/www/cgi-bin/owrt-remote @@ -387,7 +387,7 @@ render_page() { -OpenWrt Remote Hub v112 +OpenWrt Remote Hub v113