# frp_deamon **Repository Path**: amuliang/frp_deamon ## Basic Information - **Project Name**: frp_deamon - **Description**: frp守护进程 - **Primary Language**: C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-25 - **Last Updated**: 2024-11-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # frp_deamon #### 介绍 frp守护进程,运行在后台,监控frpc和frps进程,如果进程不存在,则启动进程。 将frp_deamon拷贝到frps和frpc所在的目录,并添加可执行权限,然后运行即可。且无需手动启动frpc和frps进程,frp_deamon会自动启动。 ```bash # 如下两条命令等价 ./frp_deamon ./frp_deamon -cc frpc.ini -cs frps.ini ``` 当修改了配置文件后,如果修改了端口,则无需手动重新启动进程,frp_deamon会自动检测新的端口,并杀死旧的进程,自动启动新的进程。 #### 软件架构 目前只支持linux #### 编译 为了保证程序可以在任意环境下运行,使用静态链接(gcc命令仍然会依赖glibc,因此使用musl-gcc): ```bash musl-gcc frp_deamon.c -static -o frp_deamon chmod +x frp_deamon ``` #### 使用说明 ``` Usage: frp_deamon [options] Options: -cc Specify the configuration files for frpc (default: frpc.ini). You can specify multiple files separated by commas. If 'no' is passed, no frpc processes will be started. -cs Specify the configuration files for frps (default: frps.ini). You can specify multiple files separated by commas. If 'no' is passed, no frps processes will be started. -q Quiet mode. Only log to file, no output to stdout. -t Set the interval time in seconds for checking processes (default: 5 seconds). Minimum value is 1. -h Show this help message and exit. Description: frp_deamon is a background process monitoring tool for FRP (Fast Reverse Proxy). It checks whether the FRPC (client) and FRPS (server) processes are running on the specified ports. If the processes are not running, it will start them using the provided configuration files. This tool ensures that the necessary components of FRP are always running to maintain connectivity. Author: amuliang Example: ./frp_deamon -cc frpc1.ini,frpc2.ini -cs frps1.ini,frps2.ini ./frp_deamon (uses default frpc.ini and frps.ini) ./frp_deamon -cc no -cs frps1.ini ```