1
0
mirror of synced 2024-11-23 13:36:01 +03:00

Compare commits

...

3 Commits

Author SHA1 Message Date
hwdsl2
9f0478b23d Update docs 2022-05-15 00:55:40 -05:00
hwdsl2
9e10fb43bb Update docs 2022-05-15 00:38:32 -05:00
hwdsl2
0b1ca44fa4 Update docs 2022-05-14 23:59:01 -05:00
10 changed files with 50 additions and 136 deletions

View File

@ -33,7 +33,11 @@ wget https://get.vpnsetup.net -qO vpn.sh && sudo sh vpn.sh
curl -fsSL https://get.vpnsetup.net -o vpn.sh && sudo sh vpn.sh
```
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/vpnsetup.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
或者,你也可以使用这个链接:
```bash
curl -fsSL https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/vpnsetup.sh -o vpn.sh && sudo sh vpn.sh
```
</details>
<details>
<summary>
@ -161,6 +165,13 @@ curl -fL https://get.vpnsetup.net -o vpn.sh
sudo sh vpn.sh
```
或者,你也可以使用这个链接:
```bash
curl -fL https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/vpnsetup.sh -o vpn.sh
sudo sh vpn.sh
```
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/vpnsetup.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details>
@ -213,7 +224,11 @@ wget https://get.vpnsetup.net/upg -qO vpnup.sh && sudo sh vpnup.sh
curl -fsSL https://get.vpnsetup.net/upg -o vpnup.sh && sudo sh vpnup.sh
```
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/vpnupgrade.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
或者,你也可以使用这个链接:
```bash
curl -fsSL https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/vpnupgrade.sh -o vpnup.sh && sudo sh vpnup.sh
```
</details>
当前支持的 Libreswan 最新版本是 `4.6`。查看已安装版本:`ipsec --version`。
@ -224,32 +239,20 @@ curl -fsSL https://get.vpnsetup.net/upg -o vpnup.sh && sudo sh vpnup.sh
请参见 [管理 VPN 用户](docs/manage-users-zh.md)。
- [使用辅助脚本管理 VPN 用户](docs/manage-users-zh.md#使用辅助脚本管理-vpn-用户)
- [查看 VPN 用户](docs/manage-users-zh.md#查看-vpn-用户)
- [查看或更改 IPsec PSK](docs/manage-users-zh.md#查看或更改-ipsec-psk)
- [手动管理 VPN 用户](docs/manage-users-zh.md#手动管理-vpn-用户)
## 高级用法
请参见 [高级用法](docs/advanced-usage-zh.md)。
- [使用其他的 DNS 服务器](docs/advanced-usage-zh.md#使用其他的-dns-服务器)
- [域名和更改服务器 IP](docs/advanced-usage-zh.md#域名和更改服务器-ip)
- [仅限 IKEv2 的 VPN](docs/advanced-usage-zh.md#仅限-ikev2-的-vpn)
- [VPN 内网 IP 和流量](docs/advanced-usage-zh.md#vpn-内网-ip-和流量)
- [自定义 VPN 子网](docs/advanced-usage-zh.md#自定义-vpn-子网)
- [转发端口到 VPN 客户端](docs/advanced-usage-zh.md#转发端口到-vpn-客户端)
- [VPN 分流](docs/advanced-usage-zh.md#vpn-分流)
- [访问 VPN 服务器的网段](docs/advanced-usage-zh.md#访问-vpn-服务器的网段)
- [更改 IPTables 规则](docs/advanced-usage-zh.md#更改-iptables-规则)
- [部署 Google BBR 拥塞控制](docs/advanced-usage-zh.md#部署-google-bbr-拥塞控制)
## 卸载 VPN
## 卸载说明
**警告:** 此[辅助脚本](../extras/vpnuninstall.sh)将从你的服务器中删除 IPsec VPN。所有的 VPN 配置将被**永久删除**,并且 Libreswan 和 xl2tpd 将被移除。此操作**不可撤销**
请参见 [卸载 VPN](docs/uninstall-zh.md)。
```bash
wget -nv -O vpnunst.sh https://get.vpnsetup.net/unst
sudo bash vpnunst.sh
```
- [使用辅助脚本卸载 VPN](docs/uninstall-zh.md#使用辅助脚本卸载-vpn)
- [手动卸载 VPN](docs/uninstall-zh.md#手动卸载-vpn)
更多信息请参见 [卸载 VPN](docs/uninstall-zh.md)。
## 问题和反馈

View File

@ -24,7 +24,7 @@ Your VPN login details will be randomly generated, and displayed when finished.
<details>
<summary>
Alternative one-liner.
Alternative one-liners.
</summary>
You may also use `curl` to download:
@ -33,7 +33,11 @@ You may also use `curl` to download:
curl -fsSL https://get.vpnsetup.net -o vpn.sh && sudo sh vpn.sh
```
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/vpnsetup.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
Alternative setup URL:
```bash
curl -fsSL https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/vpnsetup.sh -o vpn.sh && sudo sh vpn.sh
```
</details>
<details>
<summary>
@ -161,6 +165,13 @@ curl -fL https://get.vpnsetup.net -o vpn.sh
sudo sh vpn.sh
```
Alternative setup URL:
```bash
curl -fL https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/vpnsetup.sh -o vpn.sh
sudo sh vpn.sh
```
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/vpnsetup.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</details>
@ -204,7 +215,7 @@ wget https://get.vpnsetup.net/upg -qO vpnup.sh && sudo sh vpnup.sh
<details>
<summary>
Alternative one-liner.
Alternative one-liners.
</summary>
You may also use `curl` to download:
@ -213,7 +224,11 @@ You may also use `curl` to download:
curl -fsSL https://get.vpnsetup.net/upg -o vpnup.sh && sudo sh vpnup.sh
```
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/vpnupgrade.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
Alternative update URL:
```bash
curl -fsSL https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/vpnupgrade.sh -o vpnup.sh && sudo sh vpnup.sh
```
</details>
The latest supported Libreswan version is `4.6`. Check installed version: `ipsec --version`.
@ -224,32 +239,20 @@ The latest supported Libreswan version is `4.6`. Check installed version: `ipsec
See [Manage VPN users](docs/manage-users.md).
- [Manage VPN users using helper scripts](docs/manage-users.md#manage-vpn-users-using-helper-scripts)
- [View VPN users](docs/manage-users.md#view-vpn-users)
- [View or update the IPsec PSK](docs/manage-users.md#view-or-update-the-ipsec-psk)
- [Manually manage VPN users](docs/manage-users.md#manually-manage-vpn-users)
## Advanced usage
See [Advanced usage](docs/advanced-usage.md).
- [Use alternative DNS servers](docs/advanced-usage.md#use-alternative-dns-servers)
- [DNS name and server IP changes](docs/advanced-usage.md#dns-name-and-server-ip-changes)
- [IKEv2-only VPN](docs/advanced-usage.md#ikev2-only-vpn)
- [Internal VPN IPs and traffic](docs/advanced-usage.md#internal-vpn-ips-and-traffic)
- [Customize VPN subnets](docs/advanced-usage.md#customize-vpn-subnets)
- [Port forwarding to VPN clients](docs/advanced-usage.md#port-forwarding-to-vpn-clients)
- [Split tunneling](docs/advanced-usage.md#split-tunneling)
- [Access VPN server's subnet](docs/advanced-usage.md#access-vpn-servers-subnet)
- [Modify IPTables rules](docs/advanced-usage.md#modify-iptables-rules)
- [Deploy Google BBR congestion control](docs/advanced-usage.md#deploy-google-bbr-congestion-control)
## Uninstall the VPN
## Uninstallation
**Warning:** This [helper script](../extras/vpnuninstall.sh) will remove IPsec VPN from your server. All VPN configuration will be **permanently deleted**, and Libreswan and xl2tpd will be removed. This **cannot be undone**!
See [Uninstall the VPN](docs/uninstall.md).
```bash
wget -nv -O vpnunst.sh https://get.vpnsetup.net/unst
sudo bash vpnunst.sh
```
- [Uninstall using helper script](docs/uninstall.md#uninstall-using-helper-script)
- [Manually uninstall the VPN](docs/uninstall.md#manually-uninstall-the-vpn)
For more information, see [Uninstall the VPN](docs/uninstall.md).
## Feedback & Questions

View File

@ -50,14 +50,6 @@ wget -nv -O ikev2onlymode.sh https://get.vpnsetup.net/ikev2only
sudo bash ikev2onlymode.sh
```
<details>
<summary>
如果无法下载,请点这里。
</summary>
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/ikev2onlymode.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details>
要禁用仅限 IKEv2 模式,再次运行辅助脚本并选择适当的选项。
<details>

