Update docs

This commit is contained in:
hwdsl2 2022-05-21 21:59:03 -05:00
parent 244d6a36f9
commit a77ba42fd9
18 changed files with 36 additions and 44 deletions

View File

@ -1,3 +1,5 @@
[English](README.md) | [中文](README-zh.md)
# IPsec VPN 服务器一键安装脚本
[![Build Status](https://github.com/hwdsl2/setup-ipsec-vpn/actions/workflows/main.yml/badge.svg)](https://github.com/hwdsl2/setup-ipsec-vpn/actions/workflows/main.yml) [![GitHub Stars](docs/images/badges/github-stars.svg)](https://github.com/hwdsl2/setup-ipsec-vpn/stargazers) [![Docker Stars](docs/images/badges/docker-stars.svg)](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md) [![Docker Pulls](docs/images/badges/docker-pulls.svg)](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md)
@ -8,8 +10,6 @@ IPsec VPN 可以加密你的网络流量,以防止在通过因特网传送时
我们将使用 [Libreswan](https://libreswan.org/) 作为 IPsec 服务器,以及 [xl2tpd](https://github.com/xelerance/xl2tpd) 作为 L2TP 提供者。
*其他语言版本: [English](README.md), [简体中文](README-zh.md).*
## 快速开始
首先,在你的 Linux 服务器\* 上全新安装 Ubuntu, Debian 或者 CentOS。
@ -22,15 +22,13 @@ wget https://get.vpnsetup.net -O vpn.sh && sudo sh vpn.sh
你的 VPN 登录凭证将会被自动随机生成,并在安装完成后显示。
安装成后,你可以在同一台服务器上安装 [OpenVPN](https://github.com/hwdsl2/openvpn-install) 和/或 [WireGuard](https://github.com/hwdsl2/wireguard-install)。这是可选的。
安装成后,你可以在同一台服务器上安装 [OpenVPN](https://github.com/hwdsl2/openvpn-install) 和/或 [WireGuard](https://github.com/hwdsl2/wireguard-install)。这是可选的。
<details>
<summary>
或者,你也可以使用以下命令。
</summary>
你也可以使用 `curl` 下载:
```bash
curl -fsSL https://get.vpnsetup.net -o vpn.sh && sudo sh vpn.sh
```
@ -128,7 +126,7 @@ VPN_PASSWORD='你的VPN密码' \
sh vpn.sh
```
安装成后,你可以在同一台服务器上安装 [OpenVPN](https://github.com/hwdsl2/openvpn-install) 和/或 [WireGuard](https://github.com/hwdsl2/wireguard-install)。这是可选的。
安装成后,你可以在同一台服务器上安装 [OpenVPN](https://github.com/hwdsl2/openvpn-install) 和/或 [WireGuard](https://github.com/hwdsl2/wireguard-install)。这是可选的。
<details>
<summary>
@ -197,7 +195,7 @@ sudo sh vpn.sh
## 重要提示
*其他语言版本: [English](README.md#important-notes), [简体中文](README-zh.md#重要提示)。*
*其他语言版本: [English](README.md#important-notes), [中文](README-zh.md#重要提示)。*
**Windows 用户** 对于 IPsec/L2TP 模式,在首次连接之前需要 [修改注册表](docs/clients-zh.md#windows-错误-809),以解决 VPN 服务器或客户端与 NAT比如家用路由器的兼容问题。
@ -224,8 +222,6 @@ wget https://get.vpnsetup.net/upg -O vpnup.sh && sudo sh vpnup.sh
或者,你也可以使用以下命令。
</summary>
你也可以使用 `curl` 下载:
```bash
curl -fsSL https://get.vpnsetup.net/upg -o vpnup.sh && sudo sh vpnup.sh
```

View File

@ -1,3 +1,5 @@
[English](README.md) | [中文](README-zh.md)
# IPsec VPN Server Auto Setup Scripts
[![Build Status](https://github.com/hwdsl2/setup-ipsec-vpn/actions/workflows/main.yml/badge.svg)](https://github.com/hwdsl2/setup-ipsec-vpn/actions/workflows/main.yml) [![GitHub Stars](docs/images/badges/github-stars.svg)](https://github.com/hwdsl2/setup-ipsec-vpn/stargazers) [![Docker Stars](docs/images/badges/docker-stars.svg)](https://github.com/hwdsl2/docker-ipsec-vpn-server) [![Docker Pulls](docs/images/badges/docker-pulls.svg)](https://github.com/hwdsl2/docker-ipsec-vpn-server)
@ -8,8 +10,6 @@ An IPsec VPN encrypts your network traffic, so that nobody between you and the V
We will use [Libreswan](https://libreswan.org/) as the IPsec server, and [xl2tpd](https://github.com/xelerance/xl2tpd) as the L2TP provider.
*Read this in other languages: [English](README.md), [简体中文](README-zh.md).*
## Quick start
First, prepare your Linux server\* with a fresh install of Ubuntu, Debian or CentOS.
@ -29,8 +29,6 @@ After setup, you may optionally install [OpenVPN](https://github.com/hwdsl2/open
Alternative one-liners.
</summary>
You may also use `curl` to download:
```bash
curl -fsSL https://get.vpnsetup.net -o vpn.sh && sudo sh vpn.sh
```
@ -197,7 +195,7 @@ Enjoy your very own VPN! :sparkles::tada::rocket::sparkles:
## Important notes
*Read this in other languages: [English](README.md#important-notes), [简体中文](README-zh.md#重要提示).*
*Read this in other languages: [English](README.md#important-notes), [中文](README-zh.md#重要提示).*
**Windows users**: For IPsec/L2TP mode, a [one-time registry change](docs/clients.md#windows-error-809) is required if the VPN server or client is behind NAT (e.g. home router).
@ -224,8 +222,6 @@ wget https://get.vpnsetup.net/upg -O vpnup.sh && sudo sh vpnup.sh
Alternative one-liners.
</summary>
You may also use `curl` to download:
```bash
curl -fsSL https://get.vpnsetup.net/upg -o vpnup.sh && sudo sh vpnup.sh
```

View File

@ -1,6 +1,6 @@
# 在 Microsoft Azure 上部署
*其他语言版本: [English](README.md), [简体中文](README-zh.md)。*
*其他语言版本: [English](README.md), [中文](README-zh.md)。*
使用这个模板,你可以在 Microsoft Azure Cloud 上快速搭建一个 VPN 服务器 [定价细节](https://azure.microsoft.com/zh-cn/pricing/details/virtual-machines/))。

View File

@ -1,6 +1,6 @@
# Deploy to Microsoft Azure
*Read this in other languages: [English](README.md), [简体中文](README-zh.md).*
*Read this in other languages: [English](README.md), [中文](README-zh.md).*
This template will create a fully working VPN server on the Microsoft Azure Cloud ([pricing details](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/)).

View File

@ -1,6 +1,6 @@
# 高级用法
*其他语言版本: [English](advanced-usage.md), [简体中文](advanced-usage-zh.md)。*
*其他语言版本: [English](advanced-usage.md), [中文](advanced-usage-zh.md)。*
* [使用其他的 DNS 服务器](#使用其他的-dns-服务器)
* [域名和更改服务器 IP](#域名和更改服务器-ip)

View File

@ -1,6 +1,6 @@
# Advanced Usage
*Read this in other languages: [English](advanced-usage.md), [简体中文](advanced-usage-zh.md).*
*Read this in other languages: [English](advanced-usage.md), [中文](advanced-usage-zh.md).*
* [Use alternative DNS servers](#use-alternative-dns-servers)
* [DNS name and server IP changes](#dns-name-and-server-ip-changes)

View File

@ -1,6 +1,6 @@
# 高级用法:部署 Google BBR 拥塞控制算法
*其他语言版本: [English](bbr.md), [简体中文](bbr-zh.md)。*
*其他语言版本: [English](bbr.md), [中文](bbr-zh.md)。*
Google BBR是一种拥塞控制算法它能够显著提升服务器吞吐率并降低延迟。

View File

@ -1,6 +1,6 @@
# Advanced usage: Deploy Google BBR congestion control algorithm
*Read this in other languages: [English](bbr.md), [简体中文](bbr-zh.md).*
*Read this in other languages: [English](bbr.md), [中文](bbr-zh.md).*
Google BBR is a congestion control algorithm that could significantly increase server throughput and reduce latency.

View File

@ -1,6 +1,6 @@
# 配置 IPsec/XAuth VPN 客户端
*其他语言版本: [English](clients-xauth.md), [简体中文](clients-xauth-zh.md)。*
*其他语言版本: [English](clients-xauth.md), [中文](clients-xauth-zh.md)。*
**注:** 你也可以使用 [IKEv2](ikev2-howto-zh.md)(推荐)或者 [IPsec/L2TP](clients-zh.md) 模式连接。

View File

@ -1,6 +1,6 @@
# Configure IPsec/XAuth VPN Clients
*Read this in other languages: [English](clients-xauth.md), [简体中文](clients-xauth-zh.md).*
*Read this in other languages: [English](clients-xauth.md), [中文](clients-xauth-zh.md).*
**Note:** You may also connect using [IKEv2](ikev2-howto.md) (recommended) or [IPsec/L2TP](clients.md) mode.

View File

@ -1,6 +1,6 @@
# 配置 IPsec/L2TP VPN 客户端
*其他语言版本: [English](clients.md), [简体中文](clients-zh.md)。*
*其他语言版本: [English](clients.md), [中文](clients-zh.md)。*
**注:** 你也可以使用 [IKEv2](ikev2-howto-zh.md)(推荐)或者 [IPsec/XAuth](clients-xauth-zh.md) 模式连接。
@ -237,7 +237,7 @@ Fedora 28和更新版本和 CentOS 8/7 用户可以使用 [IPsec/XAuth](cl
## 故障排除
*其他语言版本: [English](clients.md#troubleshooting), [简体中文](clients-zh.md#故障排除)。*
*其他语言版本: [English](clients.md#troubleshooting), [中文](clients-zh.md#故障排除)。*
**另见:** [检查日志及 VPN 状态](#检查日志及-vpn-状态)[IKEv2 故障排除](ikev2-howto-zh.md#故障排除) 和 [高级用法](advanced-usage-zh.md)。
@ -328,7 +328,7 @@ Fedora 28和更新版本和 CentOS 8/7 用户可以使用 [IPsec/XAuth](cl
Windows 8, 10 和 11 默认使用 "smart multi-homed name resolution" (智能多宿主名称解析)。如果你的因特网适配器的 DNS 服务器在本地网段上,在使用 Windows 自带的 IPsec VPN 客户端时可能会导致 "DNS 泄漏"。要解决这个问题,你可以 [禁用智能多宿主名称解析](https://www.neowin.net/news/guide-prevent-dns-leakage-while-using-a-vpn-on-windows-10-and-windows-8/),或者配置你的因特网适配器以使用在你的本地网段之外的 DNS 服务器(比如 8.8.8.8 和 8.8.4.4)。在完成后[清除 DNS 缓存](https://support.opendns.com/hc/en-us/articles/227988627-How-to-clear-the-DNS-Cache-)并且重启计算机。
另外,如果你的计算机启用了 IPv6所有的 IPv6 流量(包括 DNS 请求)都将绕过 VPN。要在 Windows 上禁用 IPv6请看[这里](https://support.microsoft.com/zh-cn/help/929852/guidance-for-configuring-ipv6-in-windows-for-advanced-users)。如果你需要支持 IPv6 的 VPN可以另外尝试 [OpenVPN](https://github.com/Nyr/openvpn-install)。
另外,如果你的计算机启用了 IPv6所有的 IPv6 流量(包括 DNS 请求)都将绕过 VPN。要在 Windows 上禁用 IPv6请看[这里](https://support.microsoft.com/zh-cn/help/929852/guidance-for-configuring-ipv6-in-windows-for-advanced-users)。如果你需要支持 IPv6 的 VPN可以另外尝试 [OpenVPN](https://github.com/hwdsl2/openvpn-install)。
### Android MTU/MSS 问题
@ -377,7 +377,7 @@ OS X (macOS) 用户: 如果可以成功地使用 IPsec/L2TP 模式连接,但
为了节约电池iOS 设备 (iPhone/iPad) 在屏幕变黑(睡眠模式)之后不久就会自动断开 Wi-Fi 连接。这会导致 IPsec VPN 断开。该行为是被 [故意设计的](https://discussions.apple.com/thread/2333948) 并且不能被配置。
如果需要 VPN 在设备唤醒后自动重连,你可以使用 [IKEv2](ikev2-howto-zh.md) 模式连接(推荐)并启用 "VPN On Demand" 功能。或者你也可以另外尝试使用 [OpenVPN](https://github.com/Nyr/openvpn-install),它支持 [一些选项](https://openvpn.net/vpn-server-resources/faq-regarding-openvpn-connect-ios/) 比如 "Reconnect on Wakeup" 和 "Seamless Tunnel"。
如果需要 VPN 在设备唤醒后自动重连,你可以使用 [IKEv2](ikev2-howto-zh.md) 模式连接(推荐)并启用 "VPN On Demand" 功能。或者你也可以另外尝试使用 [OpenVPN](https://github.com/hwdsl2/openvpn-install),它支持 [一些选项](https://openvpn.net/vpn-server-resources/faq-regarding-openvpn-connect-ios/) 比如 "Reconnect on Wakeup" 和 "Seamless Tunnel"。
<a name="debian-10-内核"></a>
Android 设备在进入睡眠模式不久后也会断开 Wi-Fi 连接,如果你没有启用选项 "睡眠期间保持 WLAN 开启" 的话。该选项在 Android 8 (Oreo) 和更新版本中不再可用。另外,你也可以尝试打开 "始终开启 VPN" 选项以保持连接。详情请看 [这里](https://support.google.com/android/answer/9089766?hl=zh-Hans)。

View File

@ -1,6 +1,6 @@
# Configure IPsec/L2TP VPN Clients
*Read this in other languages: [English](clients.md), [简体中文](clients-zh.md).*
*Read this in other languages: [English](clients.md), [中文](clients-zh.md).*
**Note:** You may also connect using [IKEv2](ikev2-howto.md) (recommended) or [IPsec/XAuth](clients-xauth.md) mode.
@ -236,7 +236,7 @@ First check [here](https://github.com/nm-l2tp/NetworkManager-l2tp/wiki/Prebuilt-
## Troubleshooting
*Read this in other languages: [English](clients.md#troubleshooting), [简体中文](clients-zh.md#故障排除).*
*Read this in other languages: [English](clients.md#troubleshooting), [中文](clients-zh.md#故障排除).*
**See also:** [Check logs and VPN status](#check-logs-and-vpn-status), [IKEv2 troubleshooting](ikev2-howto.md#troubleshooting) and [Advanced usage](advanced-usage.md).
@ -327,7 +327,7 @@ After upgrading Windows 10 version (e.g. from 1709 to 1803), you may need to re-
Windows 8, 10 and 11 use "smart multi-homed name resolution" by default, which may cause "DNS leaks" when using the native IPsec VPN client if your DNS servers on the Internet adapter are from the local network segment. To fix, you may either [disable smart multi-homed name resolution](https://www.neowin.net/news/guide-prevent-dns-leakage-while-using-a-vpn-on-windows-10-and-windows-8/), or configure your Internet adapter to use DNS servers outside your local network (e.g. 8.8.8.8 and 8.8.4.4). When finished, [clear the DNS cache](https://support.opendns.com/hc/en-us/articles/227988627-How-to-clear-the-DNS-Cache-) and reboot your PC.
In addition, if your computer has IPv6 enabled, all IPv6 traffic (including DNS queries) will bypass the VPN. Learn how to [disable IPv6](https://support.microsoft.com/en-us/help/929852/guidance-for-configuring-ipv6-in-windows-for-advanced-users) in Windows. If you need a VPN with IPv6 support, you could instead try [OpenVPN](https://github.com/Nyr/openvpn-install).
In addition, if your computer has IPv6 enabled, all IPv6 traffic (including DNS queries) will bypass the VPN. Learn how to [disable IPv6](https://support.microsoft.com/en-us/help/929852/guidance-for-configuring-ipv6-in-windows-for-advanced-users) in Windows. If you need a VPN with IPv6 support, you could instead try [OpenVPN](https://github.com/hwdsl2/openvpn-install).
### Android MTU/MSS issues
@ -376,7 +376,7 @@ In addition, users running macOS Big Sur 11.0 should update to version 11.1 or n
To save battery, iOS devices (iPhone/iPad) will automatically disconnect Wi-Fi shortly after the screen turns off (sleep mode). As a result, the IPsec VPN disconnects. This behavior is [by design](https://discussions.apple.com/thread/2333948) and cannot be configured.
If you need the VPN to auto-reconnect when the device wakes up, you may connect using [IKEv2](ikev2-howto.md) mode (recommended) and enable the "VPN On Demand" feature. Alternatively, you may try [OpenVPN](https://github.com/Nyr/openvpn-install) instead, which [has support for options](https://openvpn.net/vpn-server-resources/faq-regarding-openvpn-connect-ios/) such as "Reconnect on Wakeup" and "Seamless Tunnel".
If you need the VPN to auto-reconnect when the device wakes up, you may connect using [IKEv2](ikev2-howto.md) mode (recommended) and enable the "VPN On Demand" feature. Alternatively, you may try [OpenVPN](https://github.com/hwdsl2/openvpn-install) instead, which [has support for options](https://openvpn.net/vpn-server-resources/faq-regarding-openvpn-connect-ios/) such as "Reconnect on Wakeup" and "Seamless Tunnel".
<a name="debian-10-kernel"></a>
Android devices will also disconnect Wi-Fi shortly after entering sleep mode, unless the option "Keep Wi-Fi on during sleep" is enabled. This option is no longer available in Android 8 (Oreo) and newer. Alternatively, you may try enabling the "Always-on VPN" option to stay connected. Learn more [here](https://support.google.com/android/answer/9089766?hl=en).

View File

@ -1,6 +1,6 @@
# IKEv2 VPN 配置和使用指南
*其他语言版本: [English](ikev2-howto.md), [简体中文](ikev2-howto-zh.md)。*
*其他语言版本: [English](ikev2-howto.md), [中文](ikev2-howto-zh.md)。*
**注:** 你也可以使用 [IPsec/L2TP](clients-zh.md) 或者 [IPsec/XAuth](clients-xauth-zh.md) 模式连接。
@ -123,7 +123,7 @@ To customize IKEv2 or client options, run this script without arguments.
## 配置 IKEv2 VPN 客户端
*其他语言版本: [English](ikev2-howto.md#configure-ikev2-vpn-clients), [简体中文](ikev2-howto-zh.md#配置-ikev2-vpn-客户端)。*
*其他语言版本: [English](ikev2-howto.md#configure-ikev2-vpn-clients), [中文](ikev2-howto-zh.md#配置-ikev2-vpn-客户端)。*
**注:** 如果要添加或者导出 IKEv2 客户端,运行 `sudo ikev2.sh`。使用 `-h` 显示使用信息。客户端配置文件可以在导入后安全删除。
@ -698,7 +698,7 @@ sudo ikev2.sh --revokeclient [client name]
## 故障排除
*其他语言版本: [English](ikev2-howto.md#troubleshooting), [简体中文](ikev2-howto-zh.md#故障排除)。*
*其他语言版本: [English](ikev2-howto.md#troubleshooting), [中文](ikev2-howto-zh.md#故障排除)。*
**另见:** [检查日志及 VPN 状态](clients-zh.md#检查日志及-vpn-状态)[IKEv1 故障排除](clients-zh.md#故障排除) 和 [高级用法](advanced-usage-zh.md)。

View File

@ -1,6 +1,6 @@
# Guide: How to Set Up and Use IKEv2 VPN
*Read this in other languages: [English](ikev2-howto.md), [简体中文](ikev2-howto-zh.md).*
*Read this in other languages: [English](ikev2-howto.md), [中文](ikev2-howto-zh.md).*
**Note:** You may also connect using [IPsec/L2TP](clients.md) or [IPsec/XAuth](clients-xauth.md) mode.
@ -123,7 +123,7 @@ To customize IKEv2 or client options, run this script without arguments.
## Configure IKEv2 VPN clients
*Read this in other languages: [English](ikev2-howto.md#configure-ikev2-vpn-clients), [简体中文](ikev2-howto-zh.md#配置-ikev2-vpn-客户端).*
*Read this in other languages: [English](ikev2-howto.md#configure-ikev2-vpn-clients), [中文](ikev2-howto-zh.md#配置-ikev2-vpn-客户端).*
**Note:** To add or export IKEv2 clients, run `sudo ikev2.sh`. Use `-h` to show usage. Client config files can be safely deleted after import.
@ -700,7 +700,7 @@ Alternatively, you can manually revoke a client certificate. This can be done us
## Troubleshooting
*Read this in other languages: [English](ikev2-howto.md#troubleshooting), [简体中文](ikev2-howto-zh.md#故障排除).*
*Read this in other languages: [English](ikev2-howto.md#troubleshooting), [中文](ikev2-howto-zh.md#故障排除).*
**See also:** [Check logs and VPN status](clients.md#check-logs-and-vpn-status), [IKEv1 troubleshooting](clients.md#troubleshooting) and [Advanced usage](advanced-usage.md).

View File

@ -1,6 +1,6 @@
# 管理 VPN 用户
*其他语言版本: [English](manage-users.md), [简体中文](manage-users-zh.md)。*
*其他语言版本: [English](manage-users.md), [中文](manage-users-zh.md)。*
在默认情况下,将只创建一个用于 VPN 登录的用户账户。如果你需要查看或管理 IPsec/L2TP 和 IPsec/XAuth ("Cisco IPsec") 模式的用户,请阅读本文档。对于 IKEv2参见 [管理客户端证书](ikev2-howto-zh.md#管理客户端证书)。
@ -11,7 +11,7 @@
## 使用辅助脚本管理 VPN 用户
*其他语言版本: [English](manage-users.md#manage-vpn-users-using-helper-scripts), [简体中文](manage-users-zh.md#使用辅助脚本管理-vpn-用户)。*
*其他语言版本: [English](manage-users.md#manage-vpn-users-using-helper-scripts), [中文](manage-users-zh.md#使用辅助脚本管理-vpn-用户)。*
你可以使用辅助脚本添加,删除或者更新 VPN 用户。它们将同时更新 IPsec/L2TP 和 IPsec/XAuth ("Cisco IPsec") 模式的用户。对于 IKEv2 模式,请参见 [管理客户端证书](ikev2-howto-zh.md#管理客户端证书)。

View File

@ -1,6 +1,6 @@
# Manage VPN Users
*Read this in other languages: [English](manage-users.md), [简体中文](manage-users-zh.md).*
*Read this in other languages: [English](manage-users.md), [中文](manage-users-zh.md).*
By default, a single user account for VPN login is created. If you wish to view or manage users for the IPsec/L2TP and IPsec/XAuth ("Cisco IPsec") modes, read this document. For IKEv2, see [Manage client certificates](ikev2-howto.md#manage-client-certificates).
@ -11,7 +11,7 @@ By default, a single user account for VPN login is created. If you wish to view
## Manage VPN users using helper scripts
*Read this in other languages: [English](manage-users.md#manage-vpn-users-using-helper-scripts), [简体中文](manage-users-zh.md#使用辅助脚本管理-vpn-用户).*
*Read this in other languages: [English](manage-users.md#manage-vpn-users-using-helper-scripts), [中文](manage-users-zh.md#使用辅助脚本管理-vpn-用户).*
You may use helper scripts to add, delete or update VPN users for both IPsec/L2TP and IPsec/XAuth ("Cisco IPsec") modes. For IKEv2 mode, see [Manage client certificates](ikev2-howto.md#manage-client-certificates).

View File

@ -1,6 +1,6 @@
# 卸载 VPN
*其他语言版本: [English](uninstall.md), [简体中文](uninstall-zh.md)。*
*其他语言版本: [English](uninstall.md), [中文](uninstall-zh.md)。*
* [使用辅助脚本卸载 VPN](#使用辅助脚本卸载-vpn)
* [手动卸载 VPN](#手动卸载-vpn)

View File

@ -1,6 +1,6 @@
# Uninstall the VPN
*Read this in other languages: [English](uninstall.md), [简体中文](uninstall-zh.md).*
*Read this in other languages: [English](uninstall.md), [中文](uninstall-zh.md).*
* [Uninstall using helper script](#uninstall-using-helper-script)
* [Manually uninstall the VPN](#manually-uninstall-the-vpn)