0
0
mirror of https://github.com/schwabe/ics-openvpn.git synced 2024-09-19 19:42:29 +02:00
openvpn-android/FAQ-zh-Hans.html
2019-04-08 12:00:22 +02:00

278 lines
21 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h2>
<a name="faq_howto_title"></a>
快速开始
<a href="#faq_howto_title" class="section_anchor"> </a>
</h2>
<p>获取你的 VPN 配置文件,可以是在电脑上正在使用的 OpenVPN 客户端配置文件,也可以向你的 VPN 服务商索取配置文件。</p><p>如果配置文件只有一个,可以把配置文件发到你自己的邮箱然后从手机上下载。如果配置文件有很多个,可以将它们复制到存储卡内。</p><p>从邮件中下载附件,或者在 VPN 列表中点击文件夹图标来导入配置文件。</p><p>如果提示找不到文件,那就将缺失的文件复制到存储卡内。</p><p>点击保存,将配置文件保存到你的 VPN 列表中。</p><p>在 VPN 列表中点击 VPN 的连接的名字,就可以连接到 VPN 了。</p><p>如果发生错误,可以看日志窗口中的日志,然后设法解决问题。</p>
<h2>
<a name="faq_killswitch_title"></a>
Block non VPN connection ("Killswitch")
<a href="#faq_killswitch_title" class="section_anchor"> </a>
</h2>
It is often desired to block connections without VPN. Other apps often use markting terms like "Killswitch" or "Seamless tunnel" for this feature. OpenVPN and this app offer persist-tun, a feature to implement this functionality.<p>The problem with all these methods offered by apps is that they can only provide best effort and are no complete solutions. On boot, app crashing and other corner cases the app cannot ensure that this block of non VPN connection works. Thus giving the user a false sense of security.<p>The <b>only</b> reliable way to ensure non VPN connections are blocked is to use Android 8.0 or later and use the "block connections without VPN" setting that can be found under Settings > Network & Internet > Advanced/VPN > OpenVPN for Android > Enable Always ON VPN, Enable Block Connections without VPN
<h2>
<a name="faq_remote_api_title"></a>
远程API
<a href="#faq_remote_api_title" class="section_anchor"> </a>
</h2>
OpenVPN for Android supports two remote APIs, a sophisticated API using AIDL (remoteEXample in the git repository) and a simple one using Intents. <p>Examples using adb shell and the intents. Replace profilname with your profile name<p><p> adb shell am start-activity -a android.intent.action.MAIN de.blinkt.openvpn/.api.DisconnectVPN<p> adb shell am start-activity -a android.intent.action.MAIN -e de.blinkt.openvpn.api.profileName Blinkt de.blinkt.openvpn/.api.ConnectVPN
<h2>
<a name="weakmd_title"></a>
证书签名中的弱 (MD5) 哈希 (SSL_CTX_use_certificate md 太弱)
<a href="#weakmd_title" class="section_anchor"> </a>
</h2>
<p>Starting with OpenSSL version 1.1, OpenSSL rejects weak signatures in certificates like
MD5.</p><p><b>MD5 signatures are completely insecure and should not be used anymore.</b> MD5
collisions can be created in <a
href="https://natmchugh.blogspot.de/2015/02/create-your-own-md5-collisions.html">few hours at a minimal cost.</a>.
You should update the VPN certificates as soon as possible.</p><p>Unfortunately, older easy-rsa
distributions included the config option "default_md md5". If you are using an old easy-rsa version, update to
the <a href="https://github.com/OpenVPN/easy-rsa/releases">latest version</a>) or change md5 to sha256 and
regenerate your certificates.</p><p>If you really want to use old and broken certificates use the custom
configuration option tls-cipher "DEFAULT:@SECLEVEL=0" under advanced configuration or as additional line in your
imported configuration</p>
<h2>
<a name="samsung_broken_title"></a>
三星手机
<a href="#samsung_broken_title" class="section_anchor"> </a>
</h2>
<small><i>5.0 (Lollipop) 及更高版本</i></small> <br/>
三星手机几乎是最热销的安卓机同时三星的固件也是bug最多的 Android 固件。Bug 并不局限于运行在这些设备上的VPN但其中许多可以是可以想办法绕开的。下面列出几个已知Bug<p><p>DNS 不工作除非其在VPN 地址池内.<p><p>很多三星5.X设备上 允许/禁止 应用程序的特性并不能工作。 <p>在三星 6.x 机器上只有VPN应用被加入省电模式白名单之后VPN才能工作。
<h2>
<a name="faq_duplicate_notification_title"></a>
重复的通知
<a href="#faq_duplicate_notification_title" class="section_anchor"> </a>
</h2>
当 Android 系统的内存RAM即将耗尽的时候不再需要的应用和服务将被关闭以腾出内存空间这项机制也会影响到 VPN 进程。为了保证 OpenVPN 及其连接不被关闭OpenVPN 服务会以较高的优先级运行而为了以较高的优先级运行OpenVPN 必须在状态栏显示一个图标。正如前面的问题中说过的,系统的“钥匙”图标是系统内建的,仅仅显示这个“钥匙”图标并不能让 OpenVPN 以更高的优先级运行。
<h2>
<a name="faq_androids_clients_title"></a>
不同OpenVPN安卓客户端的区别
<a href="#faq_androids_clients_title" class="section_anchor"> </a>
</h2>
OpenVPN 的 Android 客户端目前市面上已经有了一些了,其中最常见的有 OpenVPN for Android也就本应用、OpenVPN Connect 以及 OpenVPN Settings 。
这些客户端可以被分为两类使用官方VPNService API (Android 4.0+) 并且不需要 root 权限的 OpenVPN for Android 和 OpenVPN Connect 以及需要 root 权限的 OpenVPN Settings 。
<h2>
<a name="ab_lollipop_reinstall_title"></a>
正在重新安装VPN应用
<a href="#ab_lollipop_reinstall_title" class="section_anchor"> </a>
</h2>
<small><i>5.0 (Lollipop) - 5.1 (Lollipop MR1)</i></small> <br/>
在被卸载或重新安装时VPN程序会停止工作详细信息请参看 #80074
<h2>
<a name="vpn_tethering_title"></a>
VPN 和中继
<a href="#vpn_tethering_title" class="section_anchor"> </a>
</h2>
<small><i>5.0 (Lollipop) - 5.1 (Lollipop MR1)</i></small> <br/>
<small><i>4.3 (Jelly Bean MR2)及更早版本</i></small> <br/>
Android 网络分享和便携式热点功能(通过 WiFi, USB 或蓝牙)无法与本程序所使用的 VPN 服务接口一同工作。详情请见 <a href="http://code.google.com/p/ics-openvpn/issues/detail?id=34">issue #34</a>
<h2>
<a name="broken_images"></a>
图像已损坏
<a href="#broken_images" class="section_anchor"> </a>
</h2>
<small><i>5.0 (Lollipop) - 5.1 (Lollipop MR1)</i></small> <br/>
<small><i>4.3 (Jelly Bean MR2)及更早版本</i></small> <br/>
<small><i>4.3 (Jelly Bean MR2)及更早版本</i></small> <br/>
<p>HTC官方固件可能存在异常的路由问题并会导致数据流不通过隧道传输详见BUG追踪<a href="http://code.google.com/p/ics-openvpn/issues/detail?id=18">Issue 18</a>)。</p><p>据报导旧版的SONY Xperia Arc S和Xperia Ray的官方固件完全不包含VPNService详见BUG追踪<a href="http://code.google.com/p/ics-openvpn/issues/detail?id=29">Issue 29</a>)。</p><p>在自制固件中tun
模块可能会有缺失或是未被设置正确的权限。部分CM9固件需要启用“特定设备HACKS”项下的“修复/dev/tun的权限”的选项。</p><p>最重要的是:若您的设备的固件存在问题,请直接向您的设备供应商反馈。越多人向供应商反映问题,问题越有可能得到解决。</p>
<h2>
<a name="battery_consumption_title"></a>
电池消耗
<a href="#battery_consumption_title" class="section_anchor"> </a>
</h2>
在我的测试中,发现最能消耗电量的是 OpenVPN 的 keepalive 包。大多数 OpenVPN 服务器都在配置文件中使用了“keepalive 10 60”这样的选项这会导致 OpenVPN 服务器和客户端每隔 10 秒就相互向对方发送一个数据包。<p>虽然这些包很小,几乎不会消耗多少流量,但是频繁地发送这些包会导致手机的无线模块长时间处于活跃状态,并消耗大量的电能。(请参见(英文网页): <a href="http://developer.android.com/training/efficient-downloads/efficient-network-access.html#RadioStateMachine"><p> keepalive 选项无法在客户端进行修改,只能在服务器上进行修改。<p>令人郁闷的是,如果发送 keepalive 的频率小于 60 秒,某些 NAT 网关可能会关闭 UDP 连接(我测试得到的结果是 60 秒)。使用 TCP 模式虽然可以将 keepalive 的频率设成很大,但是会造成 TCP over TCP 问题。(请参见(英文网页):<a href="http://sites.inka.de/bigred/devel/tcp-tcp.html">TCP over TCP 问题指的是由于 TCP 协议的机制,在 TCP 协议上再次封装一个 TCP 协议时,如果上层 TCP 链路的速度比下层 TCP 协议的链路速度快,就会造成大量 TCP 重传,从而导致网络拥塞,对用户来说就是网络变成龟速 ——译者注)
<h2>
<a name="faq_system_dialogs_title"></a>
连接警告和通知声音
<a href="#faq_system_dialogs_title" class="section_anchor"> </a>
</h2>
<small><i>4.4 (Kit Kat)及更早版本</i></small> <br/>
VPN 连接警告会告诉你有程序正要拦截所有的网络流量,这是为了确保 VPN 服务的 API 不被恶意应用滥用。<p>VPN 连接通知(通知栏上的钥匙图标)是 Android 系统内建的,如果当前有 VPN 连接Android 系统就会自动显示这个通知图标。一些系统上还会在 VPN 连接建立的时候发出提示音。Android 这么做的原因是为了保护你不受恶意应用的欺骗。
<h2>
<a name="tap_mode"></a>
Tap模式
<a href="#tap_mode" class="section_anchor"> </a>
</h2>
Tap 模式在未 root 的机器上不可用。因此本程序无法提供 tap 模块支持
<h2>
<a name="ab_secondary_users_title"></a>
非Android平板的主用户
<a href="#ab_secondary_users_title" class="section_anchor"> </a>
</h2>
<small><i>4.3 (Jelly Bean MR2)</i></small> <br/>
对于次级用户而言VPN是不会起作用的。
<h2>
<a name="faq_vpndialog43_title"></a>
Vpn 确认对话框的 Android 4.3 及更高版本
<a href="#faq_vpndialog43_title" class="section_anchor"> </a>
</h2>
<small><i>4.3 (Jelly Bean MR2)</i></small> <br/>
<small><i>4.3 (Jelly Bean MR2) 及更高版本</i></small> <br/>
"自 Android 4.3 开始VPN 确认被防范"覆盖应用程序"。这将导致在不发生反应,触摸输入的对话框中。如果您有一个应用程序,使用覆盖它可能会导致这种行为。如果你发现违规应用程序联系的应用程序的作者。这个问题将影响到运行在 Android 4.3 及更高版本上的所有 VPN 应用程序。有关其他详细信息请参阅 < href ="http://code.google.com/p/ics-openvpn/issues/detail?id=185"> issue 185 < > "
<h2>
<a name="tls_cipher_alert_title"></a>
连接失败 SSL23_GET_SERVER_HELLOSSLv3警报 握手失败
<a href="#tls_cipher_alert_title" class="section_anchor"> </a>
</h2>
较新的OpenVPN for Android版本 (0.6.29/2015年3月) 为 (tls-cipher "DEFAULT:!EXP:!PSK:!SRP:!kRSA") 密码套件使用更安全的默认设置。不幸的是,省略了不太安全的加密套件和导出加密套件,尤其是完全正向保密密码套件 (差分哈夫曼编码) 的缺失会导致一些问题。这通常是由用心良苦但执行力很差的家伙试图通过设置服务器上的TLS套件或在一些嵌入式操作系统 (如软路由系统Mikro Tik) 上定制SSL以加强TLS安全性导致。<p> 要解决导致这个问题需要在服务器上把TLS-CIPHER配置为合理的默认值比如tls-cipher "DEFAULT:!EXP:!PSK:!SRP:!kRSA"。如果你搞不定系统管理员可以在客户端解决在Android客户端添加自定义选项 tls-cipher DEFAULT即可。
<h2>
<a name="faq_security_title"></a>
安全注意事项
<a href="#faq_security_title" class="section_anchor"> </a>
</h2>
"As OpenVPN is security sensitive a few notes about security are sensible. All data on the sdcard is incoherently insecure. Every app can read it (for example this program requires no special sd card rights). The data of this application can only be read by the application itself. By using the import option for cacert/cert/key in the file dialog the data is stored in the VPN profile. The VPN profiles are only accessible by this application. (Do not forget to delete the copies on the sd card afterwards). Even though accessible only by this application the data is still unencrypted. By rooting the telephone or other exploits it may be possible to retrieve the data. Saved passwords are stored in plain text as well. For pkcs12 files it is highly recommended that you import them into the android keystore."
<h2>
<a name="faq_shortcut"></a>
快捷方式启动
<a href="#faq_shortcut" class="section_anchor"> </a>
</h2>
你可以在桌面上放置一个启动 OpenVPN 的图标。如果你的桌面程序支持,你可以在桌面上放置 OpenVPN 的启动图标,或者是 OpenVPN 的桌面挂小部件。
<h2>
<a name="tap_mode"></a>
Tap模式
<a href="#tap_mode" class="section_anchor"> </a>
</h2>
还来? 您在开玩笑嘛? tap 连接模式是不支持的,不要再发邮件问这些问题了。
<h2>
<a name="vpn_tethering_title"></a>
VPN 和中继
<a href="#vpn_tethering_title" class="section_anchor"> </a>
</h2>
<small><i>4.4 (Kit Kat) 及更高版本</i></small> <br/>
在连接VPN时手机热点依然工作但连接不会通过VPN。
<h2>
<a name="ab_kitkat_mss_title"></a>
VPN 连接出现 MSS 值错误
<a href="#ab_kitkat_mss_title" class="section_anchor"> </a>
</h2>
<small><i>4.4 (Kit Kat) 及更高版本</i></small> <br/>
<small><i>4.4 (Kit Kat) - 4.4.1 (Kit Kat)</i></small> <br/>
早期的KitKat版本在TCP连接上设置了错误的MSS值 (#61948)。OpenVPN将自动启动mssfix选项来解决这个Bug。
<h2>
<a name="copying_log_entries"></a>
正在复制日志
<a href="#copying_log_entries" class="section_anchor"> </a>
</h2>
若要复制单条日志请在相应条目上轻按即可。若要复制/发送全部日志请使用发送日志功能。如果该功能在界面中没有显示,请使用设备原生的菜单按钮。
<h2>
<a name="ab_persist_tun_title"></a>
保持 tun 通道模式
<a href="#ab_persist_tun_title" class="section_anchor"> </a>
</h2>
<small><i>4.4 (Kit Kat) - 4.4.2 (Kit Kat)</i></small> <br/>
Opening a tun device while another tun device is active, which is used for persist-tun support, crashes the VPNServices on the device. A reboot is required to make VPN work again. OpenVPN for Android tries to avoid reopening the tun device and if really needed first closes the current TUN before opening the new TUN device to avoid to crash. This may lead to a short window where packets are sent over the non-VPN connection. Even with this workaround the VPNServices sometimes crashes and requires a reboot of the device.
<h2>
<a name="faq_routing_title"></a>
路由/接口配置
<a href="#faq_routing_title" class="section_anchor"> </a>
</h2>
<small><i>4.4 (Kit Kat) - 4.4.2 (Kit Kat)</i></small> <br/>
<small><i>4.4 (Kit Kat) 及更高版本</i></small> <br/>
的路由和接口配置不通过传统的ifconfig /路由的命令而将用VPNService API来完成。这导致了比在其它操作系统不同的路由配置。 \ n此VPN隧道的配置包括IP地址并应被指定到该接口的网络。特别是没有同行伙伴地址或网关地址是必要的或需要。特殊的路由到达VPN服务器不需要任何例如当使用重定向网关添加。导入配置时应用程序会因此忽略这些设置。该应用程序可确保与连接到服务器没有通过VPN隧道路由的VPNService API。\ n此VPNService API不允许指定的网络不应该通过VPN路由。作为一种变通方法的应用程序会检测网络不应该被路由到隧道如路由XXXX YYYY net_gateway并计算一组路由排除这种路线效仿其他平台的行为。日志窗口显示VPNService的在建立连接的配置\ nBehind的场景安卓4.4+确实使用策略路由。使用route / ifconfig命令不会显示已安装的路径。而使用IP规则iptables的-t轧-L
<h2>
<a name="ab_kitkat_reconnect_title"></a>
随机从移动网络断开连接
<a href="#ab_kitkat_reconnect_title" class="section_anchor"> </a>
</h2>
<small><i>4.4 (Kit Kat) - 4.4.2 (Kit Kat)</i></small> <br/>
<small><i>4.4 (Kit Kat) 及更高版本</i></small> <br/>
<small><i>4.4 (Kit Kat)</i></small> <br/>
有多个用户报告说在使用VPN应用时移动连接/移动数据连接经常会掉线。该行为似乎只影响一些移动运营商/设备组合目前为止尚未确定原因及bug解决方案。
<h2>
<a name="ab_vpn_reachability_44_title"></a>
远程网络不可达
<a href="#ab_vpn_reachability_44_title" class="section_anchor"> </a>
</h2>
<small><i>4.4 (Kit Kat) - 4.4.2 (Kit Kat)</i></small> <br/>
<small><i>4.4 (Kit Kat) 及更高版本</i></small> <br/>
<small><i>4.4 (Kit Kat)</i></small> <br/>
<small><i>4.4 (Kit Kat)</i></small> <br/>
只有目标可以通过VPN可以到达VPN没有达到。 IPv6的VPN不能在所有工作。
<h2>
<a name="ab_only_cidr_title"></a>
非CIDR路由
<a href="#ab_only_cidr_title" class="section_anchor"> </a>
</h2>
安卓只支持CIDR路由。由于非CIDR路由几乎不用OpenVPN for Android将使用/32路由并对非CIDR路由发出警告。
<h2>
<a name="ab_proxy_title"></a>
对于VPN的代理行为
<a href="#ab_proxy_title" class="section_anchor"> </a>
</h2>
在DNS服务没有设置的情况下安卓会继续使用手机wifi的代理设置。 安卓OpenVPN会在日志文件中留下警告信息。在VPN设置DNS服务时安卓不是代理安卓系统里没有为vpn连接设置代理的程序接口。
<h2>
<a name="ab_not_route_to_vpn_title"></a>
路由到已配置的 IP 地址
<a href="#ab_not_route_to_vpn_title" class="section_anchor"> </a>
</h2>
<small><i>5.0 (Lollipop) 及更高版本</i></small> <br/>
配置的客户端IP及其网络掩码中的IP不会代理到VPN。 OpenVPN通过显式地添加一个可应对客户端IP及其网络掩码的路由来解决这个错误
<h2>
<a name="tap_mode"></a>
Tap模式
<a href="#tap_mode" class="section_anchor"> </a>
</h2>
这已经是第三次有人问这个问题了。好吧,虽然确实可以在 TAP 设备上写一个 TAP 模拟器,给发送出去的数据包添加第二层网络头,并去掉收到的数据包中的第二层网络头,但是这个 TAP 模拟器可能还需要实现 ARP 甚至 DHCP 客户端功能。我目前不知道有谁在做这方面的工作。如果你想开展这方面的编码工作的话,请联系我。