1.项目简介
原地址:stilleshan/frpc
基于 fatedier/frp 原版 frp 内网穿透客户端 frpc 的一键安装卸载脚本和 docker 镜像.支持群晖NAS,Linux 服务器和 docker 等多种环境安装部署
2.使用
以下分为四种部署方法,请根据实际情况自行选择
- Linux 服务器 一键脚本安装 [内网 Linux 服务器或虚拟机]
- Linux 服务器 docker 安装 [内网 Linux 服务器或虚拟机]
安装
本脚本支持Linux X86 和 ARM架构
-
GitHub脚本
wget https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_install.sh && chmod +x frpc_linux_install.sh && ./frpc_linux_install.sh
-
国内脚本
wget https://ghfast.top/https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_install.sh && chmod +x frpc_linux_install.sh && ./frpc_linux_install.sh
卸载
- GitHub脚本
wget https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_uninstall.sh && chmod +x frpc_linux_uninstall.sh && ./frpc_linux_uninstall.sh
-
国内脚本
wget https://ghfast.top/https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_uninstall.sh && chmod +x frpc_linux_uninstall.sh && ./frpc_linux_uninstall.sh
使用
修改 frpc.toml 配置文件
vi /usr/local/frp/frpc.toml
重启FRPC服务
systemctl restart frpc
启动FRPC服务
systemctl start frpc
关闭FRPC服务
systemctl stop frpc
查看FRPC状态
systemctl status frpc
设置开机自启
systemctl enable frpc
查看服务是否开机自启
systemctl is-enabled frpc
frpc.toml配置编写示例
开机自启配置文件
开机自启配置文件路径 /lib/systemd/system/frpc.service
[Unit]
Description=Frp Server Service
After=network.target syslog.target
Wants=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/frp/frpc -c /usr/local/frp/frpc.toml
[Install]
WantedBy=multi-user.target