1
0
mirror of synced 2024-11-29 16:16:03 +03:00

Update docs

This commit is contained in:
hwdsl2 2021-08-13 02:12:53 -05:00
parent 3f8193390f
commit 97d90ec379
2 changed files with 3 additions and 201 deletions

View File

@ -95,36 +95,9 @@ wget https://git.io/vpnquickstart -O vpn.sh && sudo sh vpn.sh
**选项 1:** 使用脚本随机生成的 VPN 登录凭证(完成后会在屏幕上显示): **选项 1:** 使用脚本随机生成的 VPN 登录凭证(完成后会在屏幕上显示):
<details open>
<summary>
Ubuntu & Debian
</summary>
```bash ```bash
wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh
``` ```
</details>
<details>
<summary>
CentOS/RHEL, Rocky Linux & AlmaLinux
</summary>
```bash
yum -y install wget
wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh
```
</details>
<details>
<summary>
Amazon Linux 2
</summary>
```bash
wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh
```
</details>
在安装成功之后,推荐 [配置 IKEv2](docs/ikev2-howto-zh.md) 在安装成功之后,推荐 [配置 IKEv2](docs/ikev2-howto-zh.md)
@ -134,45 +107,12 @@ sudo ikev2.sh --auto
**选项 2:** 编辑脚本并提供你自己的 VPN 登录凭证: **选项 2:** 编辑脚本并提供你自己的 VPN 登录凭证:
<details open>
<summary>
Ubuntu & Debian
</summary>
```bash ```bash
wget https://git.io/vpnsetup -O vpn.sh wget https://git.io/vpnsetup -O vpn.sh
nano -w vpn.sh nano -w vpn.sh
[替换为你自己的值: YOUR_IPSEC_PSK, YOUR_USERNAME 和 YOUR_PASSWORD] [替换为你自己的值: YOUR_IPSEC_PSK, YOUR_USERNAME 和 YOUR_PASSWORD]
sudo sh vpn.sh sudo sh vpn.sh
``` ```
</details>
<details>
<summary>
CentOS/RHEL, Rocky Linux & AlmaLinux
</summary>
```bash
yum -y install wget nano
wget https://git.io/vpnsetup-centos -O vpn.sh
nano -w vpn.sh
[替换为你自己的值: YOUR_IPSEC_PSK, YOUR_USERNAME 和 YOUR_PASSWORD]
sudo sh vpn.sh
```
</details>
<details>
<summary>
Amazon Linux 2
</summary>
```bash
wget https://git.io/vpnsetup-amzn -O vpn.sh
nano -w vpn.sh
[替换为你自己的值: YOUR_IPSEC_PSK, YOUR_USERNAME 和 YOUR_PASSWORD]
sudo sh vpn.sh
```
</details>
**注:** 一个安全的 IPsec PSK 应该至少包含 20 个随机字符。 **注:** 一个安全的 IPsec PSK 应该至少包含 20 个随机字符。
@ -184,11 +124,6 @@ sudo ikev2.sh --auto
**选项 3:** 将你自己的 VPN 登录凭证定义为环境变量: **选项 3:** 将你自己的 VPN 登录凭证定义为环境变量:
<details open>
<summary>
Ubuntu & Debian
</summary>
```bash ```bash
# 所有变量值必须用 '单引号' 括起来 # 所有变量值必须用 '单引号' 括起来
# *不要* 在值中使用这些字符: \ " ' # *不要* 在值中使用这些字符: \ " '
@ -198,40 +133,6 @@ VPN_USER='你的VPN用户名' \
VPN_PASSWORD='你的VPN密码' \ VPN_PASSWORD='你的VPN密码' \
sh vpn.sh sh vpn.sh
``` ```
</details>
<details>
<summary>
CentOS/RHEL, Rocky Linux & AlmaLinux
</summary>
```bash
# 所有变量值必须用 '单引号' 括起来
# *不要* 在值中使用这些字符: \ " '
yum -y install wget
wget https://git.io/vpnsetup-centos -O vpn.sh
sudo VPN_IPSEC_PSK='你的IPsec预共享密钥' \
VPN_USER='你的VPN用户名' \
VPN_PASSWORD='你的VPN密码' \
sh vpn.sh
```
</details>
<details>
<summary>
Amazon Linux 2
</summary>
```bash
# 所有变量值必须用 '单引号' 括起来
# *不要* 在值中使用这些字符: \ " '
wget https://git.io/vpnsetup-amzn -O vpn.sh
sudo VPN_IPSEC_PSK='你的IPsec预共享密钥' \
VPN_USER='你的VPN用户名' \
VPN_PASSWORD='你的VPN密码' \
sh vpn.sh
```
</details>
在安装成功之后,推荐 [配置 IKEv2](docs/ikev2-howto-zh.md) 在安装成功之后,推荐 [配置 IKEv2](docs/ikev2-howto-zh.md)
@ -239,7 +140,7 @@ sh vpn.sh
sudo ikev2.sh --auto sudo ikev2.sh --auto
``` ```
**注:** 如果无法通过 `wget` 下载,你也可以打开 [vpnsetup.sh](vpnsetup.sh)[vpnsetup_centos.sh](vpnsetup_centos.sh) 或者 [vpnsetup_amzn.sh](vpnsetup_amzn.sh)然后点击右方的 **`Raw`** 按钮。按快捷键 `Ctrl-A` 全选, `Ctrl-C` 复制,然后粘贴到你喜欢的编辑器。 **注:** 如果无法通过 `wget` 下载,你也可以打开 [vpnsetup.sh](vpnsetup.sh),然后点击右方的 **`Raw`** 按钮。按快捷键 `Ctrl-A` 全选, `Ctrl-C` 复制,然后粘贴到你喜欢的编辑器。
## 下一步 ## 下一步

