diff --git a/README-zh.md b/README-zh.md index 24d1cfb..48773c8 100644 --- a/README-zh.md +++ b/README-zh.md @@ -72,6 +72,34 @@ https://gitlab.com/hwdsl2/wireguard-install/-/raw/master/wireguard-install.sh 如果无法下载,打开 [wireguard-install.sh](wireguard-install.sh),然后点击右边的 `Raw` 按钮。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。 +
+ +高级:使用自定义选项自动安装。 + + +高级用户可以使用自定义选项自动安装 WireGuard,方法是提供一个 Bash "here document" 作为安装脚本的输入。此方法还可用于在安装后提供输入以管理用户。 + +首先,使用自定义选项以交互方式安装 WireGuard,并写下你对脚本的所有输入值。 + +```bash +sudo bash wireguard.sh +``` + +如需删除 WireGuard,请再次运行脚本并选择适当的选项。 + +然后使用你的输入值创建自定义安装命令。例如: + +```bash +sudo bash wireguard.sh < \* 一个云服务器,虚拟专用服务器 (VPS) 或者专用服务器。 diff --git a/README.md b/README.md index b9be581..71c1a75 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,34 @@ https://gitlab.com/hwdsl2/wireguard-install/-/raw/master/wireguard-install.sh If you are unable to download, open [wireguard-install.sh](wireguard-install.sh), then click the `Raw` button on the right. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
+
+ +Advanced: Auto install using custom options. + + +Advanced users can auto install WireGuard using custom options, by providing a Bash "here document" as input to the setup script. This method can also be used to provide input to manage users after install. + +First, install WireGuard interactively using custom options, and write down all your inputs to the script. + +```bash +sudo bash wireguard.sh +``` + +If you need to remove WireGuard, run the script again and select the appropriate option. + +Next, create the custom install command using your inputs. Example: + +```bash +sudo bash wireguard.sh < \* A cloud server, virtual private server (VPS) or dedicated server.