---
url: /configuration/outbound/chain.md
description: 让后一跳经前一跳连接的多跳链
---

# chain

按数组顺序串起至少两跳；最后一跳通过前一条路径连接目标。

```yaml check
outbounds:
  first:
    type: socks
    server: first.example:1080
  second:
    type: http
    server: second.example:8080
  chained:
    type: chain
    outbounds: [first, second]

route:
  final: chained

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

## 字段

### type

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

### outbounds

* 类型：出站名数组。
* 必填：是。
* 范围：至少两跳；第一跳必须是普通出站，后续每一跳都必须是能作为代理承载的普通出站。

## 说明

链的非首跳会为这条链重新构造，不能写自己的 `detour`，否则会与链的前一跳重复。内建 `DIRECT`、`REJECT`、`REJECT-DROP` 不能作为后续代理跳。

## 相关

* [出站总览](/configuration/outbound/)
* [路由总览](/configuration/route/)
