sing-box/docs/configuration/inbound/trojan.md

69 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2022-08-08 12:57:50 +00:00
### Structure
```json
{
2022-08-31 04:50:26 +00:00
"type": "trojan",
"tag": "trojan-in",
... // Listen Fields
"users": [
2022-08-08 12:57:50 +00:00
{
2022-08-31 04:50:26 +00:00
"name": "sekai",
"password": "8JCsPssfgS8tiRwiMlhARg=="
2022-08-08 12:57:50 +00:00
}
2022-08-31 04:50:26 +00: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
}
},
"multiplex": {},
2022-08-31 04:50:26 +00:00
"transport": {}
2022-08-08 12:57:50 +00:00
}
```
2022-08-31 04:50:26 +00:00
### Listen Fields
2023-12-14 14:23:52 +00:00
See [Listen Fields](/configuration/shared/listen/) for details.
2022-08-31 04:50:26 +00:00
### Fields
2022-08-23 15:15:56 +00:00
#### users
==Required==
2022-08-23 15:15:56 +00:00
Trojan users.
#### tls
TLS configuration, see [TLS](/configuration/shared/tls/#inbound).
2022-08-23 15:15:56 +00:00
#### fallback
2024-09-23 08:51:55 +00:00
!!! failure ""
2022-08-23 15:15:56 +00:00
There is no evidence that GFW detects and blocks Trojan servers based on HTTP responses, and opening the standard http/s port on the server is a much bigger signature.
2022-08-25 05:35:48 +00:00
Fallback server configuration. Disabled if `fallback` and `fallback_for_alpn` are empty.
#### fallback_for_alpn
Fallback server configuration for specified ALPN.
If not empty, TLS fallback requests with ALPN not in this table will be rejected.
2022-08-23 15:15:56 +00:00
#### multiplex
See [Multiplex](/configuration/shared/multiplex#inbound) for details.
2022-08-23 15:15:56 +00:00
#### transport
2023-12-14 14:23:52 +00:00
V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport/).