Plain HTTP Tunnel¶
PHT is a data channel type in GOST.
The CONNECT method is not supported by all HTTP services. For more general use, GOST uses the more commonly used GET and POST methods in the HTTP protocol to implement data channels, including encrypted phts
and plain text pht
modes.
TLS Certificate Configuration
For TLS configuration, please refer to TLS configuration。
Without TLS¶
With TLS¶
PHT over LTS。
Custom Request Path¶
The PHT channel consists of three parts:
- Authorization - The client needs to obtain the server's authorization code before transferring data with the server. The request URI is set through the
authorizePath
option. The default value is/authorize
. - Receive data - The client receives data from the server. The request URI is set by
pullPath
option. The default value is/pull
. - Send data - The client sends data to the server. The request URI is set by
pushPath
option. The default value is/push
.
Path Matching Verification
The connection can be successfully established only when the options set by the client and the server are the same.
Proxy¶
PHT tunnel can be used in combination with various proxy protocols.
HTTP Over PHT¶
SOCKS5 Over PHT¶
Relay Over PHT¶
Port Forwarding¶
PHT tunnel can also be used as port forwarding.
Server
is equivalent to
By using port forwarding of the PHT tunnel, a PHT data channel is added to the SOCKS5 proxy service on port 1080.
At this time, port 8443 is equivalent to: