Android使用说明

Android推荐使用以下协议:
Android 11-: IPSec
Android 11+: IKEv2 native client

IPSec / LT2P / PPTP (简单)

Android用户进入设置/VPN, 新建VPN配置, 选择'IPSec Xauth PSK' or 'L2TP/IPSec PSK' or 'PPTP'并填写下面信息。

VPN类型: 'IPSec Xauth PSK' (Recommended) or 'L2TP/IPSec PSK' or 'PPTP'
描述: 随意
服务器: sanpingshui.com
帐号: [Your account or guest account]
密码: [Your password or guest password]
密钥: petersvpn
其它: 默认设置



IPSec:


L2TP:


PPTP:



IKEv2 native client (Android 11+)

Alternatively, Android 11+ users can also connect using the native IKEv2 client.

  1. Securely transfer the given .p12 file to your Android device. e.g. Sample profile
  2. Launch the Settings application.
  3. Go to Security and privacy -> Other security settings -> credentials storage, or Security -> Advanced -> Encryption & credentials
  4. Tap Install from device storage, or Install a certificate.
  5. Tap VPN & app user certificate.
  6. Choose the .p12 file you transferred from the VPN server.
    Note: To find the .p12 file, tap the three-line menu button, then browse to the location you saved the file.
  7. Enter a name for the certificate, then tap OK.
  8. Go to Settings -> Network & internet -> VPN, then tap the "+" button.
  9. Enter a name for the VPN profile.
  10. Select IKEv2/IPSec RSA from the Type drop-down menu.
  11. Enter Your VPN Server IP (or DNS name) in the Server address field.
    Note: This must exactly match the server address in the output of the IKEv2 helper script.
  12. Enter anything (e.g. empty) in the IPSec identifier field.
    Note: This field should not be required. It is a bug in Android.
  13. Select the certificate you imported from the IPSec user certificate drop-down menu.
  14. Select the certificate you imported from the IPSec CA certificate drop-down menu.
  15. Select (receive from server) from the IPSec server certificate drop-down menu.
  16. Tap Save. Then tap the new VPN connection and tap Connect.

IKEv2 app (Any android version)
快,但我的小米8手机连上不能访问网络,三星S22可以。

- Install 'strongSwan VPN Client' from Google Play
or download and install the client apk from this website or Official strongSwan download server (the latest version).
- Download the IKEv2 .sswan profile to your phone, e.g. Sample profile.
- Launch the strongSwan VPN client.
- Tap the "more options" menu on top right, then tap Import VPN profile.
- Choose your .sswan profile file, e.g. the profile file above.
- Note: To find the .sswan file, tap the three-line menu button, then browse to the location you saved the file.
- On the "Import VPN profile" screen, tap IMPORT CERTIFICATE FROM VPN PROFILE, and follow the prompts.
- On the "Choose certificate" screen, select the new client certificate, then tap Select.
- Tap IMPORT.
- Tap the new VPN profile to connect.