---
url: /configuration/inbound/mixed.md
description: 同一端口识别 SOCKS 与 HTTP
---

# mixed

同一端口同时提供 SOCKS 和 HTTP。

```yaml check
inbounds:
  local:
    type: mixed
    listen: 127.0.0.1:7890

dns:
  servers:
    default: {type: udp, address: 127.0.0.1:53}
  final: default
```

## 字段

### type

* 类型：字符串。
* 必填：是，第一项。
* 取值：`mixed`。

### listen

* 类型：`SocketAddr`。
* 必填：是。

### tls

* 类型：[TLS 服务端块](/configuration/shared/tls-server)。
* 必填：可选。
* 默认：明文。

### users

* 类型：名字到密码的映射。
* 必填：可选。
* 默认：空。

## 说明

客户端连接的第一个字节决定是 SOCKS 还是 HTTP。承载、transport 与 fallback 行为与 `socks`/`http` 相同；`network`、`udp_timeout`、`full_cone` 可用。

## 相关

* [socks](/configuration/inbound/socks)
* [http](/configuration/inbound/http)
