客户端

动态配置更新

当你需要修改 frpc 的代理配置时,你可以使用 frpc reload 命令来实现动态加载配置文件,通常在数秒内完成代理的更新。

要启用此功能,需要在 frpc 中启用 webServer,以提供 API 服务。配置如下:

webServer.addr = "127.0.0.1"
    webServer.port = 7400
    

然后执行以下命令来重载配置:

frpc reload -c ./frpc.toml

等待一段时间后,客户端将根据新的配置文件创建、更新或删除代理。需要注意的是,非代理相关的公共部分的参数除了 start 外目前无法被修改。

命令行查看代理状态

frpc 支持通过 frpc status -c ./frpc.ini 命令查看代理的状态信息,此功能需要在 frpc 中启用 webServer。

使用代理连接 frps

在只能通过代理访问外部网络的环境中,frpc 支持通过 HTTP 或 SOCKS5 代理与 frps 建立连接。

你可以通过设置系统环境变量 HTTP_PROXY 或在 frpc 的配置文件中设置 transport.proxyURL 参数来使用此功能。

仅在 transport.protocol = "tcp" 时生效。

serverAddr = "x.x.x.x"
    serverPort = 7000
    transport.proxyURL = "http://user:pwd@192.168.1.128:8080"
    

transport.proxyURL 设置为 socks5://user:pwd@192.168.1.128:8080 也可以连接到 SOCKS5 代理。

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

Client

Dynamic Configuration update

When you need to modify the Agent Configuration of frpc, you can use frpc reload Command to dynamically load the Configuration file, usually completing the Agent within seconds Update of.

To enable this feature, webServer needs to be enabled in frpc to provide APIs Service. The configuration is as follows:

webServer.addr = "127.0.0.1"
    webServer.port = 7400
    

Then execute the following command to overload Configuration:

frpc reload - c/ Frpc. toml

After waiting for a period of time, the client will follow the new Configuration Create, update, or delete an Agent using file. It should be noted that non Agent The parameters of the relevant public parts, except for start, cannot be modified at present.

Command Line View Agent Status

FRPC supports through frpc status - c/ Frpc. ini Command to view the status information of the Agent, which requires enabling webServer in frpc.

UseAgent connection frps

In environments where external networks can only be accessed through the Agent, frpc supports HTTP or SOCKS5 Agent establishes a connection with FRPS.

You can set the system environment variableHTTP_ PROXYor on frpc Set in the Configuration file Use this feature with thetransport. proxyURLparameter.

Only in transport. protocol="a; TCP".

serverAddr = "x.x.x.x"
    serverPort = 7000
    transport.proxyURL = "http://user:pwd@192.168.1.128:8080"
    

Settransport. proxyURLto socks5://user: pwd@192.168.1.128 : 8080can also be connected to SOCKS5 Agent.

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