当您连接到公共Wi-Fi(Wi-Fi)或在旅行时访问您公司的网络时,虚拟专用网络(Private Networks)( VPN(VPNs) ) 可用于加密您的流量。奇怪的是,除了您的Windows设备之外,您还想在您的Android 智能手机或平板电脑上使用(Android smartphone or tablet)VPN。以下是在您的Android 设备(Android device)上设置VPN、连接和断开(connect and disconnect)VPN以及从Android中删除VPN 连接(VPN connection)的方法:
注意:(NOTE:)本指南涵盖搭载Android 8 Oreo 和 Android(Oreo and Android) 9 Pie的智能手机。在我们的屏幕截图中,Android 8 Oreo始终位于左侧,而Android 9 Pie位于右侧。如果您不知道您使用的Android版本是什么,请阅读如何在智能手机或平板电脑(smartphone or tablet)上查看Android 版本(Android version)?
连接到 VPN 所需的条件
要在您的Android 智能手机或平板电脑(Android smartphone or tablet)上使用虚拟专用网络(Virtual Private Network)( VPN ) ,您必须在建立连接之前了解一些详细信息:
- Android原生支持以下类型的VPN协议:PPTP、L2TP和IPSec。如果您需要使用OpenVPN,那么您应该安装OpenVPN for Android,并使用它而不是本指南中共享的步骤。
- 您要连接的VPN 服务器(VPN server)的IP 地址(IP address)或域URL 。
- VPN 身份验证(VPN authentication)凭据,通常采用用户名和密码的形式。
- 与您将要设置的VPN 连接(VPN connection)相关的其他配置选项。其中包括VPN 服务器(VPN server)类型、加密类型(encryption type)或VPN 连接(VPN connection)必须使用的特定DNS服务器。
获得要设置的VPN 连接(VPN connection)所需的所有信息后,请继续,并按照下一部分中的步骤进行操作。
如何在Android中建立VPN 连接(VPN connection)
要在您的Android 智能手机或平板电脑(Android smartphone or tablet)上创建VPN 连接(VPN connection),首先打开设置(Settings)。在 Android 8 Oreo 中,点击网络和互联网(Network & Internet),而在 Android 9 Pie 中,点击无线和网络。(Wireless & networks.)
您会看到一些与网络相关的设置。在两个Android版本中,点击VPN。
这将打开一个屏幕,您可以在其中看到在您的Android 智能手机或平板电脑(Android smartphone or tablet)上配置的所有VPN 连接(VPN connection)。除非您或您的Android 设备(Android device)上使用的应用程序之一过去创建了VPN 连接(VPN connection),否则此屏幕应该是空的。要创建新的VPN 连接(VPN connection),请点击屏幕右上角的(right corner)+ (plus)按钮(在Android 8 Oreo中)或点击“添加 VPN 网络”(Add VPN Network")(在 Android 9 Pie 中)。
Android会打开一个对话框,您必须在其中输入要创建的VPN 连接的所有详细信息。(VPN connection)基本配置选项是:
- 名称(Name)- 输入有助于识别此VPN 连接(VPN connection)的名称。
- 类型 -(Type -)您正在设置的VPN 连接(VPN connection)的类型( PPTP、L2TP和IPSec)。
- 服务器(Server)-您将连接到的VPN 服务器的地址。(VPN server)这可以是像 vpn.digitalcitizen.life 这样的URL ,也可以是像40.84.48.70(vpn.digitalcitizen.life)这样的数字IP 地址(IP address)。
- PPP 加密 (MPPE)(PPP encryption (MPPE)) - 指定您要连接的VPN 服务器是否要求对连接进行加密。(VPN server)默认情况下应勾选此选项。
Android 8 Oreo 和 Android(Oreo and Android) 9 Pie之间的一个区别是Android 8要求您输入VPN的(VPN)用户名和密码(username and password),而 Android 9 则不需要。
如果您选中“显示高级选项”,("Show advanced options,")您可以配置VPN 连接(VPN connection)的其他详细信息:“DNS 搜索域”、("DNS search domains,") “DNS 服务器”("DNS servers,")和“转发路由”。("Forwarding routes.")如果您创建的VPN 连接请求您输入这些详细信息,请立即执行此操作。(VPN connection)但是,这些通常不是必需的。输入完VPN 连接(VPN connection)的所有详细信息后,点击保存(Save)。VPN 连接(VPN connection)现已创建并可随时使用。
注意:如果您想在(NOTE:)Windows 10电脑上设置类似的VPN 连接(VPN connection),请阅读:如何在 Windows 10 中创建、配置、使用和删除VPN(Windows 10)连接(VPN connection)。
如何在 Android 中连接到 VPN
配置VPN 连接(VPN connection)后,在VPN 列表(VPN list)中点击其名称。
在Android 9 Pie中,您需要输入您的VPN 帐户的(VPN account)用户名和密码(username and password)。如果您愿意,您可以保存此信息,而不是在下次连接到同一个VPN时再次输入。点击连接(Connect)并等待几分钟以建立VPN 连接(VPN connection)。在Android 8 Oreo中,此步骤已经完成了用户名和密码(username and password),因此您只需点击Connect即可。
在您的Android 设备(Android device)连接到VPN 服务器后,您会在(VPN server)VPN 连接(VPN connection)名称下方看到“已连接(Connected)”标签,并在屏幕顶部的状态栏中(status bar)看到一个钥匙符号。
连接VPN后,您使用(VPN)Android 设备(Android device)在互联网上接收或发送的每一点信息都会通过您连接的VPN 服务器(VPN server)进行中继。也就是说,当然,直到您决定断开与VPN 服务器(VPN server)的连接。
如何在Android中断开与(Android)VPN 服务器的连接(VPN server)
要断开与VPN 服务器(VPN server)的连接,请返回VPN屏幕并点击正在运行的VPN 连接(VPN connection)。您会看到一些有关VPN 连接(VPN connection)持续时间(Duration)的信息,以及有关使用VPN 连接(VPN connection)发送(Sent)和接收(Received)的数据的详细信息。在此信息下方,您会看到一个名为Disconnect的按钮。点击它,VPN 连接(VPN connection)会立即关闭。
如何从Android中删除(Android)VPN 服务器(VPN server)
如果您想从Android 设备中删除(Android device)VPN以使其不再使用,请从Settings返回(Settings)VPN屏幕。首先(First),确保您与VPN断开连接。然后,在Android 8 Oreo中,点击VPN 连接(VPN connection)的名称。在您看到有关VPN 配置文件(VPN profile)的详细信息的提示中,点击忘记(Forget)按钮。
在Android 9 Pie中,按住VPN 连接(VPN connection)的名称,然后在打开的上下文菜单中点击删除网络(Delete network)。
VPN现已从Android中移除,无法再使用。
为什么在Android 智能手机上使用(Android smartphone)VPN?
(Creating)在Android智能手机或平板电脑上(Android)创建、配置和使用VPN连接并不困难。只要您按照我们分享的说明进行操作,每个人都可以做到。在结束本教程之前,请告诉我们您为什么以及如何在您的Android 设备(Android device)上使用VPN。是连接到您的企业网络(business network)、家庭网络(home network)还是专门的VPN 提供商(VPN provider)?另外,你用VPN做什么?在下面发表评论(Comment),让我们讨论。
How do I setup and use a VPN on my Android smartphone?
Virtual Private Networks (VPNs) are useful to encrypt your traffic, whеn you cоnnect to public Wi-Fi, or to access your company's network while traveling. Odds are that, besides yоur Windows devices, you want to use a VPN on your Android smartphone or tablet. Here is how to set up a VPN on your Andrоid device, connect and disconnect from the VPN, and remove thе VPN connection from Android:
NOTE: This guide covers smartphones with Android 8 Oreo and Android 9 Pie. In our screenshots, Android 8 Oreo is always on the left, while Android 9 Pie is on the right. If you do not know what version of Android you are using, read How to check the Android version on your smartphone or tablet?
What you need to connect to a VPN
To use a Virtual Private Network (VPN) on your Android smartphone or tablet, you have to know a few details before making the connection:
- Android works natively with the following types of VPN protocols: PPTP, L2TP, and IPSec. If you need to use OpenVPN, then you should install OpenVPN for Android, and use that instead of the steps shared in this guide.
- The IP address or the domain URL of the VPN server to which you want to connect.
- The VPN authentication credentials, usually in the form of a username and password.
- Other configuration options related to the VPN connection you are about to set up. These include things like the VPN server type, encryption type, or specific DNS servers that the VPN connection must use.
Once you have all the information needed by the VPN connection that you're going to set up, go ahead, and follow the steps from the next section.
How to set up a VPN connection in Android
To create a VPN connection on your Android smartphone or tablet, start by opening the Settings. In Android 8 Oreo, tap Network & Internet, while in Android 9 Pie, tap Wireless & networks.
You see several settings related to networks. In both Android versions, tap VPN.
This opens a screen where you see all the VPN connections that are configured on your Android smartphone or tablet. Unless you or one of the apps used on your Android device created VPN connections in the past, this screen should be empty. To create a new VPN connection, tap the + (plus) button from the top right corner of the screen (in Android 8 Oreo) or tap "Add VPN Network" (in Android 9 Pie).
Android opens a dialog where you must enter all the details of the VPN connection that you want to create. The basic configuration options are:
- Name - enter a name that helps you identify this VPN connection.
- Type - the type of VPN connection that you are setting up (PPTP, L2TP, and IPSec).
- Server - the address of the VPN server which you'll connect to. This can be either a URL like vpn.digitalcitizen.life or a numerical IP address like 40.84.48.70.
- PPP encryption (MPPE) - specifies whether the VPN server to which you want to connect requires that the connection be encrypted. This option should be ticked by default.
One difference between Android 8 Oreo and Android 9 Pie is that Android 8 asks you to enter the username and password of the VPN, while Android 9 does not.
If you check "Show advanced options," you can configure other details for the VPN connection: the "DNS search domains," "DNS servers," and "Forwarding routes." If the VPN connection that you're creating requests that you enter these details, do so now. However, these are usually not required. When you are done entering all the details of the VPN connection, tap Save. The VPN connection is now created and can be used at any time.
NOTE: If you want to set up a similar VPN connection on your Windows 10 PCs, read: How to create, configure, use, and delete a VPN connection in Windows 10.
How to connect to a VPN in Android
After the VPN connection is configured, tap on its name in the VPN list.
In Android 9 Pie, you are asked to enter the username and password of your VPN account. If you want to, you can save this information instead ofentering it again the next time you connect to the same VPN. Tap Connect and wait for a few moments for the VPN connection to be established. In Android 8 Oreo, this step has the username and password already completed, so you just need to tap Connect.
After your Android device has connected to the VPN server, you see the label Connected written beneath the VPN connection name and a key symbol in the status bar on the top side of the screen.
While the VPN is connected, every bit of information you receive or send on the internet using your Android device is relayed via the VPN server you're connected to. That is, of course, until you decide to disconnect from the VPN server.
How to disconnect from the VPN server in Android
To disconnect from the VPN server, go back to the VPN screen and tap the running VPN connection. You see some information about the Duration of the VPN connection, as well as details about the data that was Sent and Received using the VPN connection. Below this information, you see a button called Disconnect. Tap on it, and the VPN connection closes immediately.
How to remove a VPN server from Android
If you want to delete a VPN from your Android device so that it is never used again, go back to the VPN screen from Settings. First, make sure that you are disconnected from the VPN. Then, in Android 8 Oreo, tap the name of the VPN connection. In the prompt where you see details about the VPN profile, tap the Forget button.
In Android 9 Pie, press and hold the name of the VPN connection, and, in the contextual menu that opens, tap Delete network.
The VPN is now removed from Android, and it can no longer be used.
Why do you use a VPN on your Android smartphone?
Creating, configuring, and using VPN connections on Android smartphones or tablets is not that difficult. Everyone can do it as long as you follow the instructions we shared. Before closing this tutorial, tell us why and how you use a VPN on your Android device. Is it to connect to your business network, your home network, or a specialized VPN provider? Also, what do you use the VPN for? Comment below and let's discuss.