[GH-ISSUE #5540] [Bug]: Subscription provided outbounds cannot be set as dialer proxy #3867

Closed
opened 2026-10-31 20:35:31 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @shadowpercifal on GitHub (Jun 24, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5540

Describe the bug

When editing outbound it is not possible to select subscription provided outbounds, providing id manually results in behaviour similar to "blocked"

panel installation: build for windows from releases page

How to reproduce the problem

Provided you have added a subsciption in outbounds page

  1. Edit outbound
  2. Enable sockopt
  3. Open "Dialer proxy" dropdown
    Only local outbounds will be present

Expected behavior

Dropdown shows more outbounds

Actual behavior

Dropdown only shows local ones (blocked, freedom and custom made)

Relevant logs


Screenshots

Image

3x-ui version

3.4.0

Xray-core version

No response

How did you install 3x-ui?

Manual build from source

Operating system

Windows 11

Which parts of the panel are affected?

Frontend (UI / panel pages)

Browser (only if it is a UI bug)

Chromium 146

Is the panel behind a reverse proxy or CDN?

No — direct access

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @shadowpercifal on GitHub (Jun 24, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5540 ### Describe the bug When editing outbound it is not possible to select subscription provided outbounds, providing id manually results in behaviour similar to "blocked" panel installation: build for windows from releases page ### How to reproduce the problem Provided you have added a subsciption in outbounds page 1. Edit outbound 2. Enable sockopt 3. Open "Dialer proxy" dropdown Only local outbounds will be present ### Expected behavior Dropdown shows more outbounds ### Actual behavior Dropdown only shows local ones (blocked, freedom and custom made) ### Relevant logs ```shell ``` ### Screenshots <img width="1434" height="938" alt="Image" src="https://github.com/user-attachments/assets/81d4056d-ca26-48ae-a335-40e986307200" /> ### 3x-ui version 3.4.0 ### Xray-core version _No response_ ### How did you install 3x-ui? Manual build from source ### Operating system Windows 11 ### Which parts of the panel are affected? Frontend (UI / panel pages) ### Browser (only if it is a UI bug) Chromium 146 ### Is the panel behind a reverse proxy or CDN? No — direct access ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:35:31 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 24, 2026):

The bug is confirmed by the source code. The "Dialer Proxy" dropdown in the outbound edit form only shows local (panel-defined) outbound tags because subscription outbound tags are never included in the option list passed to that dropdown.

Root cause

In frontend/src/pages/xray/outbounds/OutboundsTab.tsx, both openAdd() (around line 158) and openEdit() (around line 169) build the existingTags state from templateSettings?.outbounds only — these are the locally configured outbounds. That list is passed as existingTags to OutboundFormModal, which passes it as outboundTags to SockoptForm, where it is used to populate dialerProxyOptions for the dropdown:

// frontend/src/pages/xray/outbounds/transport/sockopt.tsx  ~line 31
const dialerProxyOptions = Array.from(
  new Set([...outboundTags, dialerProxy].filter(Boolean)),
).map((tg) => ({ value: tg, label: tg }));

The subscriptionOutbounds prop is available in OutboundsTab but is used only for the read-only subscription display (SubscriptionOutbounds component), never to feed its tags into existingTags.

Contrast with the host form

frontend/src/pages/hosts/json-forms/HostSockoptForm.tsx solves this correctly — it calls useOutboundTagGroups({ excludeBlackhole: true }), which reads data?.subscriptionOutboundTags alongside local outbound tags, and passes the combined list to the same SockoptForm. The outbound edit form does not do the equivalent.

Contributing gap in XrayPage.tsx

XrayPage.tsx already computes subscriptionOutboundTags from useXraySetting and passes it to RoutingTab and BalancersTab, but does not pass it to OutboundsTab. The OutboundsTabProps interface does not declare that field at all.

Fix sketch (for contributors)

The simplest repair is:

  1. Add a subscriptionOutboundTags?: string[] prop to OutboundsTabProps.
  2. Pass it from XrayPage.tsx alongside the existing subscriptionOutbounds prop (the value is already available there).
  3. In openAdd() and openEdit(), append the subscription tags to existingTags:
    setExistingTags([
      ...(templateSettings?.outbounds || []).map((o) => o?.tag).filter(Boolean),
      ...(subscriptionOutboundTags || []),
    ]);
    
    (For openEdit, the currently-edited outbound tag should still be excluded from the local slice to avoid a false duplicate-tag warning, but subscription tags do not need the same exclusion since they are not editable.)

An alternative is to replace the manual tag collection with useOutboundTagGroups() directly inside OutboundFormModal, matching the pattern used by HostSockoptForm.

Manual workaround

Until this is fixed, you can open the JSON tab of the outbound form, set streamSettings.sockopt.dialerProxy to the subscription outbound's tag string, then switch back to Basic. The current value of dialerProxy is always injected into dialerProxyOptions, so an existing value will appear in the dropdown on subsequent edits.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4790970763 --> @github-actions[bot] commented on GitHub (Jun 24, 2026): The bug is confirmed by the source code. The "Dialer Proxy" dropdown in the outbound edit form only shows local (panel-defined) outbound tags because subscription outbound tags are never included in the option list passed to that dropdown. **Root cause** In `frontend/src/pages/xray/outbounds/OutboundsTab.tsx`, both `openAdd()` (around line 158) and `openEdit()` (around line 169) build the `existingTags` state from `templateSettings?.outbounds` only — these are the locally configured outbounds. That list is passed as `existingTags` to `OutboundFormModal`, which passes it as `outboundTags` to `SockoptForm`, where it is used to populate `dialerProxyOptions` for the dropdown: ```ts // frontend/src/pages/xray/outbounds/transport/sockopt.tsx ~line 31 const dialerProxyOptions = Array.from( new Set([...outboundTags, dialerProxy].filter(Boolean)), ).map((tg) => ({ value: tg, label: tg })); ``` The `subscriptionOutbounds` prop is available in `OutboundsTab` but is used only for the read-only subscription display (`SubscriptionOutbounds` component), never to feed its tags into `existingTags`. **Contrast with the host form** `frontend/src/pages/hosts/json-forms/HostSockoptForm.tsx` solves this correctly — it calls `useOutboundTagGroups({ excludeBlackhole: true })`, which reads `data?.subscriptionOutboundTags` alongside local outbound tags, and passes the combined list to the same `SockoptForm`. The outbound edit form does not do the equivalent. **Contributing gap in `XrayPage.tsx`** `XrayPage.tsx` already computes `subscriptionOutboundTags` from `useXraySetting` and passes it to `RoutingTab` and `BalancersTab`, but does not pass it to `OutboundsTab`. The `OutboundsTabProps` interface does not declare that field at all. **Fix sketch (for contributors)** The simplest repair is: 1. Add a `subscriptionOutboundTags?: string[]` prop to `OutboundsTabProps`. 2. Pass it from `XrayPage.tsx` alongside the existing `subscriptionOutbounds` prop (the value is already available there). 3. In `openAdd()` and `openEdit()`, append the subscription tags to `existingTags`: ```ts setExistingTags([ ...(templateSettings?.outbounds || []).map((o) => o?.tag).filter(Boolean), ...(subscriptionOutboundTags || []), ]); ``` (For `openEdit`, the currently-edited outbound tag should still be excluded from the local slice to avoid a false duplicate-tag warning, but subscription tags do not need the same exclusion since they are not editable.) An alternative is to replace the manual tag collection with `useOutboundTagGroups()` directly inside `OutboundFormModal`, matching the pattern used by `HostSockoptForm`. **Manual workaround** Until this is fixed, you can open the JSON tab of the outbound form, set `streamSettings.sockopt.dialerProxy` to the subscription outbound's tag string, then switch back to Basic. The current value of `dialerProxy` is always injected into `dialerProxyOptions`, so an existing value will appear in the dropdown on subsequent edits. *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@MHSanaei commented on GitHub (Jun 24, 2026):

Fixed in commit e2d25d0a.

Subscription-provided outbounds now appear in the Dialer Proxy dropdown when editing an outbound. subscriptionOutboundTags is threaded from XrayPage into OutboundsTab, which builds a dedicated dialer-proxy list (local outbounds + subscription tags) and passes it to the form. The blackhole outbound ("blocked") is excluded from the dropdown since chaining a dialer through it just drops traffic, matching the existing host-form behavior. Tag-uniqueness validation is unchanged, so it still covers the blackhole tag.

<!-- gh-comment-id:4793399821 --> @MHSanaei commented on GitHub (Jun 24, 2026): Fixed in commit e2d25d0a. Subscription-provided outbounds now appear in the **Dialer Proxy** dropdown when editing an outbound. `subscriptionOutboundTags` is threaded from `XrayPage` into `OutboundsTab`, which builds a dedicated dialer-proxy list (local outbounds + subscription tags) and passes it to the form. The `blackhole` outbound ("blocked") is excluded from the dropdown since chaining a dialer through it just drops traffic, matching the existing host-form behavior. Tag-uniqueness validation is unchanged, so it still covers the blackhole tag.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3867
No description provided.