Update docs
- Add Windows PowerShell commands for creating a VPN connection - Closes #478. Thanks @nzbart!
This commit is contained in:
parent
593bb3eea0
commit
442458193a
@ -48,6 +48,15 @@
|
||||
1. 单击 **确定** 关闭 **高级设置**。
|
||||
1. 单击 **确定** 保存 VPN 连接的详细信息。
|
||||
|
||||
另外,除了按照以上步骤操作,你也可以运行下面的 Windows PowerShell 命令来创建 VPN 连接。将 `你的 VPN 服务器 IP` 和 `你的 VPN IPsec PSK` 换成你自己的值,用单引号括起来:
|
||||
|
||||
```console
|
||||
# 不保存命令行历史记录
|
||||
Set-PSReadlineOption –HistorySaveStyle SaveNothing
|
||||
# 创建 VPN 连接
|
||||
Add-VpnConnection -Name 'My IPsec VPN' -ServerAddress '你的 VPN 服务器 IP' -TunnelType L2tp -EncryptionLevel Required -AuthenticationMethod Chap,MSChapv2 -L2tpPsk '你的 VPN IPsec PSK' -Force -RememberCredential -PassThru
|
||||
```
|
||||
|
||||
**注:** 在首次连接之前需要修改一次注册表。请参见下面的说明。
|
||||
|
||||
### Windows 7, Vista and XP
|
||||
|
@ -48,6 +48,15 @@ After <a href="https://github.com/hwdsl2/setup-ipsec-vpn" target="_blank">settin
|
||||
1. Click **OK** to close the **Advanced settings**.
|
||||
1. Click **OK** to save the VPN connection details.
|
||||
|
||||
Alternatively, instead of following the steps above, you may create the VPN connection using these Windows PowerShell commands. Replace `Your VPN Server IP` and `Your VPN IPsec PSK` with your own values, enclosed in single quotes:
|
||||
|
||||
```console
|
||||
# Disable persistent command history
|
||||
Set-PSReadlineOption –HistorySaveStyle SaveNothing
|
||||
# Create VPN connection
|
||||
Add-VpnConnection -Name 'My IPsec VPN' -ServerAddress 'Your VPN Server IP' -TunnelType L2tp -EncryptionLevel Required -AuthenticationMethod Chap,MSChapv2 -L2tpPsk 'Your VPN IPsec PSK' -Force -RememberCredential -PassThru
|
||||
```
|
||||
|
||||
**Note:** A one-time registry change is required before connecting. See details below.
|
||||
|
||||
### Windows 7, Vista and XP
|
||||
|
Loading…
x
Reference in New Issue
Block a user