diff --git a/docs/en_US/v5/config/protocol/server_spec.md b/docs/en_US/v5/config/protocol/server_spec.md index da82109fb..d4caa2dcc 100644 --- a/docs/en_US/v5/config/protocol/server_spec.md +++ b/docs/en_US/v5/config/protocol/server_spec.md @@ -1,5 +1,17 @@ ## ServerEndpointObject +### Structure + +```json +{ + "address": "", + "port": 0, + "user": [] +} +``` + +### Fields + > `address`: string > `port`: uint32 diff --git a/docs/en_US/v5/config/protocol/user.md b/docs/en_US/v5/config/protocol/user.md index 0cb959c6f..0eaacf096 100644 --- a/docs/en_US/v5/config/protocol/user.md +++ b/docs/en_US/v5/config/protocol/user.md @@ -1,5 +1,22 @@ ## UserObject +### Structure + +```json +{ + "level": 0, + "email": "", + "account": { + { + "@type": "v2ray.core.proxy.trojan.Account", + "password": "" + } + } +} +``` + +### Fields + > `level`: uint32 > `email`: string @@ -7,3 +24,5 @@ > `account`: {} User account, see `AccountObject` under each protocol + +- trojan [AccountObject](../proxy/trojan.md#accountobject) diff --git a/docs/en_US/v5/config/proxy/trojan.md b/docs/en_US/v5/config/proxy/trojan.md index fb590e27c..47c2ae394 100644 --- a/docs/en_US/v5/config/proxy/trojan.md +++ b/docs/en_US/v5/config/proxy/trojan.md @@ -10,6 +10,17 @@ Trojan is designed to operate in correctly configured TLS connections, as it doe * Type: Inbound Protocol * ID: `inbound.trojan` +### Structure + +```json +{ + "users": [], + "packetEncoding": "None" +} +``` + +### Fields + > `users` : [string] A set of recognized password for this inbound. @@ -29,6 +40,18 @@ This UDP behaviour is also known as FullCone or NAT1. * Type: Outbound Protocol * ID: `outbound.trojan` +### Structure + +```json +{ + "address": "", + "port": 0, + "password": "" +} +``` + +### Fields + > `address`: string The server address. Both IP and domain name is supported. @@ -45,6 +68,18 @@ A password recognized by server. * Name: `#v2ray.core.proxy.trojan.ServerConfig` +### Structure + +```json +{ + "users": [], + "packetEncoding": "None", + "fallbacks": [] +} +``` + +### Fields + > `users`: [[UserObject](../protocol/user.md#user)] > `packetEncoding`: \["None" | "Packet"\] @@ -55,16 +90,49 @@ A password recognized by server. * Name: `#v2ray.core.proxy.trojan.ClientConfig` +### Structure + +```json +{ + "server": [] +} +``` + > `server`: [[ServerEndpoint](../protocol/server_spec.md#serverendpoint)] ## AccountObject +### Structure + +```json +{ + "@type": "v2ray.core.proxy.trojan.Account", + "password": "" +} +``` + +### Fields + > `@type`: "v2ray.core.proxy.trojan.Account" > `password`: string ## FallbackObject +### Structure + +```json +{ + "alpn": "", + "path": "", + "type": "", + "dest": "", + "xver": 0 +} +``` + +### Fields + > `alpn`: string > `path`: string diff --git a/docs/v5/config/protocol/server_spec.md b/docs/v5/config/protocol/server_spec.md index da82109fb..d4caa2dcc 100644 --- a/docs/v5/config/protocol/server_spec.md +++ b/docs/v5/config/protocol/server_spec.md @@ -1,5 +1,17 @@ ## ServerEndpointObject +### Structure + +```json +{ + "address": "", + "port": 0, + "user": [] +} +``` + +### Fields + > `address`: string > `port`: uint32 diff --git a/docs/v5/config/protocol/user.md b/docs/v5/config/protocol/user.md index f3e9afe18..3ca53c1bf 100644 --- a/docs/v5/config/protocol/user.md +++ b/docs/v5/config/protocol/user.md @@ -1,5 +1,17 @@ ## UserObject +### 结构 + +```json +{ + "level": 0, + "email": "", + "account": {} +} +``` + +### 字段 + > `level`: uint32 > `email`: string @@ -7,3 +19,5 @@ > `account`: {} 用户账户,参具体协议对应的AccountObject + +- trojan [AccountObject](../proxy/trojan.md#accountobject) diff --git a/docs/v5/config/proxy/trojan.md b/docs/v5/config/proxy/trojan.md index ecd5e3927..b50e9d185 100644 --- a/docs/v5/config/proxy/trojan.md +++ b/docs/v5/config/proxy/trojan.md @@ -8,6 +8,17 @@ Trojan 被设计工作在正确配置的加密 TLS 隧道中。 * 协议名称: `trojan` +### 结构 + +```json +{ + "users": [], + "packetEncoding": "None" +} +``` + +### 字段 + > `users` : [string] 一组服务器认可用户的密码。 @@ -22,6 +33,18 @@ UDP 包编码方式,默认值为 `None`。(v5.4.0+) * 协议名称: `trojan` +### 结构 + +```json +{ + "address": "", + "port": 0, + "password": "" +} +``` + +### 字段 + > `address`: string 服务器地址,支持 IP 地址或者域名。 @@ -38,6 +61,16 @@ UDP 包编码方式,默认值为 `None`。(v5.4.0+) * 协议名称: `#v2ray.core.proxy.trojan.ServerConfig` +### 结构 + +```json +{ + "server": [] +} +``` + +### 字段 + > `users`: [[UserObject](../protocol/user.md#userobject)] > `packetEncoding`: \["None" | "Packet"\] @@ -52,12 +85,37 @@ UDP 包编码方式,默认值为 `None`。(v5.4.0+) ## AccountObject +### 结构 + +```json +{ + "@type": "v2ray.core.proxy.trojan.Account", + "password": "" +} +``` + +### 字段 + > `@type`: "v2ray.core.proxy.trojan.Account" > `password`: string ## FallbackObject +### 结构 + +```json +{ + "alpn": "", + "path": "", + "type": "", + "dest": "", + "xver": 0 +} +``` + +### 字段 + > `alpn`: string > `path`: string