访问者配置

frp 访问者的详细配置说明。

VisitorBaseConfig

Field Type Description Required
name string 访问者名称。 Yes
type string 访问者类型,可选值为 stcp, sudp, xtcp。 Yes
transport VisitorTransport 访问者网络层配置。 No
secretKey string 密钥,服务端和访问端的密钥需要一致,访问端才能访问到服务端。 No
serverUser string 要访问的 proxy 所属的用户名,如果为空,则默认为当前用户。 No
serverName string 要访问的 proxy 名称。 Yes
bindAddr string visitor 监听的本地地址,通过访问监听的地址和端口,连接到远端代理的服务。 No
bindPort int visitor 监听的本地端口,如果为 -1,表示不需要监听物理端口,通常可以用于作为其他 visitor 的 fallback。 Yes

VisitorTransport

Field Type Description Required
useEncryption bool 是否启用加密功能,启用后该代理和服务端之间的通信内容都会被加密传输,如果 frpc 启用了全局 TLS,则不需要再启用此参数。 No
useCompression bool 是否启用压缩功能,启用后该代理和服务端之间的通信内容都会被压缩传输。 No

STCPVisitorConfig

Field Type Description Required
VisitorBaseConfig 基础配置。 Yes

SUDPVisitorConfig

Field Type Description Required
VisitorBaseConfig 基础配置。 Yes

XTCPVisitorConfig

Field Type Description Required
VisitorBaseConfig 基础配置。 Yes
protocol string 隧道底层通信协议,可选 quic 和 kcp,默认为 quic。 No
keepTunnelOpen bool 是否保持隧道打开,如果开启,会定期检查隧道状态并尝试保持打开。 No
maxRetriesAnHour int 每小时尝试打开隧道的次数,默认值为 8。 No
minRetryInterval int 重试打开隧道的最小间隔时间,单位: 秒,默认为 90s。 No
fallbackTo string 回退到的其他 visitor 名称。 No
fallbackTimeoutMs int 连接建立超过多长时间(ms) 后回退到其他 visitor。 No
最后修改 November 15, 2023: fix 404 (#71) (626ce4d)

Visitor Configuration

frp Visitor Detailed Configuration description of。

VisitorBaseConfig

Field Type Description Required
name string Visitor Name. Yes
type string Visitor type. Available values are stcp, sudp, xtcp. Yes
transport VisitorTransport Visitor network layer Configuration. No
secretKey string Key, Server side. The key of the access side needs to be consistent with that of the access side before the access side can access the Server side. No
serverUser string Proxy to be accessed. The user name to which it belongs, if empty, defaults to the current user. No
serverName string The name of the proxy to access. Yes
bindAddr string visitor The local address of the listener, connected to the remote Agent by accessing the listener's address and port. The service. No
bindPort int The local port that visitor listens on, if the. -1, indicating that there is no need to listen on the physical port, which can usually be used as another visitor. Fallback. Yes

VisitorTransport

Field Type Description Required
useEncryption bool Whether to enable the encryption function, after enabling the Agent and Server side. All communications between them will be encrypted if global is enabled by frpc. TLS, you no longer need to enable this parameter. No
useCompression bool Whether to enable the compression function, after enabling the Agent and Server side. The content of communication between them will be compressed and transmitted. No

STCPVisitorConfig

Field Type Description Required
VisitorBaseConfig Basic Configuration. Yes

SUDPVisitorConfig

Field Type Description Required
VisitorBaseConfig Basic Configuration. Yes

XTCPVisitorConfig

Field Type Description Required
VisitorBaseConfig Basic Configuration. Yes
protocol string Tunnel underlying communication protocol, optional quic and kcp, default is quic. No
keepTunnelOpen bool Whether to keep the tunnel open, if so, periodically check the tunnel status and try to keep it open. No
maxRetriesAnHour int The number of attempts to open the tunnel per hour, the default is 8. No
minRetryInterval int The minimum interval for retrying to open the tunnel, in seconds, defaults to 90s. No
fallbackTo string The name of the other visitor that you rolled back to. No
fallbackTimeoutMs int How long (ms) after the connection is established, fall back to another visitor. No
Last modified November 15, 2023: fix 404 (#71) (626ce4d)