From 6a293b4b2b525ee08cc4c3faff1d469a743cec1a Mon Sep 17 00:00:00 2001 From: pwnnex Date: Tue, 28 Apr 2026 14:23:32 +0300 Subject: [PATCH] xray-setting: strip legacy reverse block on save xray-core v26 dropped the original reverse-proxy feature and replaced it with VLESS Reverse Proxy (XTLS/Xray-core#5101). After upgrading xray, any panel template that still has the old `reverse: { portals: [...], bridges: [...] }` block makes the daemon fail to start with 'The feature "legacy reverse" has been removed and migrated to "VLESS Reverse Proxy"'. The panel UI used to write configs in that exact shape so a lot of in-the-wild templates carry it. strip the legacy block silently on save and log a warning. the rest of the config stays valid, xray comes back up, and the issue is self-healing on the next save. the replacement (VLESS Reverse Proxy) is a per-client field on a VLESS inbound, not a top-level block, so dropping the legacy block does not collide with the new mechanism. also adds a deprecation banner on the reverse-proxy panel tab so admins stop generating new broken configs from the UI. closes #4115. --- web/html/settings/xray/reverse.html | 4 + web/service/xray_setting.go | 57 +++++++++++++ web/service/xray_setting_test.go | 119 ++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+) diff --git a/web/html/settings/xray/reverse.html b/web/html/settings/xray/reverse.html index c15b4a8c..204ed3e8 100644 --- a/web/html/settings/xray/reverse.html +++ b/web/html/settings/xray/reverse.html @@ -1,4 +1,8 @@ {{define "settings/xray/reverse"}} + +