mirror of
https://github.com/fatedier/frp.git
synced 2025-07-16 10:51:45 +07:00
support protocol kcp
This commit is contained in:
@ -51,6 +51,7 @@ type ServerCommonConf struct {
|
||||
AuthTimeout int64
|
||||
SubDomainHost string
|
||||
TcpMux bool
|
||||
SupportKcp bool
|
||||
|
||||
// if PrivilegeAllowPorts is not nil, tcp proxies which remote port exist in this map can be connected
|
||||
PrivilegeAllowPorts [][2]int64
|
||||
@ -79,6 +80,7 @@ func GetDefaultServerCommonConf() *ServerCommonConf {
|
||||
AuthTimeout: 900,
|
||||
SubDomainHost: "",
|
||||
TcpMux: true,
|
||||
SupportKcp: true,
|
||||
MaxPoolCount: 5,
|
||||
HeartBeatTimeout: 90,
|
||||
UserConnTimeout: 10,
|
||||
@ -231,6 +233,13 @@ func LoadServerCommonConf(conf ini.File) (cfg *ServerCommonConf, err error) {
|
||||
cfg.TcpMux = true
|
||||
}
|
||||
|
||||
tmpStr, ok = conf.Get("common", "support_kcp")
|
||||
if ok && tmpStr == "false" {
|
||||
cfg.SupportKcp = false
|
||||
} else {
|
||||
cfg.SupportKcp = true
|
||||
}
|
||||
|
||||
tmpStr, ok = conf.Get("common", "heartbeat_timeout")
|
||||
if ok {
|
||||
v, errRet := strconv.ParseInt(tmpStr, 10, 64)
|
||||
|
Reference in New Issue
Block a user