101
README.md
View File

@ -95,36 +95,9 @@ To install the VPN, please choose one of the following options:
**Option 1:** Have the script generate random VPN credentials for you (will be displayed when finished): **Option 1:** Have the script generate random VPN credentials for you (will be displayed when finished):
<details open>
<summary>
Ubuntu & Debian
</summary>
```bash ```bash
wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh wget https://git.io/vpnsetup -O vpn.sh && sudo sh vpn.sh
``` ```
</details>
<details>
<summary>
CentOS/RHEL, Rocky Linux & AlmaLinux
</summary>
```bash
yum -y install wget
wget https://git.io/vpnsetup-centos -O vpn.sh && sudo sh vpn.sh
```
</details>
<details>
<summary>
Amazon Linux 2
</summary>
```bash
wget https://git.io/vpnsetup-amzn -O vpn.sh && sudo sh vpn.sh
```
</details>
After successful installation, it is recommended to [set up IKEv2](docs/ikev2-howto.md): After successful installation, it is recommended to [set up IKEv2](docs/ikev2-howto.md):
@ -134,45 +107,12 @@ sudo ikev2.sh --auto
**Option 2:** Edit the script and provide your own VPN credentials: **Option 2:** Edit the script and provide your own VPN credentials:
<details open>
<summary>
Ubuntu & Debian
</summary>
```bash ```bash
wget https://git.io/vpnsetup -O vpn.sh wget https://git.io/vpnsetup -O vpn.sh
nano -w vpn.sh nano -w vpn.sh
[Replace with your own values: YOUR_IPSEC_PSK, YOUR_USERNAME and YOUR_PASSWORD] [Replace with your own values: YOUR_IPSEC_PSK, YOUR_USERNAME and YOUR_PASSWORD]
sudo sh vpn.sh sudo sh vpn.sh
``` ```
</details>
<details>
<summary>
CentOS/RHEL, Rocky Linux & AlmaLinux
</summary>
```bash
yum -y install wget nano
wget https://git.io/vpnsetup-centos -O vpn.sh
nano -w vpn.sh
[Replace with your own values: YOUR_IPSEC_PSK, YOUR_USERNAME and YOUR_PASSWORD]
sudo sh vpn.sh
```
</details>
<details>
<summary>
Amazon Linux 2
</summary>
```bash
wget https://git.io/vpnsetup-amzn -O vpn.sh
nano -w vpn.sh
[Replace with your own values: YOUR_IPSEC_PSK, YOUR_USERNAME and YOUR_PASSWORD]
sudo sh vpn.sh
```
</details>
**Note:** A secure IPsec PSK should consist of at least 20 random characters. **Note:** A secure IPsec PSK should consist of at least 20 random characters.
@ -184,11 +124,6 @@ sudo ikev2.sh --auto
**Option 3:** Define your VPN credentials as environment variables: **Option 3:** Define your VPN credentials as environment variables:
<details open>
<summary>
Ubuntu & Debian
</summary>
```bash ```bash
# All values MUST be placed inside 'single quotes' # All values MUST be placed inside 'single quotes'
# DO NOT use these special characters within values: \ " ' # DO NOT use these special characters within values: \ " '
@ -198,40 +133,6 @@ VPN_USER='your_vpn_username' \
VPN_PASSWORD='your_vpn_password' \ VPN_PASSWORD='your_vpn_password' \
sh vpn.sh sh vpn.sh
``` ```
</details>
<details>
<summary>
CentOS/RHEL, Rocky Linux & AlmaLinux
</summary>
```bash
# All values MUST be placed inside 'single quotes'
# DO NOT use these special characters within values: \ " '
yum -y install wget
wget https://git.io/vpnsetup-centos -O vpn.sh
sudo VPN_IPSEC_PSK='your_ipsec_pre_shared_key' \
VPN_USER='your_vpn_username' \
VPN_PASSWORD='your_vpn_password' \
sh vpn.sh
```
</details>
<details>
<summary>
Amazon Linux 2
</summary>
```bash
# All values MUST be placed inside 'single quotes'
# DO NOT use these special characters within values: \ " '
wget https://git.io/vpnsetup-amzn -O vpn.sh
sudo VPN_IPSEC_PSK='your_ipsec_pre_shared_key' \
VPN_USER='your_vpn_username' \
VPN_PASSWORD='your_vpn_password' \
sh vpn.sh
```
</details>
After successful installation, it is recommended to [set up IKEv2](docs/ikev2-howto.md): After successful installation, it is recommended to [set up IKEv2](docs/ikev2-howto.md):
@ -239,7 +140,7 @@ After successful installation, it is recommended to [set up IKEv2](docs/ikev2-ho
sudo ikev2.sh --auto sudo ikev2.sh --auto
``` ```
**Note:** If unable to download via `wget`, you may also open [vpnsetup.sh](vpnsetup.sh), [vpnsetup_centos.sh](vpnsetup_centos.sh) or [vpnsetup_amzn.sh](vpnsetup_amzn.sh), and click the **`Raw`** button on the right. Press `Ctrl-A` to select all, `Ctrl-C` to copy, then paste into your favorite editor. **Note:** If unable to download via `wget`, you may also open [vpnsetup.sh](vpnsetup.sh), then click the **`Raw`** button on the right. Press `Ctrl-A` to select all, `Ctrl-C` to copy, then paste into your favorite editor.
## Next steps ## Next steps