[GH-ISSUE #3918] Bug report: Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin #2649

Closed
opened 2026-10-31 20:26:58 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @janusn on GitHub (Mar 12, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3918

Describe the bug

I have encountered a repeating error recorded in docker logs.

$ docker logs 3x-ui
INFO - Web server running HTTPS on [::]:4993
INFO - Sub server running HTTP on [::]:2096
INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json}
WARNING - XRAY: core: Xray 26.2.6 started
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin
ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin

How to repeat the problem?

  1. starts 3x-ui container
  2. wait for the errors appear in log

Expected action

No error reported.

Received action

No idea.

config:

{
  "api": {
    "services": [
      "HandlerService",
      "LoggerService",
      "StatsService"
    ],
    "tag": "api"
  },
  "burstObservatory": null,
  "dns": null,
  "fakedns": null,
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 1234,
      "protocol": "tunnel",
      "settings": {
        "address": "127.0.0.1"
      },
      "sniffing": null,
      "streamSettings": null,
      "tag": "api"
    },
    {
      "listen": "0.0.0.0",
      "port": 443,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "email": "alice",
            "flow": "xtls-rprx-vision",
            "id": "uuid"
          }
        ],
        "decryption": "none",
        "encryption": "none",
        "fallbacks": [
          {
            "alpn": "",
            "dest": "1.2.3.4:443",
            "name": "",
            "path": "",
            "xver": 0
          }
        ],
        "testseed": [
          900,
          500,
          900,
          256
        ]
      },
      "sniffing": {
        "destOverride": [
          "http",
          "tls",
          "quic",
          "fakedns"
        ],
        "enabled": true,
        "metadataOnly": false,
        "routeOnly": true
      },
      "streamSettings": {
        "network": "tcp",
        "realitySettings": {
          "maxClientVer": "",
          "maxTimediff": 0,
          "minClientVer": "",
          "mldsa65Seed": "",
          "privateKey": "private-key",
          "serverNames": [
            "www.apple.com"
          ],
          "shortIds": [
            "00",
            "01",
            "02"
          ],
          "show": false,
          "target": "127.0.0.1:4321",
          "xver": 0
        },
        "security": "reality",
        "tcpSettings": {
          "acceptProxyProtocol": false,
          "header": {
            "type": "none"
          }
        }
      },
      "tag": "inbound-443"
    },
    {
      "listen": "127.0.0.1",
      "port": 4321,
      "protocol": "tunnel",
      "settings": {
        "address": "www.oracle.com",
        "followRedirect": false,
        "network": "tcp",
        "port": 443,
        "portMap": {}
      },
      "sniffing": {
        "destOverride": [
          "tls"
        ],
        "enabled": true,
        "metadataOnly": false,
        "routeOnly": true
      },
      "streamSettings": null,
      "tag": "inbound-127.0.0.1:4321"
    }
  ],
  "log": {
    "access": "none",
    "dnsLog": false,
    "error": "",
    "loglevel": "warning",
    "maskAddress": ""
  },
  "metrics": {
    "listen": "127.0.0.1:11111",
    "tag": "metrics_out"
  },
  "observatory": null,
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "AsIs",
        "noises": [],
        "redirect": ""
      },
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "policy": {
    "levels": {
      "0": {
        "statsUserDownlink": true,
        "statsUserUplink": true
      }
    },
    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true,
      "statsOutboundDownlink": false,
      "statsOutboundUplink": false
    }
  },
  "reverse": null,
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api",
        "type": "field"
      },
      {
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked",
        "type": "field"
      },
      {
        "domain": [
          "www.oracle.com"
        ],
        "inboundTag": [
          "inbound-127.0.0.1:4321"
        ],
        "outboundTag": "direct",
        "type": "field"
      },
      {
        "inboundTag": [
          "inbound-127.0.0.1:4321"
        ],
        "outboundTag": "blocked",
        "type": "field"
      }
    ]
  },
  "stats": {},
  "transport": null
}

3x-ui Version

2.8.11

Xray-core Version

26.2.6

Checklist

  • This bug report is written entirely in English.
  • This bug report is new and no one has reported it before me.
