Update docs

This commit is contained in:
hwdsl2 2022-05-01 09:23:27 -05:00
parent 7ee528ede4
commit e20febf7a4
6 changed files with 160 additions and 0 deletions

View File

@ -49,6 +49,19 @@ wget -nv -O ikev2onlymode.sh https://get.vpnsetup.net/ikev2only
sudo bash ikev2onlymode.sh
```
<details>
<summary>
或者,你也可以使用以下命令。
</summary>
```bash
# 下载脚本
wget -nv -O ikev2onlymode.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/ikev2onlymode.sh
# 运行脚本并按提示操作
sudo bash ikev2onlymode.sh
```
</details>
要禁用仅限 IKEv2 模式,再次运行辅助脚本并选择适当的选项。
<details>

View File

@ -49,6 +49,19 @@ wget -nv -O ikev2onlymode.sh https://get.vpnsetup.net/ikev2only
sudo bash ikev2onlymode.sh
```
<details>
<summary>
Alternative script URL.
</summary>
```bash
# Download the script
wget -nv -O ikev2onlymode.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/ikev2onlymode.sh
# Run the script and follow the prompts
sudo bash ikev2onlymode.sh
```
</details>
To disable IKEv2-only mode, run the helper script again and select the appropriate option.
<details>

View File

@ -59,6 +59,17 @@ wget https://get.vpnsetup.net/ikev2 -nv -O /opt/src/ikev2.sh
chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin
```
<details>
<summary>
或者,你也可以使用以下命令。
</summary>
```bash
wget https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/ikev2setup.sh -nv -O /opt/src/ikev2.sh
chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin
```
</details>
然后按照上面的说明运行脚本。
</details>
<details>
@ -769,6 +780,19 @@ wget -nv -O ikev2changeaddr.sh https://get.vpnsetup.net/ikev2addr
sudo bash ikev2changeaddr.sh
```
<details>
<summary>
或者,你也可以使用以下命令。
</summary>
```bash
# 下载脚本
wget -nv -O ikev2changeaddr.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/ikev2changeaddr.sh
# 运行脚本并按照提示操作
sudo bash ikev2changeaddr.sh
```
</details>
**重要:** 运行此脚本后,你必须手动更新任何现有 IKEv2 客户端设备上的服务器地址以及 Remote ID如果适用。对于 iOS 客户端,你需要使用 IKEv2 [辅助脚本](#使用辅助脚本配置-ikev2) 导出然后重新导入客户端配置。
## 更新 IKEv2 辅助脚本
@ -780,6 +804,17 @@ wget https://get.vpnsetup.net/ikev2 -nv -O /opt/src/ikev2.sh
chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin 2>/dev/null
```
<details>
<summary>
或者,你也可以使用以下命令。
</summary>
```bash
wget https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/ikev2setup.sh -nv -O /opt/src/ikev2.sh
chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin 2>/dev/null
```
</details>
## 手动配置 IKEv2
除了使用 [辅助脚本](#使用辅助脚本配置-ikev2) 之外,高级用户也可以手动在 VPN 服务器上配置 IKEv2。在继续之前推荐 [升级 Libreswan](../README-zh.md#升级libreswan) 到最新版本。

View File

@ -59,6 +59,17 @@ wget https://get.vpnsetup.net/ikev2 -nv -O /opt/src/ikev2.sh
chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin
```
<details>
<summary>
Alternative script URL.
</summary>
```bash
wget https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/ikev2setup.sh -nv -O /opt/src/ikev2.sh
chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin
```
</details>
Then run the script using the instructions above.
</details>
<details>
@ -771,6 +782,19 @@ wget -nv -O ikev2changeaddr.sh https://get.vpnsetup.net/ikev2addr
sudo bash ikev2changeaddr.sh
```
<details>
<summary>
Alternative script URL.
</summary>
```bash
# Download the script
wget -nv -O ikev2changeaddr.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/ikev2changeaddr.sh
# Run the script and follow the prompts
sudo bash ikev2changeaddr.sh
```
</details>
**Important:** After running this script, you must manually update the server address (and remote ID, if applicable) on any existing IKEv2 client devices. For iOS clients, you'll need to export and re-import client configuration using the IKEv2 [helper script](#set-up-ikev2-using-helper-script).
## Update IKEv2 helper script
@ -782,6 +806,17 @@ wget https://get.vpnsetup.net/ikev2 -nv -O /opt/src/ikev2.sh
chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin 2>/dev/null
```
<details>
<summary>
Alternative script URL.
</summary>
```bash
wget https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/ikev2setup.sh -nv -O /opt/src/ikev2.sh
chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin 2>/dev/null
```
</details>
## Manually set up IKEv2
As an alternative to using the [helper script](#set-up-ikev2-using-helper-script), advanced users can manually set up IKEv2 on the VPN server. Before continuing, it is recommended to [update Libreswan](../README.md#upgrade-libreswan) to the latest version.

View File

@ -39,6 +39,17 @@ wget -nv -O /opt/src/addvpnuser.sh https://get.vpnsetup.net/adduser
chmod +x /opt/src/addvpnuser.sh && ln -s /opt/src/addvpnuser.sh /usr/bin
```
<details>
<summary>
或者,你也可以使用以下命令。
</summary>
```bash
wget -nv -O /opt/src/addvpnuser.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/add_vpn_user.sh
chmod +x /opt/src/addvpnuser.sh && ln -s /opt/src/addvpnuser.sh /usr/bin
```
</details>
然后按照说明运行脚本。
</details>
@ -74,6 +85,17 @@ wget -nv -O /opt/src/delvpnuser.sh https://get.vpnsetup.net/deluser
chmod +x /opt/src/delvpnuser.sh && ln -s /opt/src/delvpnuser.sh /usr/bin
```
<details>
<summary>
或者,你也可以使用以下命令。
</summary>
```bash
wget -nv -O /opt/src/delvpnuser.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/del_vpn_user.sh
chmod +x /opt/src/delvpnuser.sh && ln -s /opt/src/delvpnuser.sh /usr/bin
```
</details>
然后按照说明运行脚本。
</details>
@ -95,6 +117,16 @@ sudo delvpnuser.sh '要删除的用户名'
wget -nv -O updatevpnusers.sh https://get.vpnsetup.net/updateusers
```
<details>
<summary>
或者,你也可以使用以下命令。
</summary>
```bash
wget -nv -O updatevpnusers.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/update_vpn_users.sh
```
</details>
要使用这个脚本,从以下选项中选择一个:
**重要:** 这个脚本会将你当前**所有的** VPN 用户移除并替换为你指定的列表中的用户。如果你需要保留已有的 VPN 用户,则必须将它们包含在下面的变量中。

View File

@ -39,6 +39,17 @@ wget -nv -O /opt/src/addvpnuser.sh https://get.vpnsetup.net/adduser
chmod +x /opt/src/addvpnuser.sh && ln -s /opt/src/addvpnuser.sh /usr/bin
```
<details>
<summary>
Alternative script URL.
</summary>
```bash
wget -nv -O /opt/src/addvpnuser.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/add_vpn_user.sh
chmod +x /opt/src/addvpnuser.sh && ln -s /opt/src/addvpnuser.sh /usr/bin
```
</details>
Then run the script using the instructions.
</details>
@ -74,6 +85,17 @@ wget -nv -O /opt/src/delvpnuser.sh https://get.vpnsetup.net/deluser
chmod +x /opt/src/delvpnuser.sh && ln -s /opt/src/delvpnuser.sh /usr/bin
```
<details>
<summary>
Alternative script URL.
</summary>
```bash
wget -nv -O /opt/src/delvpnuser.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/del_vpn_user.sh
chmod +x /opt/src/delvpnuser.sh && ln -s /opt/src/delvpnuser.sh /usr/bin
```
</details>
Then run the script using the instructions.
</details>
@ -95,6 +117,16 @@ First, download the script:
wget -nv -O updatevpnusers.sh https://get.vpnsetup.net/updateusers
```
<details>
<summary>
Alternative script URL.
</summary>
```bash
wget -nv -O updatevpnusers.sh https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/update_vpn_users.sh
```
</details>
To use this script, choose one of the following options:
**Important:** This script will remove **ALL** existing VPN users and replace them with the list of users you specify. Therefore, you must include any existing user(s) you want to keep in the variables below.