KCP is a transport type supported by GOST.
Support for KCP is based on libraries xtaci/kcp-go and xtaci/kcptun.
Usage
Server side
gost -L=kcp://:8388
Client side
gost -L=:8080 -F=kcp://server_ip:8388
Configuration
GOST has a default KCP configuration built-in,and is the same as xtaci/kcptun. you can also use the parameter c
to specify the path to an external file.
gost -L=kcp://:8388?c=/path/to/conf/file
File format:
{
"key": "it's a secrect",
"crypt": "aes",
"mode": "fast",
"mtu" : 1350,
"sndwnd": 1024,
"rcvwnd": 1024,
"datashard": 10,
"parityshard": 3,
"dscp": 0,
"nocomp": false,
"acknodelay": false,
"nodelay": 0,
"interval": 40,
"resend": 0,
"nc": 0,
"sockbuf": 4194304,
"keepalive": 10,
"snmplog": "",
"snmpperiod": 60,
"tcp": false
}
Please refer to the kcptun for more detail.
To use a KCP node in a proxy chain, there can be only one KCP node in the proxy chain, and this node can only serve as the first node in the proxy chain.
Fake TCP (2.9.1+)
You can enable the fake TCP mode via tcp
parameter or tcp
option in the config file.
This feature is only available on Linux.
Server side
gost -L=kcp://:8388?tcp=true
Client side
gost -L=:8080 -F=kcp://server_ip:8388?tcp=true