[GH-ISSUE #5023] [Bug]: externalProxy missing from /panel/api/inbounds/list (and get) responses + updates via token have no effect #3536

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

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

Describe the bug

When authenticating only with the 3x-UI API token (Authorization: Bearer + X-UI-INBOUND-KEY), the inbound objects returned by /panel/api/inbounds/list (and subsequent per-id lookups) never contain the externalProxy field, even for inbounds that have external hosts configured through the web UI.

Posting an update containing externalProxy at the top level to /panel/api/inbounds/update/{id} returns 200, but the change is never reflected in the panel (neither in the inbound list nor when editing the inbound), even after:

  • Restarting Xray from the panel
  • Restarting the 3x-UI service itself
  • Hard-refreshing the browser / logout+login
  • Manually opening the inbound for edit

Environment

  • 3x-UI version: (please fill — e.g. v2.3.x or whatever you see)
  • Using custom/obfuscated web path (e.g. http://127.0.0.1:17446/8WqqarhYPjFRqQHoRd/)
  • Authentication: API token only (from Settings → API). No session cookie.
  • Using the "External" / external hosts feature on specific inbounds (remarks containing cf, e.g. [] NL1-CF, [] NL2-CF, etc.)

How to reproduce the problem

  1. GET /panel/api/inbounds/list (with Bearer + X-UI-INBOUND-KEY)
  2. Locate a target inbound (in this case by remark containing "cf").
  3. The returned object for the inbound only has these top-level keys:
    [up total remark trafficReset tag sniffing id expiryTime clientStats enable port down lastTrafficResetTime listen protocol settings streamSettings]

There is no externalProxy key (we also explicitly parsed the settings string value looking for it — still absent).

  1. Build an update payload by taking the object from step 3 and adding/overriding:
    "externalProxy": [
      {"host": "1.2.3.4", "sni": "1.2.3.4", "alpn": "h2", "fingerprint": "random", "remark": "...", "port": 443},
      ...
    ]
    
  2. POST /panel/api/inbounds/update/{id} → HTTP 200 (response body is large, ~110-122k).
  3. Restart Xray via the panel.
  4. In the web UI, the external hosts list for that inbound is unchanged (old entries remain, new ones do not appear).

• The same token works correctly for listing inbounds and updating other fields on the same inbounds.
• The web UI itself can see and configure external hosts without problems.
• A supporting Go client (stdlib only) that produces the exact logs above is available if useful.
• Using a real session cookie (full username/password login) may behave differently — this is currently being tested by the reporter.

Expected behavior

• externalProxy (when set on an inbound) should be returned in the objects from /panel/api/inbounds/list and equivalent get paths, even under API token authentication.
• Updates containing externalProxy at the root level (same shape used by the web UI) should be persisted when the token auth path already works for listing and updating other inbound fields.

Actual behavior

No response

Relevant logs

Jun 06 18:35:27 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:27 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT>
Jun 06 18:35:27 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (>
Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT>
Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:35 NL-Main /usr/local/x-ui/x-ui[56636]: ERROR - Failed to upgrade WebSocket connection: websocket: the client is not using the websocket protocol: 'upgrade' t>
Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (>
Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT>
Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (>
Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT>
Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:43 NL-Main /usr/local/x-ui/x-ui[56636]: ERROR - Failed to upgrade WebSocket connection: websocket: the client is not using the websocket protocol: 'upgrade' t>
Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (>
Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT>
Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (>
Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT>
Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (>
Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT>
Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (>
Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT>
Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
Jun 06 18:36:07 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (>
Jun 06 18:36:07 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA>
lines 1-42

Screenshots

No response

3x-ui version

3.2.8

Xray-core version

26.6.1

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

Backend (API endpoints, login, settings)

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

Yes — Nginx

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 @rqzbeh on GitHub (Jun 6, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5023 ### Describe the bug When authenticating only with the 3x-UI API token (`Authorization: Bearer` + `X-UI-INBOUND-KEY`), the inbound objects returned by `/panel/api/inbounds/list` (and subsequent per-id lookups) never contain the `externalProxy` field, even for inbounds that have external hosts configured through the web UI. Posting an update containing `externalProxy` at the top level to `/panel/api/inbounds/update/{id}` returns 200, but the change is never reflected in the panel (neither in the inbound list nor when editing the inbound), even after: - Restarting Xray from the panel - Restarting the 3x-UI service itself - Hard-refreshing the browser / logout+login - Manually opening the inbound for edit ### Environment - 3x-UI version: **(please fill — e.g. v2.3.x or whatever you see)** - Using custom/obfuscated web path (e.g. `http://127.0.0.1:17446/8WqqarhYPjFRqQHoRd/`) - Authentication: API token only (from Settings → API). No session cookie. - Using the "External" / external hosts feature on specific inbounds (remarks containing `cf`, e.g. `[] NL1-CF`, `[] NL2-CF`, etc.) ### How to reproduce the problem 1. `GET /panel/api/inbounds/list` (with Bearer + X-UI-INBOUND-KEY) 2. Locate a target inbound (in this case by remark containing "cf"). 3. The returned object for the inbound only has these top-level keys: [up total remark trafficReset tag sniffing id expiryTime clientStats enable port down lastTrafficResetTime listen protocol settings streamSettings] There is **no `externalProxy` key** (we also explicitly parsed the `settings` string value looking for it — still absent). 4. Build an update payload by taking the object from step 3 and adding/overriding: ```json "externalProxy": [ {"host": "1.2.3.4", "sni": "1.2.3.4", "alpn": "h2", "fingerprint": "random", "remark": "...", "port": 443}, ... ] 5. POST /panel/api/inbounds/update/{id} → HTTP 200 (response body is large, ~110-122k). 6. Restart Xray via the panel. 7. In the web UI, the external hosts list for that inbound is unchanged (old entries remain, new ones do not appear). • The same token works correctly for listing inbounds and updating other fields on the same inbounds. • The web UI itself can see and configure external hosts without problems. • A supporting Go client (stdlib only) that produces the exact logs above is available if useful. • Using a real session cookie (full username/password login) may behave differently — this is currently being tested by the reporter. ### Expected behavior • externalProxy (when set on an inbound) should be returned in the objects from /panel/api/inbounds/list and equivalent get paths, even under API token authentication. • Updates containing externalProxy at the root level (same shape used by the web UI) should be persisted when the token auth path already works for listing and updating other inbound fields. ### Actual behavior _No response_ ### Relevant logs ```shell Jun 06 18:35:27 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:27 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT> Jun 06 18:35:27 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (> Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT> Jun 06 18:35:32 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:35 NL-Main /usr/local/x-ui/x-ui[56636]: ERROR - Failed to upgrade WebSocket connection: websocket: the client is not using the websocket protocol: 'upgrade' t> Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (> Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT> Jun 06 18:35:37 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (> Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT> Jun 06 18:35:42 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:43 NL-Main /usr/local/x-ui/x-ui[56636]: ERROR - Failed to upgrade WebSocket connection: websocket: the client is not using the websocket protocol: 'upgrade' t> Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (> Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT> Jun 06 18:35:47 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (> Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT> Jun 06 18:35:52 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (> Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT> Jun 06 18:35:57 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (> Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv2 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for us-srv failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTAT> Jun 06 18:36:02 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for ca-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> Jun 06 18:36:07 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for NL-Cloudvider failed: ERROR: CASE types boolean and integer cannot be matched (> Jun 06 18:36:07 NL-Main /usr/local/x-ui/x-ui[56636]: WARNING - node traffic sync: merge for nl-srv1 failed: ERROR: CASE types boolean and integer cannot be matched (SQLSTA> lines 1-42 ``` ### Screenshots _No response_ ### 3x-ui version 3.2.8 ### Xray-core version 26.6.1 ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24.04 ### Which parts of the panel are affected? Backend (API endpoints, login, settings) ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? Yes — Nginx ### 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:33:08 +07:00
Author
Owner

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

Thanks for the detailed report. After tracing through the source (database/model/model.go, web/service/inbound.go, web/controller/inbound.go) I can explain both observations.


1. externalProxy is in streamSettings, not at the top level

The Inbound model has these top-level JSON fields:

id  up  down  total  remark  enable  expiryTime  trafficReset
lastTrafficResetTime  listen  port  protocol  settings  streamSettings
tag  sniffing  nodeId  clientStats

externalProxy is a field inside streamSettings, not a sibling of it. The panel stores and retrieves it as part of the stream_settings column. Because Inbound.MarshalJSON() expands streamSettings from a stored JSON string into a real nested JSON object, the list/get response looks like:

{
  "id": 42,
  "remark": "[] NL1-CF",
  "settings": { "clients": [...] },
  "streamSettings": {
    "network": "tcp",
    "security": "tls",
    "tlsSettings": { ... },
    "externalProxy": [
      { "forceTls": "same", "dest": "1.2.3.4", "port": 443, "remark": "...", "sni": "1.2.3.4", "fingerprint": "random", "alpn": ["h2"] }
    ]
  },
  ...
}

The externalProxy array was never in settings (the protocol-level object that holds clients), so searching that field would always come up empty. Check response.obj.streamSettings.externalProxy instead.


2. Why the update POST returns 200 but nothing changes

When you POST to /panel/api/inbounds/update/{id}, the body is deserialized into model.Inbound. That struct has no top-level externalProxy field, so Go's JSON decoder silently ignores any unknown keys — including a top-level externalProxy. The 200 response is returned after the record is saved, but the field was never read.

To update external proxy entries, externalProxy must be inside the streamSettings JSON object you send:

{
  "id": 42,
  "remark": "[] NL1-CF",
  "enable": true,
  "port": 443,
  "protocol": "vless",
  "settings": { ... full current settings ... },
  "streamSettings": {
    "network": "tcp",
    "security": "tls",
    "tlsSettings": { ... },
    "externalProxy": [
      { "forceTls": "same", "dest": "1.2.3.4", "port": 443, "remark": "edge1", "sni": "1.2.3.4", "fingerprint": "random", "alpn": ["h2"] },
      { "forceTls": "same", "dest": "5.6.7.8", "port": 443, "remark": "edge2", "sni": "5.6.7.8", "fingerprint": "random", "alpn": ["h2"] }
    ]
  },
  "sniffing": { ... },
  "tag": "..."
}

The safest approach is to:

  1. GET /panel/api/inbounds/get/{id} to fetch the complete current object (its streamSettings will already contain externalProxy if one is configured).
  2. Modify response.obj.streamSettings.externalProxy in your client.
  3. POST /panel/api/inbounds/update/{id} with the modified full object (the streamSettings value you send can be either a nested JSON object or a JSON-encoded string — both are accepted by UnmarshalJSON).

Side note on the log errors

The node traffic sync: merge for … failed: ERROR: CASE types boolean and integer cannot be matched lines are a separate PostgreSQL-specific bug in the node traffic sync job and are unrelated to externalProxy. If that's causing problems for you, it would be worth opening a separate issue with details about your node setup (panel + node versions, PostgreSQL version).


Closing as a question since the behavior is working as designed. Feel free to reopen if after trying the above the externalProxy field is genuinely absent from streamSettings in your API responses.

<!-- gh-comment-id:4640006224 --> @github-actions[bot] commented on GitHub (Jun 6, 2026): Thanks for the detailed report. After tracing through the source (`database/model/model.go`, `web/service/inbound.go`, `web/controller/inbound.go`) I can explain both observations. --- ## 1. `externalProxy` is in `streamSettings`, not at the top level The `Inbound` model has these top-level JSON fields: ``` id up down total remark enable expiryTime trafficReset lastTrafficResetTime listen port protocol settings streamSettings tag sniffing nodeId clientStats ``` `externalProxy` is a field **inside** `streamSettings`, not a sibling of it. The panel stores and retrieves it as part of the `stream_settings` column. Because `Inbound.MarshalJSON()` expands `streamSettings` from a stored JSON string into a real nested JSON object, the list/get response looks like: ```json { "id": 42, "remark": "[] NL1-CF", "settings": { "clients": [...] }, "streamSettings": { "network": "tcp", "security": "tls", "tlsSettings": { ... }, "externalProxy": [ { "forceTls": "same", "dest": "1.2.3.4", "port": 443, "remark": "...", "sni": "1.2.3.4", "fingerprint": "random", "alpn": ["h2"] } ] }, ... } ``` The `externalProxy` array was never in `settings` (the protocol-level object that holds `clients`), so searching that field would always come up empty. Check `response.obj.streamSettings.externalProxy` instead. --- ## 2. Why the update POST returns 200 but nothing changes When you POST to `/panel/api/inbounds/update/{id}`, the body is deserialized into `model.Inbound`. That struct has no top-level `externalProxy` field, so Go's JSON decoder silently ignores any unknown keys — including a top-level `externalProxy`. The 200 response is returned after the record is saved, but the field was never read. To update external proxy entries, `externalProxy` must be **inside** the `streamSettings` JSON object you send: ```json { "id": 42, "remark": "[] NL1-CF", "enable": true, "port": 443, "protocol": "vless", "settings": { ... full current settings ... }, "streamSettings": { "network": "tcp", "security": "tls", "tlsSettings": { ... }, "externalProxy": [ { "forceTls": "same", "dest": "1.2.3.4", "port": 443, "remark": "edge1", "sni": "1.2.3.4", "fingerprint": "random", "alpn": ["h2"] }, { "forceTls": "same", "dest": "5.6.7.8", "port": 443, "remark": "edge2", "sni": "5.6.7.8", "fingerprint": "random", "alpn": ["h2"] } ] }, "sniffing": { ... }, "tag": "..." } ``` The safest approach is to: 1. `GET /panel/api/inbounds/get/{id}` to fetch the complete current object (its `streamSettings` will already contain `externalProxy` if one is configured). 2. Modify `response.obj.streamSettings.externalProxy` in your client. 3. `POST /panel/api/inbounds/update/{id}` with the modified full object (the `streamSettings` value you send can be either a nested JSON object or a JSON-encoded string — both are accepted by `UnmarshalJSON`). --- ## Side note on the log errors The `node traffic sync: merge for … failed: ERROR: CASE types boolean and integer cannot be matched` lines are a separate PostgreSQL-specific bug in the node traffic sync job and are unrelated to `externalProxy`. If that's causing problems for you, it would be worth opening a separate issue with details about your node setup (panel + node versions, PostgreSQL version). --- Closing as a question since the behavior is working as designed. Feel free to reopen if after trying the above the `externalProxy` field is genuinely absent from `streamSettings` in your API responses.
Author
Owner

@rqzbeh commented on GitHub (Jun 7, 2026):

well I think you were wrong, especially on postgreSQL version, I did commit a fix for that in:
https://github.com/MHSanaei/3x-ui/pull/5038

<!-- gh-comment-id:4641463722 --> @rqzbeh commented on GitHub (Jun 7, 2026): well I think you were wrong, especially on postgreSQL version, I did commit a fix for that in: https://github.com/MHSanaei/3x-ui/pull/5038
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#3536
No description provided.