From 0c7180e52de6e62af87ef3faaed93e1446950708 Mon Sep 17 00:00:00 2001 From: Petro1990 Date: Fri, 13 Mar 2026 20:30:35 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81:=20v1.3.8=20-=20=D1=84?= =?UTF-8?q?=D0=B8=D0=BD=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=D0=B5=20=D1=80=D0=B5?= =?UTF-8?q?=D1=88=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B0=D0=B2=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8=20(=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D0=BE=D0=B4=20X-=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rproxy | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rproxy b/rproxy index a940386..9e5ac95 100644 --- a/rproxy +++ b/rproxy @@ -3,7 +3,7 @@ # Публикация локальных сервисов через SSH-туннели + nginx на VPS # http://5.104.75.50:3000/Petro1990/rProxy -VERSION="1.3.7" +VERSION="1.3.8" CONF_DIR="/opt/etc/rproxy" CONF_FILE="$CONF_DIR/rproxy.conf" SERVICES_DIR="$CONF_DIR/services" @@ -536,6 +536,12 @@ do_add_interactive() { proxy_set_header Content-Length \"\"; proxy_set_header Authorization \$http_authorization; + # Фикс для Keenetic RCI: принудительный 401 вместо 302 редиректа + proxy_set_header X-Requested-With XMLHttpRequest; + proxy_set_header X-NDM-Auth-Type Basic; + proxy_set_header Accept \"application/json\"; + proxy_set_header Cookie \"\"; + # Стелс-режим для авторизации (используем LAN IP роутера) proxy_set_header Host \"$router_ip\"; proxy_set_header Origin \"http://$router_ip\"; @@ -557,6 +563,7 @@ do_add_interactive() { server { listen 80; server_name "$domain"; + recursive_error_pages on; proxy_buffering off; proxy_request_buffering off; @@ -599,6 +606,7 @@ NGINXEOF cat > "$tmp" << NGINXEOF server { listen $ext_port; + recursive_error_pages on; proxy_buffering off; proxy_request_buffering off; @@ -1095,7 +1103,7 @@ do_start_service() { local ssh_opts="-o StrictHostKeyChecking=no -o ServerAliveInterval=10 -o ServerAliveCountMax=3 -o ConnectTimeout=10 -o ExitOnForwardFailure=yes" local tunnel_args="-R 0.0.0.0:$SVC_TUNNEL_PORT:$SVC_TARGET_HOST:$SVC_TARGET_PORT" - [ "$SVC_NDM_AUTH" = "yes" ] && tunnel_args="$tunnel_args -R 0.0.0.0:$((SVC_TUNNEL_PORT+1)):${SVC_ROUTER_IP:-127.0.0.1}:79" + [ "$SVC_NDM_AUTH" = "yes" ] && tunnel_args="$tunnel_args -R 0.0.0.0:$((SVC_TUNNEL_PORT+1)):${SVC_ROUTER_IP:-127.0.0.1}:80" if [ "$VPS_AUTH" = "password" ]; then AUTOSSH_GATETIME=0 sshpass -p "$VPS_PASS" autossh -M 0 -f -N \