diff --git a/frontend/src/pages/xray/XrayPage.tsx b/frontend/src/pages/xray/XrayPage.tsx index 5ccfa9205..50770a086 100644 --- a/frontend/src/pages/xray/XrayPage.tsx +++ b/frontend/src/pages/xray/XrayPage.tsx @@ -221,6 +221,7 @@ export default function XrayPage() { testingAll={testingAll} inboundTags={inboundTags} subscriptionOutbounds={subscriptionOutbounds} + subscriptionOutboundTags={subscriptionOutboundTags} isMobile={isMobile} onResetTraffic={resetOutboundsTraffic} onTest={onTestOutbound} diff --git a/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx b/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx index 4df48d0c1..049eaf6d2 100644 --- a/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx +++ b/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx @@ -83,6 +83,7 @@ interface OutboundFormModalProps { open: boolean; outbound: Record | null; existingTags: string[]; + dialerProxyTags?: string[]; onClose: () => void; onConfirm: (outbound: Record) => void; } @@ -92,6 +93,7 @@ export default function OutboundFormModal({ open, outbound: outboundProp, existingTags, + dialerProxyTags, onClose, onConfirm, }: OutboundFormModalProps) { @@ -514,7 +516,7 @@ export default function OutboundFormModal({ {security === 'reality' && realityAllowed && } {((streamAllowed && network) || !streamAllowed || protocol === 'wireguard') && ( - + )} void; onTest: (index: number, mode: string) => void; @@ -94,6 +95,7 @@ export default function OutboundsTab({ testingAll, inboundTags: _inboundTags, subscriptionOutbounds, + subscriptionOutboundTags, isMobile, onResetTraffic, onTest, @@ -140,6 +142,19 @@ export default function OutboundsTab({ const rows = useMemo(() => outbounds.map((o, i) => ({ ...o, key: i })), [outbounds]); + const dialerProxyTags = useMemo(() => { + const tags = new Set(); + (templateSettings?.outbounds || []).forEach((o, i) => { + if (i === editingIndex) return; + if (o?.protocol === 'blackhole') return; + if (o?.tag) tags.add(o.tag); + }); + for (const tag of subscriptionOutboundTags || []) { + if (tag) tags.add(tag); + } + return [...tags]; + }, [templateSettings?.outbounds, editingIndex, subscriptionOutboundTags]); + const mutate = useCallback( (mutator: (next: XraySettingsValue) => void) => { setTemplateSettings((prev) => { @@ -521,6 +536,7 @@ export default function OutboundsTab({ open={modalOpen} outbound={editingOutbound} existingTags={existingTags} + dialerProxyTags={dialerProxyTags} onClose={() => setModalOpen(false)} onConfirm={onConfirm} />