2022-08-24 18:43:39 +08:00
|
|
|
|
### 结构
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
2022-08-31 12:50:26 +08:00
|
|
|
|
"type": "trojan",
|
|
|
|
|
"tag": "trojan-in",
|
|
|
|
|
|
|
|
|
|
... // 监听字段
|
|
|
|
|
|
|
|
|
|
"users": [
|
2022-08-24 18:43:39 +08:00
|
|
|
|
{
|
2022-08-31 12:50:26 +08:00
|
|
|
|
"name": "sekai",
|
|
|
|
|
"password": "8JCsPssfgS8tiRwiMlhARg=="
|
2022-08-24 18:43:39 +08:00
|
|
|
|
}
|
2022-08-31 12:50:26 +08:00
|
|
|
|
],
|
|
|
|
|
"tls": {},
|
|
|
|
|
"fallback": {
|
|
|
|
|
"server": "127.0.0.1",
|
|
|
|
|
"server_port": 8080
|
|
|
|
|
},
|
|
|
|
|
"fallback_for_alpn": {
|
|
|
|
|
"http/1.1": {
|
|
|
|
|
"server": "127.0.0.1",
|
|
|
|
|
"server_port": 8081
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"transport": {}
|
2022-08-24 18:43:39 +08:00
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2022-08-31 12:50:26 +08:00
|
|
|
|
### 监听字段
|
|
|
|
|
|
|
|
|
|
参阅 [监听字段](/zh/configuration/shared/listen/)。
|
|
|
|
|
|
|
|
|
|
### 字段
|
2022-08-24 18:43:39 +08:00
|
|
|
|
|
|
|
|
|
#### users
|
|
|
|
|
|
|
|
|
|
==必填==
|
|
|
|
|
|
2022-08-25 09:45:22 +08:00
|
|
|
|
Trojan 用户。
|
2022-08-24 18:43:39 +08:00
|
|
|
|
|
|
|
|
|
#### tls
|
|
|
|
|
|
|
|
|
|
==如果启用 HTTP3 则必填==
|
|
|
|
|
|
2022-08-25 09:45:22 +08:00
|
|
|
|
TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#inbound)。
|
2022-08-24 18:43:39 +08:00
|
|
|
|
|
|
|
|
|
#### fallback
|
|
|
|
|
|
|
|
|
|
!!! error ""
|
|
|
|
|
|
2022-08-28 12:40:44 +08:00
|
|
|
|
没有证据表明 GFW 基于 HTTP 响应检测并阻止 Trojan 服务器,并且在服务器上打开标准 http/s 端口是一个更大的特征。
|
2022-08-24 18:43:39 +08:00
|
|
|
|
|
2022-08-25 13:35:48 +08:00
|
|
|
|
回退服务器配置。如果 `fallback` 和 `fallback_for_alpn` 为空,则禁用回退。
|
|
|
|
|
|
|
|
|
|
#### fallback_for_alpn
|
|
|
|
|
|
|
|
|
|
为 ALPN 指定回退服务器配置。
|
|
|
|
|
|
|
|
|
|
如果不为空,ALPN 不在此列表中的 TLS 回退请求将被拒绝。
|
2022-08-24 18:43:39 +08:00
|
|
|
|
|
|
|
|
|
#### transport
|
|
|
|
|
|
2022-08-31 12:50:26 +08:00
|
|
|
|
V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport)。
|