---
url: /configuration/outbound/shadowsocks.md
description: 通过 Shadowsocks 服务器出站
---

# shadowsocks

使用 Shadowsocks 的流和可选 UDP 连接服务器。

```yaml check
outbounds:
  proxy:
    type: shadowsocks
    server: proxy.example:8388
    method: none
    password: ""

route:
  final: proxy

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

## 字段

### type

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

### server

* 类型：端点。
* 必填：是。
* 默认端口：`443`。

### method

* 类型：密文字符串。
* 必填：是。
* 取值：当前 Shadowsocks 实现支持的 AEAD、AEAD-2022 和 `none` 方法。

### password

* 类型：字符串。
* 必填：是。
* 行为：AEAD-2022 使用 Base64 密钥；identity headers 下依次写 `iPSK:uPSK`。

### plugin

* 类型：字符串。
* 必填：可选。
* 行为：SIP003 插件程序名。

### plugin_opts

* 类型：字符串。
* 必填：可选。
* 限制：没有 `plugin` 时写它会被拒绝。

## 说明

插件自己拨服务器，因此不能和 `detour` 同时使用；SIP003 `plugin` 与 `transport` 也只能选一个。有插件时默认 UDP 不能直发服务器 UDP 端口，需要使用 `over-tcp` 或 `xudp`。

## 相关

* [出站总览](/configuration/outbound/)
* [共享 UDP](/configuration/shared/udp)
* [共享 transport](/configuration/shared/transport)
