客户端插件

默认情况下,frpc 仅会将请求转发到本地 TCP 或 UDP 端口,即通过 localIPlocalPort 指定的本地服务地址。

通过启用客户端插件功能,可以在仅启动 frpc 的情况下内置一些简单的本地服务,从而实现通常需要额外启动其他服务才能实现的功能。

在每个代理的配置中,你可以通过 plugin 来配置要使用的插件和相关参数。启用客户端插件后,无需再配置 localIPlocalPort

客户端插件可用于各种类型的代理,前提是插件本身支持的协议。例如,静态文件访问插件可以通过 TCP 或 HTTP 代理进行暴露。

以下是使用 http_proxy 插件的示例:

[[proxies]]
    name = "http_proxy"
    type = "tcp"
    remotePort = 6000
    [proxies.plugin]
    type = "http_proxy"
    httpUser = "abc"
    httpPassword = "abc"
    

httpUserhttpPassword 即为 http_proxy 插件可选的配置参数。

其他插件和相关配置请参考 Reference 中的内容。

最后修改 November 15, 2023: fix 404 (#71) (626ce4d)

ClientPlug-in

By default, frpc will only forward requests to local TCP or UDP ports, i.e. through localIPand The local service address specified bylocalPort.

By enabling the ClientPlug in feature, it is possible to start frpc only In this case, some simple local services are built-in to achieve functions that usually require additional startup of other services.

In the Configuration of each Agent, you can use the plugin Configure the Plug in and related parameters to be used. After enabling ClientPlug in, there is no need to configure it again localIPandlocalPort.

ClientPlug in can be used for various types of agents The prerequisite is the protocol supported by the Plug in itself. For example, static file access to Plug in can be achieved through Expose through TCP or HTTP agents.

The following is Usehttp_ Example of proxyPlug in:

[[proxies]]
    name = "http_proxy"
    type = "tcp"
    remotePort = 6000
    [proxies.plugin]
    type = "http_proxy"
    httpUser = "abc"
    httpPassword = "abc"
    

htpUserandhtpPasswordare the HTTP_ ProxyPlug in optional Configuration parameters.

For other Plug ins and related configurations, please refer to Reference The content in Reference.

Last modified November 15, 2023: Fix 404 (# 71) (626ce4d)