View File

@ -50,14 +50,6 @@ wget -nv -O ikev2onlymode.sh https://get.vpnsetup.net/ikev2only
sudo bash ikev2onlymode.sh
```
<details>
<summary>
Click here if you are unable to download.
</summary>
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/ikev2onlymode.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</details>
To disable IKEv2-only mode, run the helper script again and select the appropriate option.
<details>

View File

@ -62,8 +62,6 @@ chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin
```
然后按照上面的说明运行脚本。
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/ikev2setup.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details>
<details>
<summary>
@ -777,14 +775,6 @@ wget -nv -O ikev2changeaddr.sh https://get.vpnsetup.net/ikev2addr
sudo bash ikev2changeaddr.sh
```
<details>
<summary>
如果无法下载,请点这里。
</summary>
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/ikev2changeaddr.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details>
**重要:** 运行此脚本后,你必须手动更新任何现有 IKEv2 客户端设备上的服务器地址以及 Remote ID如果适用。对于 iOS 客户端,你需要使用 IKEv2 [辅助脚本](#使用辅助脚本配置-ikev2) 导出然后重新导入客户端配置。
## 更新 IKEv2 辅助脚本
@ -796,14 +786,6 @@ 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>
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/ikev2setup.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details>
## 手动配置 IKEv2
除了使用 [辅助脚本](#使用辅助脚本配置-ikev2) 之外,高级用户也可以手动在 VPN 服务器上配置 IKEv2。在继续之前推荐 [升级 Libreswan](../README-zh.md#升级libreswan) 到最新版本。

View File

@ -62,8 +62,6 @@ chmod +x /opt/src/ikev2.sh && ln -s /opt/src/ikev2.sh /usr/bin
```
Then run the script using the instructions above.
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/ikev2setup.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</details>
<details>
<summary>
@ -779,14 +777,6 @@ wget -nv -O ikev2changeaddr.sh https://get.vpnsetup.net/ikev2addr
sudo bash ikev2changeaddr.sh
```
<details>
<summary>
Click here if you are unable to download.
</summary>
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/ikev2changeaddr.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</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
@ -798,14 +788,6 @@ 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>
Click here if you are unable to download.
</summary>
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/ikev2setup.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</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

@ -40,8 +40,6 @@ chmod +x /opt/src/addvpnuser.sh && ln -s /opt/src/addvpnuser.sh /usr/bin
```
然后按照说明运行脚本。
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/add_vpn_user.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details>
另外,你也可以在添加参数的情况下运行脚本:
@ -77,8 +75,6 @@ chmod +x /opt/src/delvpnuser.sh && ln -s /opt/src/delvpnuser.sh /usr/bin
```
然后按照说明运行脚本。
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/del_vpn_user.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details>
另外,你也可以在添加参数的情况下运行脚本:
@ -99,14 +95,6 @@ sudo delvpnuser.sh '要删除的用户名'
wget -nv -O updatevpnusers.sh https://get.vpnsetup.net/updateusers
```
<details>
<summary>
如果无法下载,请点这里。
</summary>
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/update_vpn_users.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details>
要使用这个脚本,从以下选项中选择一个:
**重要:** 这个脚本会将你当前**所有的** VPN 用户移除并替换为你指定的列表中的用户。如果你需要保留已有的 VPN 用户,则必须将它们包含在下面的变量中。

