diff --git a/frontend/src/pages/xray/OutboundFormModal.vue b/frontend/src/pages/xray/OutboundFormModal.vue
index 155ff86f..4310b067 100644
--- a/frontend/src/pages/xray/OutboundFormModal.vue
+++ b/frontend/src/pages/xray/OutboundFormModal.vue
@@ -34,7 +34,6 @@ const props = defineProps({
open: { type: Boolean, default: false },
outbound: { type: Object, default: null },
existingTags: { type: Array, default: () => [] },
- inboundTags: { type: Array, default: () => [] },
});
const emit = defineEmits(['update:open', 'confirm']);
@@ -318,10 +317,8 @@ function regenerateWgKeys() {
-
+
diff --git a/frontend/src/pages/xray/OutboundsTab.vue b/frontend/src/pages/xray/OutboundsTab.vue
index 11f3b898..71139a2f 100644
--- a/frontend/src/pages/xray/OutboundsTab.vue
+++ b/frontend/src/pages/xray/OutboundsTab.vue
@@ -35,15 +35,6 @@ const props = defineProps({
isMobile: { type: Boolean, default: false },
});
-const inboundTagOptions = computed(() => {
- const out = new Set();
- for (const ib of props.templateSettings?.inbounds || []) {
- if (ib.tag) out.add(ib.tag);
- }
- for (const t of props.inboundTags || []) out.add(t);
- return [...out];
-});
-
const emit = defineEmits(['reset-traffic', 'test', 'test-all', 'show-warp', 'show-nord', 'delete']);
const testMode = ref('tcp');
@@ -443,7 +434,7 @@ const rows = computed(() => {
+ @confirm="onConfirm" />
diff --git a/frontend/src/pages/xray/RoutingTab.vue b/frontend/src/pages/xray/RoutingTab.vue
index 27ae41d3..e7ce5344 100644
--- a/frontend/src/pages/xray/RoutingTab.vue
+++ b/frontend/src/pages/xray/RoutingTab.vue
@@ -65,18 +65,32 @@ const editingRule = ref(null);
const editingIndex = ref(null);
const inboundTagOptions = computed(() => {
- const out = new Set();
+ const seen = new Set();
+ const out = [];
+
+ function pushUnique(tag) {
+ if (!tag) return;
+ if (seen.has(tag)) return;
+ seen.add(tag);
+ out.push(tag);
+ }
+
for (const ib of props.templateSettings?.inbounds || []) {
- if (ib.tag) out.add(ib.tag);
+ pushUnique(ib.tag);
+ }
+ for (const t of props.inboundTags || []) {
+ pushUnique(t);
}
- 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);
+ const rt = ob?.reverse?.tag || ob?.settings?.reverse?.tag || ob?.settings?.inboundTag;
+ pushUnique(rt);
}
- // dnsTag if DNS is configured.
- const dt = props.templateSettings?.dns?.tag;
- if (dt) out.add(dt);
+ pushUnique(props.templateSettings?.dns?.tag);
+
+ for (const s of props.templateSettings?.dns?.servers || []) {
+ if (typeof s === 'object' && s?.tag) pushUnique(s.tag);
+ }
+
return [...out];
});