|
@@ -40,6 +40,9 @@ type ClientCommonConf struct {
|
|
ServerPort int `ini:"server_port" json:"server_port"`
|
|
ServerPort int `ini:"server_port" json:"server_port"`
|
|
// The maximum amount of time a dial to server will wait for a connect to complete.
|
|
// The maximum amount of time a dial to server will wait for a connect to complete.
|
|
DialServerTimeout int64 `ini:"dial_server_timeout" json:"dial_server_timeout"`
|
|
DialServerTimeout int64 `ini:"dial_server_timeout" json:"dial_server_timeout"`
|
|
|
|
+ // DialServerKeepAlive specifies the interval between keep-alive probes for an active network connection between frpc and frps.
|
|
|
|
+ // If negative, keep-alive probes are disabled.
|
|
|
|
+ DialServerKeepAlive int64 `ini:"dial_server_keepalive" json:"dial_server_keepalive"`
|
|
// ConnectServerLocalIP specifies the address of the client bind when it connect to server.
|
|
// ConnectServerLocalIP specifies the address of the client bind when it connect to server.
|
|
// By default, this value is empty.
|
|
// By default, this value is empty.
|
|
// this value only use in TCP/Websocket protocol. Not support in KCP protocol.
|
|
// this value only use in TCP/Websocket protocol. Not support in KCP protocol.
|
|
@@ -151,6 +154,9 @@ type ClientCommonConf struct {
|
|
UDPPacketSize int64 `ini:"udp_packet_size" json:"udp_packet_size"`
|
|
UDPPacketSize int64 `ini:"udp_packet_size" json:"udp_packet_size"`
|
|
// Include other config files for proxies.
|
|
// Include other config files for proxies.
|
|
IncludeConfigFiles []string `ini:"includes" json:"includes"`
|
|
IncludeConfigFiles []string `ini:"includes" json:"includes"`
|
|
|
|
+ // Enable golang pprof handlers in admin listener.
|
|
|
|
+ // Admin port must be set first.
|
|
|
|
+ PprofEnable bool `ini:"pprof_enable" json:"pprof_enable"`
|
|
}
|
|
}
|
|
|
|
|
|
// GetDefaultClientConf returns a client configuration with default values.
|
|
// GetDefaultClientConf returns a client configuration with default values.
|
|
@@ -160,6 +166,7 @@ func GetDefaultClientConf() ClientCommonConf {
|
|
ServerAddr: "0.0.0.0",
|
|
ServerAddr: "0.0.0.0",
|
|
ServerPort: 7000,
|
|
ServerPort: 7000,
|
|
DialServerTimeout: 10,
|
|
DialServerTimeout: 10,
|
|
|
|
+ DialServerKeepAlive: 7200,
|
|
HTTPProxy: os.Getenv("http_proxy"),
|
|
HTTPProxy: os.Getenv("http_proxy"),
|
|
LogFile: "console",
|
|
LogFile: "console",
|
|
LogWay: "console",
|
|
LogWay: "console",
|
|
@@ -188,6 +195,7 @@ func GetDefaultClientConf() ClientCommonConf {
|
|
Metas: make(map[string]string),
|
|
Metas: make(map[string]string),
|
|
UDPPacketSize: 1500,
|
|
UDPPacketSize: 1500,
|
|
IncludeConfigFiles: make([]string, 0),
|
|
IncludeConfigFiles: make([]string, 0),
|
|
|
|
+ PprofEnable: false,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|