---
url: /apranik/configuration/shared/muxcool.md
---
# Mux.Cool

The `muxcool` key of a [VLESS](../protocol/vless.md) inbound or outbound: how
[Mux.Cool](../../concepts/mux-cool.md) is used. On an outbound each key means
"send"; on an inbound, "accept". Left out, UDP goes as XUDP and TCP is not
multiplexed, as in Xray's and sing-box's clients.

## Structure

```json
{
  "udp": {
    "enabled": true,
    "xudp": {
      "enabled": true,
      "global_id": { "enabled": true, "hold_time": "60s" }
    }
  },
  "tcp": { "enabled": false }
}
```

## Fields

### `udp.enabled`

boolean
Default: true

Carry UDP through Mux.Cool. `false` uses the protocol's plain UDP; on an inbound,
an Xray or sing-box client's default UDP then fails.

### `udp.xudp.enabled`

boolean
Default: true

Use XUDP: one sub-connection carries every destination of a UDP session. `false`
is refused, since plain Mux.Cool UDP is not built.

### `udp.xudp.global_id.enabled`

boolean
Default: true

Name each UDP session with a Global ID, so a session survives a lost stream (a
phone moving from Wi-Fi to mobile data): the destination keeps seeing the same
source port. Tested against Xray's server, which supports it (Xray 26.10.10). sing-box's server was not found to use it.

### `udp.xudp.global_id.hold_time`

duration
Default: 60s
inbound only

How long the server holds a session whose stream was lost. Only the same user can
take it back.

### `tcp.enabled`

boolean
Default: false

TCP over Mux.Cool is not built: `true` is refused.

`udp.concurrency`, `tcp.concurrency` and `tcp.max_total` are reserved and refused.
