Update docs
This commit is contained in:
parent
de2d49d3a6
commit
55b468bb1f
16
README-zh.md
16
README-zh.md
@ -39,7 +39,7 @@ Ubuntu & Debian
|
||||
</summary>
|
||||
|
||||
```bash
|
||||
wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto
|
||||
wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto
|
||||
```
|
||||
</details>
|
||||
|
||||
@ -49,7 +49,7 @@ CentOS & RHEL
|
||||
</summary>
|
||||
|
||||
```bash
|
||||
wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto
|
||||
wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto
|
||||
```
|
||||
</details>
|
||||
|
||||
@ -59,7 +59,7 @@ Amazon Linux 2
|
||||
</summary>
|
||||
|
||||
```bash
|
||||
wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto
|
||||
wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto
|
||||
```
|
||||
</details>
|
||||
|
||||
@ -151,7 +151,7 @@ wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh
|
||||
在安装成功之后,推荐 <a href="docs/ikev2-howto-zh.md" target="_blank">配置 IKEv2</a>:
|
||||
|
||||
```bash
|
||||
sudo bash /opt/src/ikev2.sh --auto
|
||||
sudo ikev2.sh --auto
|
||||
```
|
||||
|
||||
**选项 2:** 编辑脚本并提供你自己的 VPN 登录凭证:
|
||||
@ -201,7 +201,7 @@ sudo sh vpn.sh
|
||||
在安装成功之后,推荐 <a href="docs/ikev2-howto-zh.md" target="_blank">配置 IKEv2</a>:
|
||||
|
||||
```bash
|
||||
sudo bash /opt/src/ikev2.sh --auto
|
||||
sudo ikev2.sh --auto
|
||||
```
|
||||
|
||||
**选项 3:** 将你自己的 VPN 登录凭证定义为环境变量:
|
||||
@ -258,7 +258,7 @@ sh vpn.sh
|
||||
在安装成功之后,推荐 <a href="docs/ikev2-howto-zh.md" target="_blank">配置 IKEv2</a>:
|
||||
|
||||
```bash
|
||||
sudo bash /opt/src/ikev2.sh --auto
|
||||
sudo ikev2.sh --auto
|
||||
```
|
||||
|
||||
**注:** 如果无法通过 `wget` 下载,你也可以打开 <a href="vpnsetup.sh" target="_blank">vpnsetup.sh</a>,<a href="vpnsetup_centos.sh" target="_blank">vpnsetup_centos.sh</a> 或者 <a href="vpnsetup_amzn.sh" target="_blank">vpnsetup_amzn.sh</a>,然后点击右方的 **`Raw`** 按钮。按快捷键 `Ctrl-A` 全选, `Ctrl-C` 复制,然后粘贴到你喜欢的编辑器。
|
||||
@ -350,7 +350,7 @@ wget https://git.io/vpnupgrade-amzn -O vpnup.sh && sudo sh vpnup.sh
|
||||
|
||||
```
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 sh vpn.sh
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 ikev2.sh --auto
|
||||
```
|
||||
|
||||
### 域名和更改服务器 IP
|
||||
@ -360,7 +360,7 @@ sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto
|
||||
对于 <a href="docs/ikev2-howto-zh.md" target="_blank">IKEv2</a> 模式,如果你想要 VPN 在服务器的 IP 更改后继续正常工作,则必须在 <a href="docs/ikev2-howto-zh.md" target="_blank">配置 IKEv2</a> 时指定一个域名作为 VPN 服务器的地址。该域名必须是一个全称域名(FQDN)。示例如下:
|
||||
|
||||
```
|
||||
sudo VPN_DNS_NAME='vpn.example.com' bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_DNS_NAME='vpn.example.com' ikev2.sh --auto
|
||||
```
|
||||
|
||||
另外,你也可以自定义 IKEv2 安装选项,通过在运行 <a href="docs/ikev2-howto-zh.md#使用辅助脚本" target="_blank">辅助脚本</a> 时去掉 `--auto` 参数来实现。
|
||||
|
16
README.md
16
README.md
@ -39,7 +39,7 @@ Ubuntu & Debian
|
||||
</summary>
|
||||
|
||||
```bash
|
||||
wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto
|
||||
wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto
|
||||
```
|
||||
</details>
|
||||
|
||||
@ -49,7 +49,7 @@ CentOS & RHEL
|
||||
</summary>
|
||||
|
||||
```bash
|
||||
wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto
|
||||
wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto
|
||||
```
|
||||
</details>
|
||||
|
||||
@ -59,7 +59,7 @@ Amazon Linux 2
|
||||
</summary>
|
||||
|
||||
```bash
|
||||
wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh && sudo /opt/src/ikev2.sh --auto
|
||||
wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh && sudo ikev2.sh --auto
|
||||
```
|
||||
</details>
|
||||
|
||||
@ -151,7 +151,7 @@ wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh
|
||||
After successful installation, it is recommended to <a href="docs/ikev2-howto.md" target="_blank">set up IKEv2</a>:
|
||||
|
||||
```bash
|
||||
sudo bash /opt/src/ikev2.sh --auto
|
||||
sudo ikev2.sh --auto
|
||||
```
|
||||
|
||||
**Option 2:** Edit the script and provide your own VPN credentials:
|
||||
@ -201,7 +201,7 @@ sudo sh vpn.sh
|
||||
After successful installation, it is recommended to <a href="docs/ikev2-howto.md" target="_blank">set up IKEv2</a>:
|
||||
|
||||
```bash
|
||||
sudo bash /opt/src/ikev2.sh --auto
|
||||
sudo ikev2.sh --auto
|
||||
```
|
||||
|
||||
**Option 3:** Define your VPN credentials as environment variables:
|
||||
@ -258,7 +258,7 @@ sh vpn.sh
|
||||
After successful installation, it is recommended to <a href="docs/ikev2-howto.md" target="_blank">set up IKEv2</a>:
|
||||
|
||||
```bash
|
||||
sudo bash /opt/src/ikev2.sh --auto
|
||||
sudo ikev2.sh --auto
|
||||
```
|
||||
|
||||
**Note:** If unable to download via `wget`, you may also open <a href="vpnsetup.sh" target="_blank">vpnsetup.sh</a>, <a href="vpnsetup_centos.sh" target="_blank">vpnsetup_centos.sh</a> or <a href="vpnsetup_amzn.sh" target="_blank">vpnsetup_amzn.sh</a>, and click the **`Raw`** button on the right. Press `Ctrl-A` to select all, `Ctrl-C` to copy, then paste into your favorite editor.
|
||||
@ -350,7 +350,7 @@ Advanced users can define `VPN_DNS_SRV1` and optionally `VPN_DNS_SRV2` when runn
|
||||
|
||||
```
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 sh vpn.sh
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 ikev2.sh --auto
|
||||
```
|
||||
|
||||
### DNS name and server IP changes
|
||||
@ -360,7 +360,7 @@ For <a href="docs/clients.md" target="_blank">IPsec/L2TP</a> and <a href="docs/c
|
||||
For <a href="docs/ikev2-howto.md" target="_blank">IKEv2</a> mode, if you want the VPN to continue to work after server IP changes, you must specify a DNS name to be used as the VPN server's address when <a href="docs/ikev2-howto.md" target="_blank">setting up IKEv2</a>. The DNS name must be a fully qualified domain name (FQDN). Example:
|
||||
|
||||
```
|
||||
sudo VPN_DNS_NAME='vpn.example.com' bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_DNS_NAME='vpn.example.com' ikev2.sh --auto
|
||||
```
|
||||
|
||||
Alternatively, you may customize IKEv2 setup options by running the <a href="docs/ikev2-howto.md#using-helper-scripts" target="_blank">helper script</a> without the `--auto` parameter.
|
||||
|
@ -34,21 +34,24 @@ Libreswan 支持通过使用 RSA 签名算法的 X.509 Machine Certificates 来
|
||||
使用这个辅助脚本来自动地在 VPN 服务器上配置 IKEv2:
|
||||
|
||||
```
|
||||
sudo bash /opt/src/ikev2.sh --auto
|
||||
sudo ikev2.sh --auto
|
||||
```
|
||||
|
||||
该 <a href="../extras/ikev2setup.sh" target="_blank">脚本</a> 必须使用 `bash` 而不是 `sh` 运行。以上命令使用自动模式和默认选项运行辅助脚本。如果你想要自定义 IKEv2 安装选项,请在运行脚本时去掉 `--auto` 参数。在完成之后,请转到 [配置 IKEv2 VPN 客户端](#配置-ikev2-vpn-客户端)。
|
||||
以上命令使用自动模式和默认选项运行 <a href="../extras/ikev2setup.sh" target="_blank">辅助脚本</a>。如果你想要自定义 IKEv2 安装选项,请在运行脚本时去掉 `--auto` 参数。在完成之后,请转到 [配置 IKEv2 VPN 客户端](#配置-ikev2-vpn-客户端)。
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
错误:"bash: /opt/src/ikev2.sh: No such file or directory".
|
||||
错误:"sudo: ikev2.sh: command not found".
|
||||
</summary>
|
||||
|
||||
如果你使用了较早版本的 VPN 安装脚本,这是正常的。请下载并运行 IKEv2 辅助脚本:
|
||||
|
||||
```
|
||||
wget https://git.io/ikev2setup -O /opt/src/ikev2.sh && sudo bash /opt/src/ikev2.sh --auto
|
||||
wget https://git.io/ikev2setup -O ~/ikev2.sh
|
||||
sudo bash ~/ikev2.sh --auto
|
||||
```
|
||||
|
||||
**注:** 该辅助脚本必须使用 `bash` 而不是 `sh` 运行。
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
@ -58,19 +61,19 @@ wget https://git.io/ikev2setup -O /opt/src/ikev2.sh && sudo bash /opt/src/ikev2.
|
||||
在使用自动模式安装 IKEv2 时,高级用户可以指定一个域名作为 VPN 服务器的地址。这是可选的。该域名必须是一个全称域名(FQDN)。示例如下:
|
||||
|
||||
```
|
||||
sudo VPN_DNS_NAME='vpn.example.com' bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_DNS_NAME='vpn.example.com' ikev2.sh --auto
|
||||
```
|
||||
|
||||
类似地,你可以指定第一个 IKEv2 客户端的名称。这是可选的。如果未指定,则使用默认值 `vpnclient`。
|
||||
|
||||
```
|
||||
sudo VPN_CLIENT_NAME='your_client_name' bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_CLIENT_NAME='your_client_name' ikev2.sh --auto
|
||||
```
|
||||
|
||||
在 VPN 已连接时,IKEv2 客户端默认配置为使用 <a href="https://developers.google.com/speed/public-dns/" target="_blank">Google Public DNS</a>。在使用自动模式安装 IKEv2 时,你可以指定另外的 DNS 服务器。这是可选的。示例如下:
|
||||
|
||||
```
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 ikev2.sh --auto
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
|
@ -34,21 +34,24 @@ After following this guide, you will be able to connect to the VPN using IKEv2 i
|
||||
Use this helper script to automatically set up IKEv2 on the VPN server:
|
||||
|
||||
```
|
||||
sudo bash /opt/src/ikev2.sh --auto
|
||||
sudo ikev2.sh --auto
|
||||
```
|
||||
|
||||
The <a href="../extras/ikev2setup.sh" target="_blank">script</a> must be run using `bash`, not `sh`. The command above runs the helper script in auto mode, using default options. Remove the `--auto` parameter if you want to customize IKEv2 setup options. When finished, continue to [configure IKEv2 VPN clients](#configure-ikev2-vpn-clients).
|
||||
The command above runs the <a href="../extras/ikev2setup.sh" target="_blank">helper script</a> in auto mode, using default options. Remove the `--auto` parameter if you want to customize IKEv2 setup options. When finished, continue to [configure IKEv2 VPN clients](#configure-ikev2-vpn-clients).
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
Error: "bash: /opt/src/ikev2.sh: No such file or directory".
|
||||
Error: "sudo: ikev2.sh: command not found".
|
||||
</summary>
|
||||
|
||||
This is normal if you used an older version of the VPN setup script. Please download and run the IKEv2 helper script:
|
||||
|
||||
```
|
||||
wget https://git.io/ikev2setup -O /opt/src/ikev2.sh && sudo bash /opt/src/ikev2.sh --auto
|
||||
wget https://git.io/ikev2setup -O ~/ikev2.sh
|
||||
sudo bash ~/ikev2.sh --auto
|
||||
```
|
||||
|
||||
**Note:** The helper script must be run using `bash`, not `sh`.
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
@ -58,19 +61,19 @@ You may optionally specify a DNS name, client name and/or custom DNS servers. Cl
|
||||
When running IKEv2 setup in auto mode, advanced users can optionally specify a DNS name to be used as the VPN server's address. The DNS name must be a fully qualified domain name (FQDN). Example:
|
||||
|
||||
```
|
||||
sudo VPN_DNS_NAME='vpn.example.com' bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_DNS_NAME='vpn.example.com' ikev2.sh --auto
|
||||
```
|
||||
|
||||
Similarly, you may optionally specify a name for the first IKEv2 client. The default is `vpnclient` if not specified.
|
||||
|
||||
```
|
||||
sudo VPN_CLIENT_NAME='your_client_name' bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_CLIENT_NAME='your_client_name' ikev2.sh --auto
|
||||
```
|
||||
|
||||
By default, IKEv2 clients are set to use <a href="https://developers.google.com/speed/public-dns/" target="_blank">Google Public DNS</a> when the VPN is active. When running IKEv2 setup in auto mode, you may optionally specify custom DNS server(s). Example:
|
||||
|
||||
```
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 bash /opt/src/ikev2.sh --auto
|
||||
sudo VPN_DNS_SRV1=1.1.1.1 VPN_DNS_SRV2=1.0.0.1 ikev2.sh --auto
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
|
Loading…
Reference in New Issue
Block a user