Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–31 unchanged (31 lines)
32type ClientCommonConf struct {
33 auth.ClientConfig `ini:",extends"`
34
35 // ServerAddr specifies the address of the server to connect to. By
36 // default, this value is "0.0.0.0".
37 ServerAddr string `ini:"server_addr" json:"server_addr"`
38 // Specify another address of the server to connect for nat hole. By default, it's same with
39 // ServerAddr.
40 NatHoleServerAddr string `ini:"nat_hole_server_addr" json:"nat_hole_server_addr"`
41 // ServerPort specifies the port to connect to the server on. By default,
42 // this value is 7000.
43 ServerPort int `ini:"server_port" json:"server_port"`
44 // ServerUDPPort specifies the server port to help penetrate NAT hole. By default, this value is 0.
45 // This parameter is only used when executing "nathole discover" in the command line.
46 ServerUDPPort int `ini:"server_udp_port" json:"server_udp_port"`
47 // STUN server to help penetrate NAT hole.
48 NatHoleSTUNServer string `ini:"nat_hole_stun_server" json:"nat_hole_stun_server"`
49 // The maximum amount of time a dial to server will wait for a connect to complete.
50 DialServerTimeout int64 `ini:"dial_server_timeout" json:"dial_server_timeout"`
51 // DialServerKeepAlive specifies the interval between keep-alive probes for an active network connection between frpc and frps.
52 // If negative, keep-alive probes are disabled.
…lines 53–425 unchanged (373 lines)

After

…lines 1–31 unchanged (31 lines)
32type ClientCommonConf struct {
33 auth.ClientConfig `ini:",extends"`
34
35 // ServerAddr specifies the address of the server to connect to. By
36 // default, this value is "0.0.0.0".
37 ServerAddr string `ini:"server_addr" json:"server_addr"`
38 // ServerPort specifies the port to connect to the server on. By default,
39 // this value is 7000.
40 ServerPort int `ini:"server_port" json:"server_port"`
41 // STUN server to help penetrate NAT hole.
42 NatHoleSTUNServer string `ini:"nat_hole_stun_server" json:"nat_hole_stun_server"`
43 // The maximum amount of time a dial to server will wait for a connect to complete.
44 DialServerTimeout int64 `ini:"dial_server_timeout" json:"dial_server_timeout"`
45 // DialServerKeepAlive specifies the interval between keep-alive probes for an active network connection between frpc and frps.
46 // If negative, keep-alive probes are disabled.
47 DialServerKeepAlive int64 `ini:"dial_server_keepalive" json:"dial_server_keepalive"`
…lines 48–419 unchanged (372 lines)

Before

source_file
comment "// Copyright 2020 The frp Authors"
comment "//"
comment "// Licensed under the Apache License, Version 2.0 (the \"Lice"...
comment "// you may not use this file except in compliance with the L"...
comment "// You may obtain a copy of the License at"
comment "//"
comment "// http://www.apache.org/licenses/LICENSE-2.0"
comment "//"
comment "// Unless required by applicable law or agreed to in writing"...
comment "// distributed under the License is distributed on an \"AS IS"...
comment "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expr"...
comment "// See the License for the specific language governing permi"...
comment "// limitations under the License."
package_clause
package "package"
package_identifier "config"
import_declaration (+40 nodes collapsed)
comment "// ClientCommonConf contains information for a client servic"...
comment "// recommended to use GetDefaultClientConf instead of creati"...
comment "// directly, so that all unspecified fields have reasonable "...
type_declaration
type "type"
type_spec
type_identifier "ClientCommonConf"
struct_type
struct "struct"
field_declaration_list
{ "{"
field_declaration
qualified_type
package_identifier "auth"
. "."
type_identifier "ClientConfig"
raw_string_literal
` "`"
raw_string_literal_content "ini:\",extends\""
` "`"
comment "// ServerAddr specifies the address of the server to connect"...
comment "// default, this value is \"0.0.0.0\"."
field_declaration
field_identifier "ServerAddr"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"server_addr\" json:\"server_addr\""
` "`"
comment "// Specify another address of the server to connect for nat "...
comment "// ServerAddr."
field_declaration
field_identifier "NatHoleServerAddr"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"nat_hole_server_addr\" json:\"nat_hole_server_addr\""
` "`"
comment "// ServerPort specifies the port to connect to the server on"...
comment "// this value is 7000."
field_declaration
field_identifier "ServerPort"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"server_port\" json:\"server_port\""
` "`"
comment "// ServerUDPPort specifies the server port to help penetrate"...
comment "// This parameter is only used when executing \"nathole disco"...
field_declaration
field_identifier "ServerUDPPort"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"server_udp_port\" json:\"server_udp_port\""
` "`"
comment "// STUN server to help penetrate NAT hole."
field_declaration
field_identifier "NatHoleSTUNServer"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"nat_hole_stun_server\" json:\"nat_hole_stun_server\""
` "`"
comment "// The maximum amount of time a dial to server will wait for"...
field_declaration
field_identifier "DialServerTimeout"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"dial_server_timeout\" json:\"dial_server_timeout\""
` "`"
comment "// DialServerKeepAlive specifies the interval between keep-a"...
comment "// If negative, keep-alive probes are disabled."
field_declaration
field_identifier "DialServerKeepAlive"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"dial_server_keepalive\" json:\"dial_server_keepalive\""
` "`"
comment "// ConnectServerLocalIP specifies the address of the client "...
comment "// By default, this value is empty."
comment "// this value only use in TCP/Websocket protocol. Not suppor"...
field_declaration
field_identifier "ConnectServerLocalIP"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"connect_server_local_ip\" json:\"connect_server_local_ip\""
` "`"
comment "// HTTPProxy specifies a proxy address to connect to the ser"...
comment "// this value is \"\", the server will be connected to directl"...
comment "// this value is read from the \"http_proxy\" environment vari"...
field_declaration
field_identifier "HTTPProxy"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"http_proxy\" json:\"http_proxy\""
` "`"
comment "// LogFile specifies a file where logs will be written to. T"...
comment "// only be used if LogWay is set appropriately. By default, "...
comment "// \"console\"."
field_declaration
field_identifier "LogFile"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"log_file\" json:\"log_file\""
` "`"
comment "// LogWay specifies the way logging is managed. Valid values"...
comment "// or \"file\". If \"console\" is used, logs will be printed to "...
comment "// \"file\" is used, logs will be printed to LogFile. By defau"...
comment "// is \"console\"."
field_declaration
field_identifier "LogWay"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"log_way\" json:\"log_way\""
` "`"
comment "// LogLevel specifies the minimum log level. Valid values ar"...
comment "// \"debug\", \"info\", \"warn\", and \"error\". By default, this va"...
field_declaration
field_identifier "LogLevel"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"log_level\" json:\"log_level\""
` "`"
comment "// LogMaxDays specifies the maximum number of days to store "...
comment "// before deletion. This is only used if LogWay == \"file\". B"...
comment "// value is 0."
field_declaration
field_identifier "LogMaxDays"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"log_max_days\" json:\"log_max_days\""
` "`"
comment "// DisableLogColor disables log colors when LogWay == \"conso"...
comment "// true. By default, this value is false."
field_declaration
field_identifier "DisableLogColor"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"disable_log_color\" json:\"disable_log_color\""
` "`"
comment "// AdminAddr specifies the address that the admin server bin"...
comment "// default, this value is \"127.0.0.1\"."
field_declaration
field_identifier "AdminAddr"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"admin_addr\" json:\"admin_addr\""
` "`"
comment "// AdminPort specifies the port for the admin server to list"...
comment "// value is 0, the admin server will not be started. By defa"...
comment "// is 0."
field_declaration
field_identifier "AdminPort"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"admin_port\" json:\"admin_port\""
` "`"
comment "// AdminUser specifies the username that the admin server wi"...
comment "// login."
field_declaration
field_identifier "AdminUser"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"admin_user\" json:\"admin_user\""
` "`"
comment "// AdminPwd specifies the password that the admin server wil"...
comment "// login."
field_declaration
field_identifier "AdminPwd"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"admin_pwd\" json:\"admin_pwd\""
` "`"
comment "// AssetsDir specifies the local directory that the admin se"...
comment "// resources from. If this value is \"\", assets will be loade"...
comment "// bundled executable using statik. By default, this value i"...
field_declaration
field_identifier "AssetsDir"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"assets_dir\" json:\"assets_dir\""
` "`"
comment "// PoolCount specifies the number of connections the client "...
comment "// the server in advance. By default, this value is 0."
field_declaration
field_identifier "PoolCount"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"pool_count\" json:\"pool_count\""
` "`"
comment "// TCPMux toggles TCP stream multiplexing. This allows multi"...
comment "// from a client to share a single TCP connection. If this v"...
comment "// the server must have TCP multiplexing enabled as well. By"...
comment "// value is true."
field_declaration
field_identifier "TCPMux"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tcp_mux\" json:\"tcp_mux\""
` "`"
comment "// TCPMuxKeepaliveInterval specifies the keep alive interval"...
comment "// If TCPMux is true, heartbeat of application layer is unne"...
field_declaration
field_identifier "TCPMuxKeepaliveInterval"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tcp_mux_keepalive_interval\" json:\"tcp_mux_keepalive_int"...
` "`"
comment "// User specifies a prefix for proxy names to distinguish th"...
comment "// clients. If this value is not \"\", proxy names will automa"...
comment "// changed to \"{user}.{proxy_name}\". By default, this value "...
field_declaration
field_identifier "User"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"user\" json:\"user\""
` "`"
comment "// DNSServer specifies a DNS server address for FRPC to use."...
comment "// is \"\", the default DNS will be used. By default, this val"...
field_declaration
field_identifier "DNSServer"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"dns_server\" json:\"dns_server\""
` "`"
comment "// LoginFailExit controls whether or not the client should e"...
comment "// failed login attempt. If false, the client will retry unt"...
comment "// attempt succeeds. By default, this value is true."
field_declaration
field_identifier "LoginFailExit"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"login_fail_exit\" json:\"login_fail_exit\""
` "`"
comment "// Start specifies a set of enabled proxies by name. If this"...
comment "// all supplied proxies are enabled. By default, this value "...
comment "// set."
field_declaration
field_identifier "Start"
slice_type
[ "["
] "]"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"start\" json:\"start\""
` "`"
comment "// Start map[string]struct{} `json:\"start\"`"
comment "// Protocol specifies the protocol to use when interacting w"...
comment "// Valid values are \"tcp\", \"kcp\", \"quic\" and \"websocket\". By"...
comment "// is \"tcp\"."
field_declaration
field_identifier "Protocol"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"protocol\" json:\"protocol\""
` "`"
comment "// QUIC protocol options"
field_declaration
field_identifier "QUICKeepalivePeriod"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"quic_keepalive_period\" json:\"quic_keepalive_period\" val"...
` "`"
field_declaration
field_identifier "QUICMaxIdleTimeout"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"quic_max_idle_timeout\" json:\"quic_max_idle_timeout\" val"...
` "`"
field_declaration
field_identifier "QUICMaxIncomingStreams"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"quic_max_incoming_streams\" json:\"quic_max_incoming_stre"...
` "`"
comment "// TLSEnable specifies whether or not TLS should be used whe"...
comment "// with the server. If \"tls_cert_file\" and \"tls_key_file\" ar"...
comment "// client will load the supplied tls configuration."
field_declaration
field_identifier "TLSEnable"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_enable\" json:\"tls_enable\""
` "`"
comment "// TLSCertPath specifies the path of the cert file that clie"...
comment "// load. It only works when \"tls_enable\" is true and \"tls_ke"...
field_declaration
field_identifier "TLSCertFile"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_cert_file\" json:\"tls_cert_file\""
` "`"
comment "// TLSKeyPath specifies the path of the secret key file that"...
comment "// will load. It only works when \"tls_enable\" is true and \"t"...
comment "// are valid."
field_declaration
field_identifier "TLSKeyFile"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_key_file\" json:\"tls_key_file\""
` "`"
comment "// TLSTrustedCaFile specifies the path of the trusted ca fil"...
comment "// It only works when \"tls_enable\" is valid and tls configur"...
comment "// has been specified."
field_declaration
field_identifier "TLSTrustedCaFile"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_trusted_ca_file\" json:\"tls_trusted_ca_file\""
` "`"
comment "// TLSServerName specifies the custom server name of tls cer"...
comment "// default, server name if same to ServerAddr."
field_declaration
field_identifier "TLSServerName"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_server_name\" json:\"tls_server_name\""
` "`"
comment "// By default, frpc will connect frps with first custom byte"...
comment "// If DisableCustomTLSFirstByte is true, frpc will not send "...
field_declaration
field_identifier "DisableCustomTLSFirstByte"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"disable_custom_tls_first_byte\" json:\"disable_custom_tls"...
` "`"
comment "// HeartBeatInterval specifies at what interval heartbeats a"...
comment "// server, in seconds. It is not recommended to change this "...
comment "// default, this value is 30. Set negative value to disable "...
field_declaration
field_identifier "HeartbeatInterval"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"heartbeat_interval\" json:\"heartbeat_interval\""
` "`"
comment "// HeartBeatTimeout specifies the maximum allowed heartbeat "...
comment "// before the connection is terminated, in seconds. It is no"...
comment "// to change this value. By default, this value is 90. Set n"...
field_declaration
field_identifier "HeartbeatTimeout"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"heartbeat_timeout\" json:\"heartbeat_timeout\""
` "`"
comment "// Client meta info"
field_declaration
field_identifier "Metas"
map_type
map "map"
[ "["
type_identifier "string"
] "]"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"-\" json:\"metas\""
` "`"
comment "// UDPPacketSize specifies the udp packet size"
comment "// By default, this value is 1500"
field_declaration
field_identifier "UDPPacketSize"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"udp_packet_size\" json:\"udp_packet_size\""
` "`"
comment "// Include other config files for proxies."
field_declaration
field_identifier "IncludeConfigFiles"
slice_type
[ "["
] "]"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"includes\" json:\"includes\""
` "`"
comment "// Enable golang pprof handlers in admin listener."
comment "// Admin port must be set first."
field_declaration
field_identifier "PprofEnable"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"pprof_enable\" json:\"pprof_enable\""
` "`"
} "}"
comment "// GetDefaultClientConf returns a client configuration with "...
function_declaration (+270 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+358 nodes collapsed)
comment "// Supported sources including: string(file path), []byte, R"...
function_declaration (+261 nodes collapsed)
comment "// if len(startProxy) is 0, start all"
comment "// otherwise just start proxies in startProxy map"
function_declaration (+727 nodes collapsed)
function_declaration (+480 nodes collapsed)
function_declaration (+59 nodes collapsed)

After

source_file
comment "// Copyright 2020 The frp Authors"
comment "//"
comment "// Licensed under the Apache License, Version 2.0 (the \"Lice"...
comment "// you may not use this file except in compliance with the L"...
comment "// You may obtain a copy of the License at"
comment "//"
comment "// http://www.apache.org/licenses/LICENSE-2.0"
comment "//"
comment "// Unless required by applicable law or agreed to in writing"...
comment "// distributed under the License is distributed on an \"AS IS"...
comment "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expr"...
comment "// See the License for the specific language governing permi"...
comment "// limitations under the License."
package_clause
package "package"
package_identifier "config"
import_declaration (+40 nodes collapsed)
comment "// ClientCommonConf contains information for a client servic"...
comment "// recommended to use GetDefaultClientConf instead of creati"...
comment "// directly, so that all unspecified fields have reasonable "...
type_declaration
type "type"
type_spec
type_identifier "ClientCommonConf"
struct_type
struct "struct"
field_declaration_list
{ "{"
field_declaration
qualified_type
package_identifier "auth"
. "."
type_identifier "ClientConfig"
raw_string_literal
` "`"
raw_string_literal_content "ini:\",extends\""
` "`"
comment "// ServerAddr specifies the address of the server to connect"...
comment "// default, this value is \"0.0.0.0\"."
field_declaration
field_identifier "ServerAddr"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"server_addr\" json:\"server_addr\""
` "`"
comment "// ServerPort specifies the port to connect to the server on"...
comment "// this value is 7000."
field_declaration
field_identifier "ServerPort"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"server_port\" json:\"server_port\""
` "`"
comment "// STUN server to help penetrate NAT hole."
field_declaration
field_identifier "NatHoleSTUNServer"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"nat_hole_stun_server\" json:\"nat_hole_stun_server\""
` "`"
comment "// The maximum amount of time a dial to server will wait for"...
field_declaration
field_identifier "DialServerTimeout"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"dial_server_timeout\" json:\"dial_server_timeout\""
` "`"
comment "// DialServerKeepAlive specifies the interval between keep-a"...
comment "// If negative, keep-alive probes are disabled."
field_declaration
field_identifier "DialServerKeepAlive"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"dial_server_keepalive\" json:\"dial_server_keepalive\""
` "`"
comment "// ConnectServerLocalIP specifies the address of the client "...
comment "// By default, this value is empty."
comment "// this value only use in TCP/Websocket protocol. Not suppor"...
field_declaration
field_identifier "ConnectServerLocalIP"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"connect_server_local_ip\" json:\"connect_server_local_ip\""
` "`"
comment "// HTTPProxy specifies a proxy address to connect to the ser"...
comment "// this value is \"\", the server will be connected to directl"...
comment "// this value is read from the \"http_proxy\" environment vari"...
field_declaration
field_identifier "HTTPProxy"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"http_proxy\" json:\"http_proxy\""
` "`"
comment "// LogFile specifies a file where logs will be written to. T"...
comment "// only be used if LogWay is set appropriately. By default, "...
comment "// \"console\"."
field_declaration
field_identifier "LogFile"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"log_file\" json:\"log_file\""
` "`"
comment "// LogWay specifies the way logging is managed. Valid values"...
comment "// or \"file\". If \"console\" is used, logs will be printed to "...
comment "// \"file\" is used, logs will be printed to LogFile. By defau"...
comment "// is \"console\"."
field_declaration
field_identifier "LogWay"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"log_way\" json:\"log_way\""
` "`"
comment "// LogLevel specifies the minimum log level. Valid values ar"...
comment "// \"debug\", \"info\", \"warn\", and \"error\". By default, this va"...
field_declaration
field_identifier "LogLevel"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"log_level\" json:\"log_level\""
` "`"
comment "// LogMaxDays specifies the maximum number of days to store "...
comment "// before deletion. This is only used if LogWay == \"file\". B"...
comment "// value is 0."
field_declaration
field_identifier "LogMaxDays"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"log_max_days\" json:\"log_max_days\""
` "`"
comment "// DisableLogColor disables log colors when LogWay == \"conso"...
comment "// true. By default, this value is false."
field_declaration
field_identifier "DisableLogColor"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"disable_log_color\" json:\"disable_log_color\""
` "`"
comment "// AdminAddr specifies the address that the admin server bin"...
comment "// default, this value is \"127.0.0.1\"."
field_declaration
field_identifier "AdminAddr"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"admin_addr\" json:\"admin_addr\""
` "`"
comment "// AdminPort specifies the port for the admin server to list"...
comment "// value is 0, the admin server will not be started. By defa"...
comment "// is 0."
field_declaration
field_identifier "AdminPort"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"admin_port\" json:\"admin_port\""
` "`"
comment "// AdminUser specifies the username that the admin server wi"...
comment "// login."
field_declaration
field_identifier "AdminUser"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"admin_user\" json:\"admin_user\""
` "`"
comment "// AdminPwd specifies the password that the admin server wil"...
comment "// login."
field_declaration
field_identifier "AdminPwd"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"admin_pwd\" json:\"admin_pwd\""
` "`"
comment "// AssetsDir specifies the local directory that the admin se"...
comment "// resources from. If this value is \"\", assets will be loade"...
comment "// bundled executable using statik. By default, this value i"...
field_declaration
field_identifier "AssetsDir"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"assets_dir\" json:\"assets_dir\""
` "`"
comment "// PoolCount specifies the number of connections the client "...
comment "// the server in advance. By default, this value is 0."
field_declaration
field_identifier "PoolCount"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"pool_count\" json:\"pool_count\""
` "`"
comment "// TCPMux toggles TCP stream multiplexing. This allows multi"...
comment "// from a client to share a single TCP connection. If this v"...
comment "// the server must have TCP multiplexing enabled as well. By"...
comment "// value is true."
field_declaration
field_identifier "TCPMux"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tcp_mux\" json:\"tcp_mux\""
` "`"
comment "// TCPMuxKeepaliveInterval specifies the keep alive interval"...
comment "// If TCPMux is true, heartbeat of application layer is unne"...
field_declaration
field_identifier "TCPMuxKeepaliveInterval"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tcp_mux_keepalive_interval\" json:\"tcp_mux_keepalive_int"...
` "`"
comment "// User specifies a prefix for proxy names to distinguish th"...
comment "// clients. If this value is not \"\", proxy names will automa"...
comment "// changed to \"{user}.{proxy_name}\". By default, this value "...
field_declaration
field_identifier "User"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"user\" json:\"user\""
` "`"
comment "// DNSServer specifies a DNS server address for FRPC to use."...
comment "// is \"\", the default DNS will be used. By default, this val"...
field_declaration
field_identifier "DNSServer"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"dns_server\" json:\"dns_server\""
` "`"
comment "// LoginFailExit controls whether or not the client should e"...
comment "// failed login attempt. If false, the client will retry unt"...
comment "// attempt succeeds. By default, this value is true."
field_declaration
field_identifier "LoginFailExit"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"login_fail_exit\" json:\"login_fail_exit\""
` "`"
comment "// Start specifies a set of enabled proxies by name. If this"...
comment "// all supplied proxies are enabled. By default, this value "...
comment "// set."
field_declaration
field_identifier "Start"
slice_type
[ "["
] "]"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"start\" json:\"start\""
` "`"
comment "// Start map[string]struct{} `json:\"start\"`"
comment "// Protocol specifies the protocol to use when interacting w"...
comment "// Valid values are \"tcp\", \"kcp\", \"quic\" and \"websocket\". By"...
comment "// is \"tcp\"."
field_declaration
field_identifier "Protocol"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"protocol\" json:\"protocol\""
` "`"
comment "// QUIC protocol options"
field_declaration
field_identifier "QUICKeepalivePeriod"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"quic_keepalive_period\" json:\"quic_keepalive_period\" val"...
` "`"
field_declaration
field_identifier "QUICMaxIdleTimeout"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"quic_max_idle_timeout\" json:\"quic_max_idle_timeout\" val"...
` "`"
field_declaration
field_identifier "QUICMaxIncomingStreams"
type_identifier "int"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"quic_max_incoming_streams\" json:\"quic_max_incoming_stre"...
` "`"
comment "// TLSEnable specifies whether or not TLS should be used whe"...
comment "// with the server. If \"tls_cert_file\" and \"tls_key_file\" ar"...
comment "// client will load the supplied tls configuration."
field_declaration
field_identifier "TLSEnable"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_enable\" json:\"tls_enable\""
` "`"
comment "// TLSCertPath specifies the path of the cert file that clie"...
comment "// load. It only works when \"tls_enable\" is true and \"tls_ke"...
field_declaration
field_identifier "TLSCertFile"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_cert_file\" json:\"tls_cert_file\""
` "`"
comment "// TLSKeyPath specifies the path of the secret key file that"...
comment "// will load. It only works when \"tls_enable\" is true and \"t"...
comment "// are valid."
field_declaration
field_identifier "TLSKeyFile"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_key_file\" json:\"tls_key_file\""
` "`"
comment "// TLSTrustedCaFile specifies the path of the trusted ca fil"...
comment "// It only works when \"tls_enable\" is valid and tls configur"...
comment "// has been specified."
field_declaration
field_identifier "TLSTrustedCaFile"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_trusted_ca_file\" json:\"tls_trusted_ca_file\""
` "`"
comment "// TLSServerName specifies the custom server name of tls cer"...
comment "// default, server name if same to ServerAddr."
field_declaration
field_identifier "TLSServerName"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"tls_server_name\" json:\"tls_server_name\""
` "`"
comment "// By default, frpc will connect frps with first custom byte"...
comment "// If DisableCustomTLSFirstByte is true, frpc will not send "...
field_declaration
field_identifier "DisableCustomTLSFirstByte"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"disable_custom_tls_first_byte\" json:\"disable_custom_tls"...
` "`"
comment "// HeartBeatInterval specifies at what interval heartbeats a"...
comment "// server, in seconds. It is not recommended to change this "...
comment "// default, this value is 30. Set negative value to disable "...
field_declaration
field_identifier "HeartbeatInterval"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"heartbeat_interval\" json:\"heartbeat_interval\""
` "`"
comment "// HeartBeatTimeout specifies the maximum allowed heartbeat "...
comment "// before the connection is terminated, in seconds. It is no"...
comment "// to change this value. By default, this value is 90. Set n"...
field_declaration
field_identifier "HeartbeatTimeout"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"heartbeat_timeout\" json:\"heartbeat_timeout\""
` "`"
comment "// Client meta info"
field_declaration
field_identifier "Metas"
map_type
map "map"
[ "["
type_identifier "string"
] "]"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"-\" json:\"metas\""
` "`"
comment "// UDPPacketSize specifies the udp packet size"
comment "// By default, this value is 1500"
field_declaration
field_identifier "UDPPacketSize"
type_identifier "int64"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"udp_packet_size\" json:\"udp_packet_size\""
` "`"
comment "// Include other config files for proxies."
field_declaration
field_identifier "IncludeConfigFiles"
slice_type
[ "["
] "]"
type_identifier "string"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"includes\" json:\"includes\""
` "`"
comment "// Enable golang pprof handlers in admin listener."
comment "// Admin port must be set first."
field_declaration
field_identifier "PprofEnable"
type_identifier "bool"
raw_string_literal
` "`"
raw_string_literal_content "ini:\"pprof_enable\" json:\"pprof_enable\""
` "`"
} "}"
comment "// GetDefaultClientConf returns a client configuration with "...
function_declaration (+270 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+358 nodes collapsed)
comment "// Supported sources including: string(file path), []byte, R"...
function_declaration (+261 nodes collapsed)
comment "// if len(startProxy) is 0, start all"
comment "// otherwise just start proxies in startProxy map"
function_declaration (+727 nodes collapsed)
function_declaration (+480 nodes collapsed)
function_declaration (+59 nodes collapsed)