Skip to content

Commit

Permalink
documentation: Add TUIC
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Aug 4, 2023
1 parent 301bd36 commit 404f8d9
Show file tree
Hide file tree
Showing 6 changed files with 361 additions and 10 deletions.
82 changes: 82 additions & 0 deletions docs/configuration/inbound/tuic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
### Structure

```json
{
"type": "tuic",
"tag": "tuic-in",

... // Listen Fields

"users": [
{
"name": "sekai",
"uuid": "059032A9-7D40-4A96-9BB1-36823D848068",
"password": "hello"
}
],
"congestion_control": "cubic",
"auth_timeout": "3s",
"zero_rtt_handshake": false,
"heartbeat": "10s",
"tls": {}
}
```

!!! warning ""

QUIC, which is required by TUIC is not included by default, see [Installation](/#installation).

### Listen Fields

See [Listen Fields](/configuration/shared/listen) for details.

### Fields

#### users

TUIC users

#### users.uuid

==Required==

TUIC user uuid

#### users.password

TUIC user password

#### congestion_control

QUIC congestion control algorithm

One of: `cubic`, `new_reno`, `bbr`

`cubic` is used by default.

#### auth_timeout

How long the server should wait for the client to send the authentication command

`3s` is used by default.

#### zero_rtt_handshake

Enable 0-RTT QUIC connection handshake on the client side
This is not impacting much on the performance, as the protocol is fully multiplexed

!!! warning ""
Disabling this is highly recommended, as it is vulnerable to replay attacks.
See [Attack of the clones](https://blog.cloudflare.com/even-faster-connection-establishment-with-quic-0-rtt-resumption/#attack-of-the-clones)

#### heartbeat

Interval for sending heartbeat packets for keeping the connection alive

`10s` is used by default.

#### tls

==Required==

TLS configuration, see [TLS](/configuration/shared/tls/#inbound).
82 changes: 82 additions & 0 deletions docs/configuration/inbound/tuic.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
### 结构

```json
{
"type": "tuic",
"tag": "tuic-in",

... // 监听字段

"users": [
{
"name": "sekai",
"uuid": "059032A9-7D40-4A96-9BB1-36823D848068",
"password": "hello"
}
],
"congestion_control": "cubic",
"auth_timeout": "3s",
"zero_rtt_handshake": false,
"heartbeat": "10s",
"tls": {}
}
```

!!! warning ""

默认安装不包含被 TUI 依赖的 QUIC,参阅 [安装](/zh/#_2)。

### 监听字段

参阅 [监听字段](/zh/configuration/shared/listen/)

### 字段

#### users

TUIC 用户

#### users.uuid

==必填==

TUIC 用户 UUID

#### users.password

TUIC 用户密码

#### congestion_control

QUIC 流量控制算法

可选值: `cubic`, `new_reno`, `bbr`

默认使用 `cubic`

#### auth_timeout

服务器等待客户端发送认证命令的时间

默认使用 `3s`

#### zero_rtt_handshake

在客户端启用 0-RTT QUIC 连接握手
这对性能影响不大,因为协议是完全复用的

!!! warning ""
强烈建议禁用此功能,因为它容易受到重放攻击。
请参阅 [Attack of the clones](https://blog.cloudflare.com/even-faster-connection-establishment-with-quic-0-rtt-resumption/#attack-of-the-clones)

#### heartbeat

发送心跳包以保持连接存活的时间间隔

默认使用 `10s`

#### tls

==必填==

TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#inbound)
12 changes: 6 additions & 6 deletions docs/configuration/outbound/hysteria.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ Disables Path MTU Discovery (RFC 8899). Packets will then be at most 1252 (IPv4)

Force enabled on for systems other than Linux and Windows (according to upstream).

#### tls

==Required==

TLS configuration, see [TLS](/configuration/shared/tls/#outbound).

#### network

Enabled network
Expand All @@ -111,6 +105,12 @@ One of `tcp` `udp`.

Both is enabled by default.

#### tls

==Required==

TLS configuration, see [TLS](/configuration/shared/tls/#outbound).

### Dial Fields

See [Dial Fields](/configuration/shared/dial) for details.
11 changes: 7 additions & 4 deletions docs/configuration/outbound/hysteria.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ base64 编码的认证密码。

强制为 Linux 和 Windows 以外的系统启用(根据上游)。

==必填==

TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound)

#### network

启用的网络协议。
Expand All @@ -109,6 +105,13 @@ TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound)。

默认所有。

#### tls

==必填==

TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound)


### 拨号字段

参阅 [拨号字段](/zh/configuration/shared/dial/)
86 changes: 86 additions & 0 deletions docs/configuration/outbound/tuic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
### Structure

```json
{
"type": "tuic",
"tag": "tuic-out",

"server": "127.0.0.1",
"server_port": 1080,
"uuid": "2DD61D93-75D8-4DA4-AC0E-6AECE7EAC365",
"password": "hello",
"congestion_control": "cubic",
"udp_relay_mode": "native",
"zero_rtt_handshake": false,
"heartbeat": "10s",
"network": "tcp",
"tls": {},

... // Dial Fields
}
```

!!! warning ""

QUIC, which is required by TUIC is not included by default, see [Installation](/#installation).

### Fields

#### server

==Required==

The server address.

#### server_port

==Required==

The server port.

#### uuid

==Required==

TUIC user uuid

#### password

TUIC user password

#### congestion_control

QUIC congestion control algorithm

One of: `cubic`, `new_reno`, `bbr`

`cubic` is used by default.

#### udp_relay_mode

UDP packet relay mode

| Mode | Description |
|:-------|:-------------------------------------------------------------------------|
| native | native UDP characteristics |
| quic | lossless UDP relay using QUIC streams, additional overhead is introduced |

`native` is used by default.

#### network

Enabled network

One of `tcp` `udp`.

Both is enabled by default.

#### tls

==Required==

TLS configuration, see [TLS](/configuration/shared/tls/#outbound).

### Dial Fields

See [Dial Fields](/configuration/shared/dial) for details.

0 comments on commit 404f8d9

Please sign in to comment.