Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hwdsl2 committed Jul 28, 2024
1 parent 56a899a commit 9ae2394
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 16 deletions.
22 changes: 17 additions & 5 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ https://gitlab.com/hwdsl2/wireguard-install/-/raw/master/wireguard-install.sh
高级:使用自定义选项自动安装。
</summary>

高级用户可以使用自定义选项自动安装 WireGuard,方法是提供一个 Bash "here document" 作为安装脚本的输入。此方法还可用于在安装后提供输入以管理用户。
高级用户可以使用自定义选项自动安装 WireGuard,方法是在运行脚本时指定命令行参数。有关更多信息,请参见下一节,查看 WireGuard 脚本的使用信息。

或者,你也可以提供一个 Bash "here document" 作为安装脚本的输入。此方法还可用于在安装后提供输入以管理用户。

首先,使用自定义选项以交互方式安装 WireGuard,并写下你对脚本的所有输入值。

Expand Down Expand Up @@ -118,9 +120,9 @@ ANSWERS
Usage: bash wireguard.sh [options]
Options:
--auto auto install WireGuard using default options
--addclient [client name] add a new client
--dns1 [DNS server IP] primary DNS server for new client (optional, defaults to Google Public DNS)
--dns1 [DNS server IP] primary DNS server for new client (optional, default: Google Public DNS)
--dns2 [DNS server IP] secondary DNS server for new client (optional)
--listclients list the names of existing clients
--removeclient [client name] remove an existing client
Expand All @@ -129,7 +131,17 @@ Options:
-y, --yes assume "yes" as answer to prompts when removing a client or removing WireGuard
-h, --help show this help message and exit
To customize install options, run this script without arguments.
Install options (optional):
--auto auto install WireGuard using default or custom options
--serveraddr [DNS name] server address, must be a fully qualified domain name (FQDN).
If not specified, the server's IPv4 address will be used.
--port [number] port for WireGuard (1-65535, default: 51820)
--clientname [client name] name for the first WireGuard client (default: client)
--dns1 [DNS server IP] primary DNS server for first client (default: Google Public DNS)
--dns2 [DNS server IP] secondary DNS server for first client
To customize options, you may also run this script without arguments.
```
</details>

Expand All @@ -156,7 +168,7 @@ To customize install options, run this script without arguments.

- 改进了与 Setup IPsec VPN 的兼容性
- 改进了脚本的可靠性,用户输入和输出
- 支持使用默认选项自动安装
- 支持使用默认或自定义选项自动安装
- 支持使用域名作为服务器地址
- 增加了对 openSUSE Linux 的支持
- 支持列出现有的 VPN 客户端
Expand Down
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ If you are unable to download, open [wireguard-install.sh](wireguard-install.sh)
Advanced: Auto install using custom options.
</summary>

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.
Advanced users can auto install WireGuard using custom options, by specifying command-line options when running the script. For more details, see the next section "view usage information for the WireGuard script".

Alternatively, you may provide 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.

Expand Down Expand Up @@ -118,9 +120,9 @@ View usage information for the WireGuard script.
Usage: bash wireguard.sh [options]
Options:
--auto auto install WireGuard using default options
--addclient [client name] add a new client
--dns1 [DNS server IP] primary DNS server for new client (optional, defaults to Google Public DNS)
--dns1 [DNS server IP] primary DNS server for new client (optional, default: Google Public DNS)
--dns2 [DNS server IP] secondary DNS server for new client (optional)
--listclients list the names of existing clients
--removeclient [client name] remove an existing client
Expand All @@ -129,7 +131,17 @@ Options:
-y, --yes assume "yes" as answer to prompts when removing a client or removing WireGuard
-h, --help show this help message and exit
To customize install options, run this script without arguments.
Install options (optional):
--auto auto install WireGuard using default or custom options
--serveraddr [DNS name] server address, must be a fully qualified domain name (FQDN).
If not specified, the server's IPv4 address will be used.
--port [number] port for WireGuard (1-65535, default: 51820)
--clientname [client name] name for the first WireGuard client (default: client)
--dns1 [DNS server IP] primary DNS server for first client (default: Google Public DNS)
--dns2 [DNS server IP] secondary DNS server for first client
To customize options, you may also run this script without arguments.
```
</details>

Expand All @@ -156,7 +168,7 @@ List of enhancements over Nyr/wireguard-install.

- Improved compatibility with Setup IPsec VPN
- Improved script reliability, user input and output
- Supports auto install using default options
- Supports auto install using default or custom options
- Supports using a DNS name as server address
- Added support for openSUSE Linux
- Supports listing existing VPN clients
Expand Down
16 changes: 13 additions & 3 deletions docs/clients-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
Usage: bash wireguard.sh [options]
Options:
--auto auto install WireGuard using default options
--addclient [client name] add a new client
--dns1 [DNS server IP] primary DNS server for new client (optional, defaults to Google Public DNS)
--dns1 [DNS server IP] primary DNS server for new client (optional, default: Google Public DNS)
--dns2 [DNS server IP] secondary DNS server for new client (optional)
--listclients list the names of existing clients
--removeclient [client name] remove an existing client
Expand All @@ -30,6 +30,16 @@ Options:
-y, --yes assume "yes" as answer to prompts when removing a client or removing WireGuard
-h, --help show this help message and exit
To customize install options, run this script without arguments.
Install options (optional):
--auto auto install WireGuard using default or custom options
--serveraddr [DNS name] server address, must be a fully qualified domain name (FQDN).
If not specified, the server's IPv4 address will be used.
--port [number] port for WireGuard (1-65535, default: 51820)
--clientname [client name] name for the first WireGuard client (default: client)
--dns1 [DNS server IP] primary DNS server for first client (default: Google Public DNS)
--dns2 [DNS server IP] secondary DNS server for first client
To customize options, you may also run this script without arguments.
```
</details>
16 changes: 13 additions & 3 deletions docs/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ View usage information for the WireGuard script.
Usage: bash wireguard.sh [options]
Options:
--auto auto install WireGuard using default options
--addclient [client name] add a new client
--dns1 [DNS server IP] primary DNS server for new client (optional, defaults to Google Public DNS)
--dns1 [DNS server IP] primary DNS server for new client (optional, default: Google Public DNS)
--dns2 [DNS server IP] secondary DNS server for new client (optional)
--listclients list the names of existing clients
--removeclient [client name] remove an existing client
Expand All @@ -30,6 +30,16 @@ Options:
-y, --yes assume "yes" as answer to prompts when removing a client or removing WireGuard
-h, --help show this help message and exit
To customize install options, run this script without arguments.
Install options (optional):
--auto auto install WireGuard using default or custom options
--serveraddr [DNS name] server address, must be a fully qualified domain name (FQDN).
If not specified, the server's IPv4 address will be used.
--port [number] port for WireGuard (1-65535, default: 51820)
--clientname [client name] name for the first WireGuard client (default: client)
--dns1 [DNS server IP] primary DNS server for first client (default: Google Public DNS)
--dns2 [DNS server IP] secondary DNS server for first client
To customize options, you may also run this script without arguments.
```
</details>

0 comments on commit 9ae2394

Please sign in to comment.