fix(fallbacks): allow free-form dest entries for external servers (#4748)

Since v3.1.0 every fallback row had to reference a panel inbound via childId, so rows with only a free-form dest (e.g. 8080 or 127.0.0.1:8080 to an external Nginx) were silently dropped at three layers: the frontend save filter, the backend SetByMaster guard, and BuildFallbacksJSON. A row is now valid when it has a child OR an explicit dest; self-references normalize to childId 0, and BuildFallbacksJSON prefers an explicit dest (also fixing rows whose child was deleted). UI gains allowClear on the child picker; help text updated across all locales. Verified end-to-end in Docker: a free-form dest fallback now persists and is injected into the live xray config. Refs #4554, #4639.
This commit is contained in:
MHSanaei
2026-06-02 00:17:21 +02:00
parent 5b6e05a0fc
commit 49bec1db0f
16 changed files with 28 additions and 23 deletions
+1 -1
View File
@@ -264,7 +264,7 @@
"localPanel": "Panel cục bộ",
"fallbacks": {
"title": "Fallbacks",
"help": "Khi một kết nối trên inbound này không khớp với client nào, nó sẽ được chuyển hướng tới inbound khác. Chọn một child bên dưới và các trường định tuyến (SNI / ALPN / Path / xver) sẽ được tự động điền từ transport của child — hầu hết cấu hình không cần chỉnh thêm. Mỗi child nên lắng nghe trên 127.0.0.1 với security=none.",
"help": "Khi một kết nối trên inbound này không khớp với client nào, hãy chuyển hướng tới nơi khác. Chọn một inbound con bên dưới để tự động điền các trường định tuyến (SNI / ALPN / Path / xver) từ transport của nó, hoặc để trống ô chọn và đặt Dest trực tiếp (ví dụ 8080 hoặc 127.0.0.1:8080) để chuyển hướng tới một máy chủ bên ngoài như Nginx. Mỗi inbound con nên lắng nghe trên 127.0.0.1 với security=none.",
"empty": "Chưa có fallback nào",
"add": "Thêm fallback",
"pickInbound": "Chọn một inbound",