View File

@ -40,8 +40,6 @@ chmod +x /opt/src/addvpnuser.sh && ln -s /opt/src/addvpnuser.sh /usr/bin
```
Then run the script using the instructions.
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/add_vpn_user.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</details>
Alternatively, you can run the script with arguments:
@ -77,8 +75,6 @@ chmod +x /opt/src/delvpnuser.sh && ln -s /opt/src/delvpnuser.sh /usr/bin
```
Then run the script using the instructions.
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/del_vpn_user.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</details>
Alternatively, you can run the script with arguments:
@ -99,14 +95,6 @@ First, download the script:
wget -nv -O updatevpnusers.sh https://get.vpnsetup.net/updateusers
```
<details>
<summary>
Click here if you are unable to download.
</summary>
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/update_vpn_users.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</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.

View File

@ -14,14 +14,6 @@ wget -nv -O vpnunst.sh https://get.vpnsetup.net/unst
sudo bash vpnunst.sh
```
<details>
<summary>
如果无法下载,请点这里。
</summary>
如果无法下载,点[这里](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/vpnuninstall.sh)查看脚本。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details>
## 手动卸载 VPN
另外,你也可以手动卸载 VPN。按照以下步骤操作。这些命令需要用 `root` 账户运行,或者使用 `sudo`

View File

@ -14,14 +14,6 @@ wget -nv -O vpnunst.sh https://get.vpnsetup.net/unst
sudo bash vpnunst.sh
```
<details>
<summary>
Click here if you are unable to download.
</summary>
If you are unable to download, click [here](https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/vpnuninstall.sh) to view the script. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</details>
## Manually uninstall the VPN
Alternatively, you may manually uninstall the VPN by following these steps. Commands must be run as `root`, or with `sudo`.