2022-08-24 18:43:39 +08:00
|
|
|
### 结构
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
2022-08-31 12:50:26 +08:00
|
|
|
"type": "shadowsocks",
|
|
|
|
"tag": "ss-in",
|
|
|
|
|
|
|
|
... // 监听字段
|
|
|
|
|
|
|
|
"method": "2022-blake3-aes-128-gcm",
|
2023-11-08 12:09:22 +08:00
|
|
|
"password": "8JCsPssfgS8tiRwiMlhARg==",
|
|
|
|
"multiplex": {}
|
2022-08-24 18:43:39 +08:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### 多用户结构
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
2022-08-31 12:50:26 +08:00
|
|
|
"method": "2022-blake3-aes-128-gcm",
|
|
|
|
"password": "8JCsPssfgS8tiRwiMlhARg==",
|
|
|
|
"users": [
|
2022-08-24 18:43:39 +08:00
|
|
|
{
|
2022-08-31 12:50:26 +08:00
|
|
|
"name": "sekai",
|
|
|
|
"password": "PCD2Z4o12bKUoFa3cC97Hw=="
|
2022-08-24 18:43:39 +08:00
|
|
|
}
|
2023-11-08 12:09:22 +08:00
|
|
|
],
|
|
|
|
"multiplex": {}
|
2022-08-24 18:43:39 +08:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### 中转结构
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
2022-08-31 12:50:26 +08:00
|
|
|
"type": "shadowsocks",
|
|
|
|
"method": "2022-blake3-aes-128-gcm",
|
|
|
|
"password": "8JCsPssfgS8tiRwiMlhARg==",
|
|
|
|
"destinations": [
|
2022-08-24 18:43:39 +08:00
|
|
|
{
|
2022-08-31 12:50:26 +08:00
|
|
|
"name": "test",
|
|
|
|
"server": "example.com",
|
|
|
|
"server_port": 8080,
|
|
|
|
"password": "PCD2Z4o12bKUoFa3cC97Hw=="
|
2022-08-24 18:43:39 +08:00
|
|
|
}
|
2023-11-08 12:09:22 +08:00
|
|
|
],
|
|
|
|
"multiplex": {}
|
2022-08-24 18:43:39 +08:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-08-31 12:50:26 +08:00
|
|
|
### Listen Fields
|
|
|
|
|
2023-12-14 22:23:52 +08:00
|
|
|
See [Listen Fields](/configuration/shared/listen/) for details.
|
2022-08-31 12:50:26 +08:00
|
|
|
|
|
|
|
### 字段
|
2022-08-24 18:43:39 +08:00
|
|
|
|
|
|
|
#### network
|
|
|
|
|
|
|
|
监听的网络协议,`tcp` `udp` 之一。
|
|
|
|
|
|
|
|
默认所有。
|
|
|
|
|
|
|
|
#### method
|
|
|
|
|
|
|
|
==必填==
|
|
|
|
|
|
|
|
| 方法 | 密钥长度 |
|
|
|
|
|-------------------------------|------|
|
|
|
|
| 2022-blake3-aes-128-gcm | 16 |
|
|
|
|
| 2022-blake3-aes-256-gcm | 32 |
|
|
|
|
| 2022-blake3-chacha20-poly1305 | 32 |
|
|
|
|
| none | / |
|
|
|
|
| aes-128-gcm | / |
|
|
|
|
| aes-192-gcm | / |
|
|
|
|
| aes-256-gcm | / |
|
|
|
|
| chacha20-ietf-poly1305 | / |
|
|
|
|
| xchacha20-ietf-poly1305 | / |
|
|
|
|
|
|
|
|
#### password
|
|
|
|
|
|
|
|
==必填==
|
|
|
|
|
2023-03-05 10:50:51 +08:00
|
|
|
| 方法 | 密码格式 |
|
|
|
|
|---------------|------------------------------------------|
|
|
|
|
| none | / |
|
|
|
|
| 2022 methods | `sing-box generate rand --base64 <密钥长度>` |
|
2023-11-08 12:09:22 +08:00
|
|
|
| other methods | 任意字符串 |
|
|
|
|
|
|
|
|
#### multiplex
|
|
|
|
|
|
|
|
参阅 [多路复用](/zh/configuration/shared/multiplex#inbound)。
|