From 6b9a3cae4d2bff353f4afac880df21be1f498948 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Thu, 19 May 2016 01:39:43 -0500 Subject: [PATCH] Improve docs for Windows users --- README-zh.md | 2 +- README.md | 2 +- docs/clients-xauth-zh.md | 14 ++++++++++++-- docs/clients-xauth.md | 14 ++++++++++++-- docs/clients-zh.md | 14 ++++++++++++-- docs/clients.md | 14 ++++++++++++-- 6 files changed, 50 insertions(+), 10 deletions(-) diff --git a/README-zh.md b/README-zh.md index 7106a1d..5a0dcd1 100644 --- a/README-zh.md +++ b/README-zh.md @@ -100,7 +100,7 @@ sudo sh vpnsetup_centos.sh ## 重要提示 -**Windows 用户** 在首次连接之前需要修改一次注册表,以解决 VPN 服务器和客户端与 NAT (比如家用路由器)的兼容问题。另外如果遇到`Error 628`,请打开 VPN 连接属性的"安全"选项卡,启用 `CHAP` 选项并禁用 `MS-CHAP v2`。 +**Windows 用户** 在首次连接之前需要修改一次注册表,以解决 VPN 服务器和客户端与 NAT (比如家用路由器)的兼容问题。另外如果遇到`Error 628`,请打开 VPN 连接属性的"安全"选项卡,启用 `CHAP` 选项并禁用 `MS-CHAP v2`。 **Android 6 (Marshmallow) 用户** 请参见此文档中的注释: 配置 IPsec/L2TP VPN 客户端。 diff --git a/README.md b/README.md index b9f6840..c82bd4d 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ Enjoy your very own VPN! :sparkles::tada::rocket::sparkles: ## Important Notes -For **Windows users**, a one-time registry change is required if the VPN server and/or client is behind NAT (e.g. home router). In case you see `Error 628`, go to the "Security" tab of VPN connection properties, enable `CHAP` and disable `MS-CHAP v2`. +For **Windows users**, a one-time registry change is required if the VPN server and/or client is behind NAT (e.g. home router). In case you see `Error 628`, go to the "Security" tab of VPN connection properties, enable `CHAP` and disable `MS-CHAP v2`. **Android 6 (Marshmallow) users**: Please see notes in Configure IPsec/L2TP VPN Clients. diff --git a/docs/clients-xauth-zh.md b/docs/clients-xauth-zh.md index dc0ad59..8dcf1bf 100644 --- a/docs/clients-xauth-zh.md +++ b/docs/clients-xauth-zh.md @@ -32,10 +32,20 @@ 1. 在 **Password** 字段中输入`你的 VPN 密码`。 1. 单击 **Connect**。 -注: 在首次连接之前需要修改一次注册表,以解决 VPN 服务器和客户端与 NAT (比如家用路由器)的兼容问题。请按照链接文章中的说明进行操作,并在完成后重新启动计算机。 - VPN 连接成功后,会在 VPN Connect 状态窗口中显示 **tunnel enabled** 字样。最后你可以到这里检测你的 IP 地址,应该显示为`你的 VPN 服务器 IP`。 + +**注:** 在首次连接之前需要修改一次注册表,以解决 VPN 服务器和客户端与 NAT (比如家用路由器)的兼容问题。请参照链接文章中的说明,或者打开提升权限命令提示符并运行以下命令。完成后必须重新启动计算机。 +- 适用于 Windows Vista 及以上版本 + ```console + REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f + ``` + +- 仅限 Windows XP + ```console + REG ADD HKLM\SYSTEM\CurrentControlSet\Services\IPSec /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f + ``` + ### OS X ### 1. 打开系统偏好设置并转到网络部分。 1. 在窗口左下角单击 **+** 按钮。 diff --git a/docs/clients-xauth.md b/docs/clients-xauth.md index 2e5f95c..d36e250 100644 --- a/docs/clients-xauth.md +++ b/docs/clients-xauth.md @@ -32,10 +32,20 @@ Note: You may also connect using [IPsec/L2TP mode](clients.md). No additional so 1. Enter `Your VPN Password` in the **Password** field. 1. Click **Connect**. -Note: A one-time registry change is required if the VPN server and/or client is behind NAT (e.g. home router). Please follow instructions in the linked article, and reboot your computer when done. - Once connected, you will see **tunnel enabled** in the VPN Connect status window. You can verify that your traffic is being routed properly by looking up your IP address on Google. It should say "Your public IP address is `Your VPN Server IP`". + +**Note:** A one-time registry change is required if the VPN server and/or client is behind NAT (e.g. home router). Please refer to the linked page, or run the following from an elevated command prompt. You must reboot your computer when done. +- For Windows Vista and newer + ```console + REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f + ``` + +- For Windows XP only + ```console + REG ADD HKLM\SYSTEM\CurrentControlSet\Services\IPSec /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f + ``` + ### OS X ### 1. Open System Preferences and go to the Network section. 1. Click the **+** button in the lower-left corner of the window. diff --git a/docs/clients-zh.md b/docs/clients-zh.md index 4aa3b2b..079fc19 100644 --- a/docs/clients-zh.md +++ b/docs/clients-zh.md @@ -38,10 +38,20 @@ 1. 单击 **确定** 关闭 **高级设置**。 1. 单击 **确定** 保存 VPN 连接的详细信息。 -注: 在首次连接之前需要修改一次注册表,以解决 VPN 服务器和客户端与 NAT (比如家用路由器)的兼容问题。请按照链接文章中的说明进行操作,并在完成后重新启动计算机。 - 要连接到 VPN,只需在系统托盘中的无线/网络图标上单击右键,选择新的 VPN 连接,然后单击 **连接**。最后你可以到这里检测你的 IP 地址,应该显示为`你的 VPN 服务器 IP`。 + +**注:** 在首次连接之前需要修改一次注册表,以解决 VPN 服务器和客户端与 NAT (比如家用路由器)的兼容问题。请参照链接文章中的说明,或者打开提升权限命令提示符并运行以下命令。完成后必须重新启动计算机。 +- 适用于 Windows Vista 及以上版本 + ```console + REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f + ``` + +- 仅限 Windows XP + ```console + REG ADD HKLM\SYSTEM\CurrentControlSet\Services\IPSec /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f + ``` + ### OS X ### 1. 打开系统偏好设置并转到网络部分。 1. 在窗口左下角单击 **+** 按钮。 diff --git a/docs/clients.md b/docs/clients.md index 3b545ad..4593f0f 100644 --- a/docs/clients.md +++ b/docs/clients.md @@ -38,10 +38,20 @@ After settin 1. Click **OK** to close the **Advanced settings**. 1. Click **OK** to save the VPN connection details. -Note: A one-time registry change is required if the VPN server and/or client is behind NAT (e.g. home router). Please follow instructions in the linked article, and reboot your computer when done. - To connect to the VPN, simply right-click on the wireless/network icon in your system tray, select the new VPN connection, and click **Connect**. You can verify that your traffic is being routed properly by looking up your IP address on Google. It should say "Your public IP address is `Your VPN Server IP`". + +**Note:** A one-time registry change is required if the VPN server and/or client is behind NAT (e.g. home router). Please refer to the linked page, or run the following from an elevated command prompt. You must reboot your computer when done. +- For Windows Vista and newer + ```console + REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f + ``` + +- For Windows XP only + ```console + REG ADD HKLM\SYSTEM\CurrentControlSet\Services\IPSec /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f + ``` + ### OS X ### 1. Open System Preferences and go to the Network section. 1. Click the **+** button in the lower-left corner of the window.