Originally created by @janusn on GitHub (Mar 12, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3918 ### Describe the bug I have encountered a repeating error recorded in docker logs. ``` $ docker logs 3x-ui INFO - Web server running HTTPS on [::]:4993 INFO - Sub server running HTTP on [::]:2096 INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json} WARNING - XRAY: core: Xray 26.2.6 started ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ERROR - Failed to upgrade WebSocket connection: websocket: request origin not allowed by Upgrader.CheckOrigin ``` ### How to repeat the problem? 1. starts 3x-ui container 2. wait for the errors appear in log ### Expected action No error reported. ### Received action No idea. config: ``` { "api": { "services": [ "HandlerService", "LoggerService", "StatsService" ], "tag": "api" }, "burstObservatory": null, "dns": null, "fakedns": null, "inbounds": [ { "listen": "127.0.0.1", "port": 1234, "protocol": "tunnel", "settings": { "address": "127.0.0.1" }, "sniffing": null, "streamSettings": null, "tag": "api" }, { "listen": "0.0.0.0", "port": 443, "protocol": "vless", "settings": { "clients": [ { "email": "alice", "flow": "xtls-rprx-vision", "id": "uuid" } ], "decryption": "none", "encryption": "none", "fallbacks": [ { "alpn": "", "dest": "1.2.3.4:443", "name": "", "path": "", "xver": 0 } ], "testseed": [ 900, 500, 900, 256 ] }, "sniffing": { "destOverride": [ "http", "tls", "quic", "fakedns" ], "enabled": true, "metadataOnly": false, "routeOnly": true }, "streamSettings": { "network": "tcp", "realitySettings": { "maxClientVer": "", "maxTimediff": 0, "minClientVer": "", "mldsa65Seed": "", "privateKey": "private-key", "serverNames": [ "www.apple.com" ], "shortIds": [ "00", "01", "02" ], "show": false, "target": "127.0.0.1:4321", "xver": 0 }, "security": "reality", "tcpSettings": { "acceptProxyProtocol": false, "header": { "type": "none" } } }, "tag": "inbound-443" }, { "listen": "127.0.0.1", "port": 4321, "protocol": "tunnel", "settings": { "address": "www.oracle.com", "followRedirect": false, "network": "tcp", "port": 443, "portMap": {} }, "sniffing": { "destOverride": [ "tls" ], "enabled": true, "metadataOnly": false, "routeOnly": true }, "streamSettings": null, "tag": "inbound-127.0.0.1:4321" } ], "log": { "access": "none", "dnsLog": false, "error": "", "loglevel": "warning", "maskAddress": "" }, "metrics": { "listen": "127.0.0.1:11111", "tag": "metrics_out" }, "observatory": null, "outbounds": [ { "protocol": "freedom", "settings": { "domainStrategy": "AsIs", "noises": [], "redirect": "" }, "tag": "direct" }, { "protocol": "blackhole", "settings": {}, "tag": "blocked" } ], "policy": { "levels": { "0": { "statsUserDownlink": true, "statsUserUplink": true } }, "system": { "statsInboundDownlink": true, "statsInboundUplink": true, "statsOutboundDownlink": false, "statsOutboundUplink": false } }, "reverse": null, "routing": { "domainStrategy": "AsIs", "rules": [ { "inboundTag": [ "api" ], "outboundTag": "api", "type": "field" }, { "ip": [ "geoip:private" ], "outboundTag": "blocked", "type": "field" }, { "domain": [ "www.oracle.com" ], "inboundTag": [ "inbound-127.0.0.1:4321" ], "outboundTag": "direct", "type": "field" }, { "inboundTag": [ "inbound-127.0.0.1:4321" ], "outboundTag": "blocked", "type": "field" } ] }, "stats": {}, "transport": null } ``` ### 3x-ui Version 2.8.11 ### Xray-core Version 26.2.6 ### Checklist - [x] This bug report is written entirely in English. - [x] This bug report is new and no one has reported it before me.
bsakaguchi 2026-10-31 20:26:58 +07:00
  • closed this issue
  • added the
    bug
    label
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#2649
No description provided.