From 917f9b307ef4177224ed2b03c6049cbd96ad34f9 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sat, 9 May 2026 22:03:01 +0200 Subject: [PATCH] fix(xray): surface reverse tags in routing and balancer dropdowns Outbound reverse tags now appear as inbound options in routing rules (#4199), and inbound-client reverse tags appear as outbounds in the balancer selector (#4187). Both represent virtual endpoints created by xray-core that the dropdowns previously missed. --- frontend/src/pages/xray/BalancersTab.vue | 16 +++++++++++----- frontend/src/pages/xray/RoutingTab.vue | 4 ++++ frontend/src/pages/xray/XrayPage.vue | 5 ++++- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/xray/BalancersTab.vue b/frontend/src/pages/xray/BalancersTab.vue index dc0145fa..94370886 100644 --- a/frontend/src/pages/xray/BalancersTab.vue +++ b/frontend/src/pages/xray/BalancersTab.vue @@ -20,6 +20,7 @@ const { t } = useI18n(); const props = defineProps({ templateSettings: { type: Object, default: null }, + clientReverseTags: { type: Array, default: () => [] }, }); const STRATEGY_LABELS = { @@ -40,11 +41,16 @@ const rows = computed(() => { })); }); -const outboundTags = computed( - () => (props.templateSettings?.outbounds || []) - .filter((o) => o.tag) - .map((o) => o.tag), -); +const outboundTags = computed(() => { + const tags = new Set(); + for (const o of props.templateSettings?.outbounds || []) { + if (o.tag) tags.add(o.tag); + } + for (const t of props.clientReverseTags || []) { + if (t) tags.add(t); + } + return [...tags]; +}); // === Modal state ==================================================== const modalOpen = ref(false); diff --git a/frontend/src/pages/xray/RoutingTab.vue b/frontend/src/pages/xray/RoutingTab.vue index beb28ca9..902d342d 100644 --- a/frontend/src/pages/xray/RoutingTab.vue +++ b/frontend/src/pages/xray/RoutingTab.vue @@ -70,6 +70,10 @@ const inboundTagOptions = computed(() => { if (ib.tag) out.add(ib.tag); } for (const t of props.inboundTags || []) out.add(t); + for (const ob of props.templateSettings?.outbounds || []) { + const rt = ob?.reverse?.tag || ob?.settings?.reverse?.tag; + if (rt) out.add(rt); + } // dnsTag if DNS is configured. const dt = props.templateSettings?.dns?.tag; if (dt) out.add(dt); diff --git a/frontend/src/pages/xray/XrayPage.vue b/frontend/src/pages/xray/XrayPage.vue index 42723616..bf5ed8b9 100644 --- a/frontend/src/pages/xray/XrayPage.vue +++ b/frontend/src/pages/xray/XrayPage.vue @@ -306,7 +306,10 @@ function confirmRestart() { - +