[GH-ISSUE #5049] [Bug]: Xray Crash when trying to use mKCP transport with UDP mask mKCP Legacy + uTP #3556

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

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

Describe the bug

Maybe i did something wrong in the config but this seems a little strange.
I tried to use mKCP transport over VLESS and selected UDP mask mKCP Legacy uTP. If i try to start this inbound Xray will crash with this log:

infra/conf: failed to build inbound config with tag in-port-udp > infra/conf: failed to build mask with type mkcp-legacy > infra/conf: unknown config id: mkcp-legacy

Part of config looks like this (Using in panel Xray v26.5.9)

    "kcpSettings": {
      "mtu": 1350,
      "tti": 20,
      "uplinkCapacity": 5,
      "downlinkCapacity": 20,
      "cwndMultiplier": 1,
      "maxSendingWindow": 2097152
    },
    "finalmask": {
      "udp": [
        {
          "type": "mkcp-legacy",
          "settings": {
            "header": "utp",
            "value": "key"
          }
        }
      ]
    }

How to reproduce the problem

  1. Open Inbounds page
  2. Create new VLESS inbound
  3. In Flow tab select mKCP
  4. Add UDP mask: Type mKCP Legacy Header uTP Value (random sha-256)
  5. Save and start inbound to see Xray: Stopped with log infra/conf: failed to build inbound config with tag in-port-udp > infra/conf: failed to build mask with type mkcp-legacy > infra/conf: unknown config id: mkcp-legacy

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.2.8

Xray-core version

26.5.9

How did you install 3x-ui?

Docker / Docker Compose

Operating system

Debian 13

Which parts of the panel are affected?

Xray config generation

Browser (only if it is a UI bug)

No response

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 @SHULKERPLAY on GitHub (Jun 7, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5049 ### Describe the bug Maybe i did something wrong in the config but this seems a little strange. I tried to use mKCP transport over VLESS and selected UDP mask mKCP Legacy uTP. If i try to start this inbound Xray will crash with this log: ``` infra/conf: failed to build inbound config with tag in-port-udp > infra/conf: failed to build mask with type mkcp-legacy > infra/conf: unknown config id: mkcp-legacy ``` Part of config looks like this (Using in panel Xray `v26.5.9`) ```json "kcpSettings": { "mtu": 1350, "tti": 20, "uplinkCapacity": 5, "downlinkCapacity": 20, "cwndMultiplier": 1, "maxSendingWindow": 2097152 }, "finalmask": { "udp": [ { "type": "mkcp-legacy", "settings": { "header": "utp", "value": "key" } } ] } ``` ### How to reproduce the problem 1. Open `Inbounds` page 2. Create new VLESS inbound 3. In Flow tab select mKCP 4. Add UDP mask: Type `mKCP Legacy` Header `uTP` Value `(random sha-256)` 5. Save and start inbound to see Xray: Stopped with log `infra/conf: failed to build inbound config with tag in-port-udp > infra/conf: failed to build mask with type mkcp-legacy > infra/conf: unknown config id: mkcp-legacy` ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.8 ### Xray-core version 26.5.9 ### How did you install 3x-ui? Docker / Docker Compose ### Operating system Debian 13 ### Which parts of the panel are affected? Xray config generation ### Browser (only if it is a UI bug) _No response_ ### 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:33:18 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

Root cause

The mkcp-legacy UDP mask type was added to xray-core in v26.6.1 (via XTLS/Xray-core#6201, merged 2026-05-29). xray-core v26.5.9 (released 2026-05-09) predates that change and does not register the mkcp-legacy config ID — hence infra/conf: unknown config id: mkcp-legacy.

The 3x-ui frontend UI gained the mKCP Legacy option in v3.2.5 (2026-06-01), and DockerInit.sh was updated in the same release to bundle xray-core v26.6.1. So all Docker images built from v3.2.5 onward carry v26.6.1 and do support mkcp-legacy.

Your panel reports 3x-ui v3.2.8 but Xray v26.5.9, which means your container is running from an image built before that bump — a stale cached layer.

Fix

Pull and recreate the container with the latest image:

docker compose pull
docker compose down
docker compose up -d

After the container restarts the panel's Settings → Xray page (or the version footer) should show v26.6.1 (or later). Once it does, the mKCP Legacy inbound you created will start without error.

Note: xray-core v26.6.1 consolidates the eight legacy mkcp-* / header-* KCP header types into the single mkcp-legacy type with a header field ("", dns, dtls, srtp, utp, wechat, wireguard). The config you showed is already in the correct new format — you just needed a newer xray binary to parse it.

<!-- gh-comment-id:4642489861 --> @github-actions[bot] commented on GitHub (Jun 7, 2026): ## Root cause The `mkcp-legacy` UDP mask type was added to **xray-core in v26.6.1** (via [XTLS/Xray-core#6201](https://github.com/XTLS/Xray-core/pull/6201), merged 2026-05-29). xray-core v26.5.9 (released 2026-05-09) predates that change and does not register the `mkcp-legacy` config ID — hence `infra/conf: unknown config id: mkcp-legacy`. The 3x-ui frontend UI gained the **mKCP Legacy** option in v3.2.5 (2026-06-01), and `DockerInit.sh` was updated in the same release to bundle **xray-core v26.6.1**. So all Docker images built from v3.2.5 onward carry v26.6.1 and *do* support `mkcp-legacy`. Your panel reports **3x-ui v3.2.8** but **Xray v26.5.9**, which means your container is running from an image built before that bump — a stale cached layer. ## Fix Pull and recreate the container with the latest image: ```bash docker compose pull docker compose down docker compose up -d ``` After the container restarts the panel's **Settings → Xray** page (or the version footer) should show **v26.6.1** (or later). Once it does, the mKCP Legacy inbound you created will start without error. > **Note:** xray-core v26.6.1 consolidates the eight legacy `mkcp-*` / `header-*` KCP header types into the single `mkcp-legacy` type with a `header` field (`""`, `dns`, `dtls`, `srtp`, `utp`, `wechat`, `wireguard`). The config you showed is already in the correct new format — you just needed a newer xray binary to parse it.
Author
Owner

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

True my bad. Thanks, Claude Sonnet 4.6!

Note: xray-core v26.6.1 consolidates the eight legacy mkcp-* / header-* KCP header types into the single mkcp-legacy type with a header field ("", dns, dtls, srtp, utp, wechat, wireguard). The config you showed is already in the correct new format — you just needed a newer xray binary to parse it.

<!-- gh-comment-id:4642543794 --> @SHULKERPLAY commented on GitHub (Jun 7, 2026): True my bad. Thanks, Claude Sonnet 4.6! > **Note:** xray-core v26.6.1 consolidates the eight legacy `mkcp-*` / `header-*` KCP header types into the single `mkcp-legacy` type with a `header` field (`""`, `dns`, `dtls`, `srtp`, `utp`, `wechat`, `wireguard`). The config you showed is already in the correct new format — you just needed a newer xray binary to parse it.
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#3556
No description provided.