Relay Protocol¶
The Relay protocol is a GOST proprietary protocol with both proxy and forwarding functions, which can process TCP and UDP data at the same time, and supports user authentication.
Note
The Relay protocol itself does not have the encryption function. If the data needs to be encrypted, it can be used in conjunction with the encrypted tunnel (such as tls, wss, quic, etc.).
Proxy¶
The Relay protocol can be used as a proxy protocol like HTTP/SOCKS5.
Server¶
```
gost -L relay+tls://username:password@:12345
```
Client¶
```
gost -L :8080 -F relay+tls://username:password@:12345?nodelay=false
```
Delayed Sending
By default, the relay protocol will wait for the request data, and when the request data is received, the protocol header information will be sent to the server together with the request data. When the nodelay
option is set to true
, the protocol header information will be sent to the server immediately without waiting for the client's request.
It can also be used with port forwarding to support simultaneous forwarding of TCP and UDP data
Server¶
Client¶
Port Forwarding¶
The Relay service itself can also act as a port forwarding service.
Server¶
Client¶
Remote Port Forwarding¶
The Relay protocol implements the BIND
function similar to SOCKS5 and can be used with remote port forwarding services.
The BIND function is not enabled by default and needs to be enabled by setting the bind
option to true
.