源项目地址: stilleshan/frpc
基于 fatedier/frp 原版 frp 内网穿透客户端 frpc 的一键安装卸载脚本和 docker 镜像.支持群晖NAS,Linux 服务器和 docker 等多种环境安装部署.
docker image support for X86 and ARM
0.36.2版本起 docker 镜像同时支持 X86 和 ARM以下分为四种部署方法,请根据实际情况自行选择:
本脚本目前同时支持 Linux X86 和 ARM 架构
安装
wget https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_install.sh && chmod +x frpc_linux_install.sh && ./frpc_linux_install.sh
# cnb镜像
wget https://cnb.cool/SDCOM/frpc-shell/-/git/raw/master/frpc_linux_install.sh && chmod +x frpc_linux_install.sh && ./frpc_linux_install.sh
# 以下为第三方GitHub镜像
wget https://hk.gh-proxy.org/https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_install.sh && chmod +x frpc_linux_install.sh && ./frpc_linux_install.sh
使用
vi /usr/local/frp/frpc.toml
# 修改 frpc.toml 配置
sudo systemctl restart frpc
# 重启 frpc 服务即可生效
卸载
wget https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_uninstall.sh && chmod +x frpc_linux_uninstall.sh && ./frpc_linux_uninstall.sh
# cnb镜像
wget https://cnb.cool/SDCOM/frpc-shell/-/git/raw/master/frpc_linux_uninstall.sh && chmod +x frpc_linux_uninstall.sh && ./frpc_linux_uninstall.sh
# 以下为自建GitHub镜像
wget https://hw-sg.sdcom-ghproxy.us.kg/https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_uninstall.sh && chmod +x frpc_linux_uninstall.sh && ./frpc_linux_uninstall.sh
为避免因 frpc.toml 文件的挂载,格式或者配置的错误导致容器无法正常运行并循环重启.请确保先配置好 frpc.toml 后在运行启动.
git clone 本仓库,并正确配置 frpc.toml 文件.
git clone https://github.com/stilleshan/frpc
# 原仓库镜像
git clone https://cnb.cool/SDCOM/frpc-shell
# git clone 本仓库镜像
git clone https://hk.gh-proxy.org/https://github.com/stilleshan/frpc
# 配置 frpc.toml 文件
vi /root/frpc/frpc.toml
执行以下命令启动服务
docker run -d --name=frpc --restart=always -v /root/frpc/frpc.toml:/frp/frpc.toml docker.cnb.cool/sdcom/frpc-shell/frpc:latest
以上命令 -v 挂载的目录是以 git clone 本仓库为例,也可以在任意位置手动创建 frpc.toml 文件,并修改命令中的挂载路径.
服务运行中修改 frpc.toml 配置后需重启 frpc 服务.
vi /root/frp/frpc.toml
# 修改 frpc.toml 配置
docker restart frpc
# 重启 frpc 容器即可生效