From 201733440d5b52516445d3731747ffb152e538b3 Mon Sep 17 00:00:00 2001 From: cj Date: Wed, 15 Jul 2020 14:46:49 +0800 Subject: [PATCH] docs: add doc for windows service --- conf/windows/README.md | 66 +++++++++++++++++++++++++++++++++++ conf/windows/frpc-service.xml | 14 ++++++++ conf/windows/frps-service.xml | 14 ++++++++ 3 files changed, 94 insertions(+) create mode 100644 conf/windows/README.md create mode 100644 conf/windows/frpc-service.xml create mode 100644 conf/windows/frps-service.xml diff --git a/conf/windows/README.md b/conf/windows/README.md new file mode 100644 index 00000000..48273fe9 --- /dev/null +++ b/conf/windows/README.md @@ -0,0 +1,66 @@ +## Run `frp` as Windows service + +1. Download [winsw](https://github.com/winsw/winsw/releases)(`WinSW.NET2.exe` means need `.NET 2.0` runtime,and so on),Rename it to `frpc-service.exe` and `frps-service.exe` . +2. Put `frpc-service.xml` and `frpc-service.xml` to same directory as `frp*-service.exe` . +3. Default location of frp is `C:\frp`, you can edit the xml config file. + + + +install service + +```shell +# for frp client +frpc-service.exe install +# for frp server +frps-service.exe install +``` + +> You will see frp service in windows service manager + + + +uninstall service + +```shell +# for frp client +frpc-service.exe uninstall +# for frp server +frps-service.exe uninstall +``` + + + + + +## 以Windows服务的方式运行`frp` + +1. 下载[winsw](https://github.com/winsw/winsw/releases)(它有多个运行时版本,`WinSW.NET2.exe` 的意思是需要安装 `.NET 2.0` ),然后将其分别重命名为两个文件: `frpc-service.exe` 和`frps-service.exe` . +2. 将`frpc-service.xml` 和 `frpc-service.xml` 放到 `frp*-service.exe` 相同的目录下. +3. 默认的frp安装目录是 `C:\frp`, 你可以在xml配置文件中修改。 + + + +创建服务 + +```shell +# for frp client +frpc-service.exe install +# for frp server +frps-service.exe install +``` + +> 服务创建后你在Windows的服务管理器里面就能看见frp服务了 + + + +服务卸载 + +```shell +# for frp client +frpc-service.exe uninstall +# for frp server +frps-service.exe uninstall +``` + + + diff --git a/conf/windows/frpc-service.xml b/conf/windows/frpc-service.xml new file mode 100644 index 00000000..37eb771c --- /dev/null +++ b/conf/windows/frpc-service.xml @@ -0,0 +1,14 @@ + + + frpc + + frp client + + Service for frp client + + C:\frp + + C:\frp\frpc.exe + + -c frpc.ini + diff --git a/conf/windows/frps-service.xml b/conf/windows/frps-service.xml new file mode 100644 index 00000000..ddb64e86 --- /dev/null +++ b/conf/windows/frps-service.xml @@ -0,0 +1,14 @@ + + + frps + + frp server + + Service for frp server + + C:\frp + + C:\frp\frps.exe + + -c frps.ini +