From 971513464e917735bfa7e34c1999fb019f43bbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=A1=D0=B0?= =?UTF-8?q?=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Wed, 22 Oct 2025 14:21:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=83=20=D1=81=20Secret?= =?UTF-8?q?WebPath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/html/servers.html | 9 ++++++++- web/service/inbound.go | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/web/html/servers.html b/web/html/servers.html index c95d93be..7a14456d 100644 --- a/web/html/servers.html +++ b/web/html/servers.html @@ -38,6 +38,7 @@ Name Address Port + Status Enabled Actions @@ -212,7 +213,13 @@ if (this.modal.server.id) { url = `/panel/api/servers/update/${this.modal.server.id}`; } - + let secretWebPath = this.modal.server.secretWebPath; + if (!secretWebPath.startsWith('/')) { + secretWebPath = '/' + secretWebPath.slice(1); + } + if (!secretWebPath.endsWith('/')) { + secretWebPath = secretWebPath.slice(0, -1) + '/'; + } console.log(this.modal.server); axios .post(url, this.modal.server) diff --git a/web/service/inbound.go b/web/service/inbound.go index 35f4b35e..04dd2851 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -2411,7 +2411,7 @@ func (s *InboundService) syncWithSlaves(method string, path string, contentType continue } - urlStr := fmt.Sprintf("http://%s:%d%s", server.Address, server.Port, path) + urlStr := fmt.Sprintf("http://%s:%d/%s%s", server.Address, server.Port, server.SecretWebPath, path) if len(params) > 0 { urlStr = fmt.Sprintf("%s/%s", urlStr, strings.Join(params, "/"))