frpc/README.md

92 lines
3.9 KiB
Markdown
Raw Permalink Normal View History

2020-02-08 13:29:11 +08:00
# frpc
## 项目简介
基于 [fatedier/frp](https://github.com/fatedier/frp) 原版 frp 内网穿透客户端 frpc 的一键安装卸载脚本和 docker 镜像.支持群晖NAS,Linux 服务器和 docker 等多种环境安装部署.
- GitHub [stilleshan/frpc](https://github.com/stilleshan/frpc)
- Docker [stilleshan/frpc](https://hub.docker.com/r/stilleshan/frpc)
2021-05-31 11:11:29 +08:00
> *docker image support for X86 and ARM*
## 更新
2024-04-09 12:03:35 +08:00
- **2024-03-03** 更新到新版本,支持 toml 配置文件.
2022-04-22 11:50:06 +08:00
- **2021-05-31** 更新国内镜像方便使用
- **2021-05-31** 目前 X86 群晖 DMS 7.0 可直接使用 Linux 版本脚本,已实测.由于没有 ARM 版可尝试,请自行尝试.
- **2021-05-31** 更新 Linux 一键安装脚本同时支持 X86 和 ARM
- **2021-05-29** 更新从`0.36.2`版本起 docker 镜像同时支持 X86 和 ARM
2020-02-08 13:29:11 +08:00
2022-02-15 10:19:49 +08:00
## 使用
2020-02-08 13:29:11 +08:00
以下分为四种部署方法,请根据实际情况自行选择:
2022-02-15 10:19:49 +08:00
1. 群晖 NAS docker 安装 **[支持 docker 的群晖机型首选]**
2. 群晖 NAS 一键脚本安装 **[不支持 docker 的群晖机型]**
3. Linux 服务器 一键脚本安装 **[内网 Linux 服务器或虚拟机]**
4. Linux 服务器 docker 安装 **[内网 Linux 服务器或虚拟机]**
---
### 1. 群晖 NAS docker 安装 **[支持 docker 的群晖机型首选]**
[详情点击查看教程](https://www.ioiox.com/archives/26.html)
### 2. 群晖 NAS 一键脚本安装 **[不支持 docker 的群晖机型]**
[详情点击查看教程](https://www.ioiox.com/archives/6.html)
### 3. Linux 服务器 一键脚本安装
> *本脚本目前同时支持 Linux X86 和 ARM 架构*
2020-02-08 13:29:11 +08:00
安装
```shell
2021-06-03 17:49:29 +08:00
wget https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_install.sh && chmod +x frpc_linux_install.sh && ./frpc_linux_install.sh
2022-02-15 10:19:49 +08:00
# 以下为国内镜像
wget https://github.ioiox.com/stilleshan/frpc/raw/branch/master/frpc_linux_install.sh && chmod +x frpc_linux_install.sh && ./frpc_linux_install.sh
2020-02-08 13:29:11 +08:00
```
使用
```shell
2024-03-03 01:01:08 +08:00
vi /usr/local/frp/frpc.toml
# 修改 frpc.toml 配置
2020-02-08 13:29:11 +08:00
sudo systemctl restart frpc
# 重启 frpc 服务即可生效
```
卸载
```shell
2021-06-03 17:49:29 +08:00
wget https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_uninstall.sh && chmod +x frpc_linux_uninstall.sh && ./frpc_linux_uninstall.sh
2022-02-15 10:19:49 +08:00
# 以下为国内镜像
wget https://github.ioiox.com/stilleshan/frpc/raw/branch/master/frpc_linux_uninstall.sh && chmod +x frpc_linux_uninstall.sh && ./frpc_linux_uninstall.sh
2020-02-08 13:29:11 +08:00
```
2022-02-15 10:19:49 +08:00
### 4. Linux 服务器 docker 安装
2024-03-03 01:01:08 +08:00
为避免因 **frpc.toml** 文件的挂载,格式或者配置的错误导致容器无法正常运行并循环重启.请确保先配置好 **frpc.toml** 后在运行启动.
2020-02-08 13:29:11 +08:00
2024-03-03 01:01:08 +08:00
**git clone** 本仓库,并正确配置 **frpc.toml** 文件.
2020-02-08 13:29:11 +08:00
```shell
2022-02-15 10:19:49 +08:00
git clone https://github.com/stilleshan/frpc
# git clone 本仓库镜像
git clone https://github.ioiox.com/stilleshan/frpc
# 国内镜像
2024-03-03 01:01:08 +08:00
vi /root/frpc/frpc.toml
# 配置 frpc.toml 文件
2020-02-08 13:29:11 +08:00
```
执行以下命令启动服务
```shell
2024-03-03 01:01:08 +08:00
docker run -d --name=frpc --restart=always -v /root/frpc/frpc.toml:/frp/frpc.toml stilleshan/frpc
2020-02-08 13:29:11 +08:00
```
2024-03-03 01:01:08 +08:00
> 以上命令 -v 挂载的目录是以 git clone 本仓库为例,也可以在任意位置手动创建 frpc.toml 文件,并修改命令中的挂载路径.
2020-02-08 13:29:11 +08:00
2024-03-03 01:01:08 +08:00
服务运行中修改 **frpc.toml** 配置后需重启 **frpc** 服务.
2020-02-08 13:29:11 +08:00
```shell
2024-03-03 01:01:08 +08:00
vi /root/frp/frpc.toml
# 修改 frpc.toml 配置
2020-02-08 13:29:11 +08:00
docker restart frpc
# 重启 frpc 容器即可生效
```
2022-02-15 10:19:49 +08:00
## 链接
2020-02-08 13:29:11 +08:00
- Blog [www.ioiox.com](https://www.ioiox.com)
- GitHub [stilleshan/frpc](https://github.com/stilleshan/frpc)
2022-02-15 10:19:49 +08:00
- Docker Hub [stilleshan/frpc](https://hub.docker.com/r/stilleshan/frpc)
- Docker [docker.ioiox.com](https://docker.ioiox.com)
2020-02-08 13:29:11 +08:00
- 原版frp项目 [fatedier/frp](https://github.com/fatedier/frp)
- [群晖NAS使用Docker安装配置frpc内网穿透教程](https://www.ioiox.com/archives/26.html)
- [群晖NAS安装配置免费frp内网穿透教程](https://www.ioiox.com/archives/6.html)
2024-03-03 01:01:08 +08:00
- [新手入门 - 详解 frp 内网穿透 frpc.toml 配置](https://www.ioiox.com/archives/79.html)