1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
QUIC加密通道,支持TCP/UDP。
`cargo install thru`
TCP走QUIC通道
QUIC转TCP
```shell
thru -t quic://0.0.0.0:4242==tcp://tcpbin.com:4242 --cert certchain.pem --key key.pem
```
TCP转QUIC
```shell
thru -t tcp://127.0.0.1:4242==quic://example.com:4242 --peer-cert root.pem
```
```shell
nc 127.0.0.1 4242
```
由于QUIC使用了TLS加密,所以需要配置TLS证书。
服务端配置对应域名的证书及私钥。
对于自签名证书,客户端需要配置对应的根证书(`--peer-cert`)。如果已在系统中安装该证书,则不需要这个参数。
https://github.com/plestoon/thru