Skip to content

[Android] VPN connection fails or hangs after TLS/auth on multiple servers #42

@orgorin023

Description

@orgorin023

Platform

  • Device: OPPO Reno3 元气版 5G (PCLM50)
  • OS: Android 12
  • APN version/build: v1.0.617
  • Network: Wi-Fi
  • Package: tech.apn

Summary

On Android, APN fails to establish a VPN tunnel on multiple server attempts. The app reaches TCP/TLS and sometimes sends the authentication packet, but then either times out waiting for the welcome response or remains stuck without creating an Android VPN network/interface.

This looks like a core connection failure rather than a cosmetic issue: after the failure, Android connectivity state still shows only the Wi-Fi network and no active VPN/tun interface.

Steps to reproduce

  1. Open APN on Android.
  2. Select a server/country.
  3. Tap Connect.
  4. Wait 10-25 seconds.
  5. Observe the APN status/log area and Android connectivity state.

Observed results

SG server attempt

  • Server shown: 5.223.49.69 / Singapore.
  • After tapping Connect, APN connected TCP/TLS, sent auth, then returned to the disconnected state.
  • The app log showed:
    • Welcome timeout after 10.01秒
    • 服务器未返回欢迎信息
    • tunnel connecting -> disconnected

US server attempt

  • Server shown: 153.75.91.91 / United States.
  • After tapping Connect, the app returned to disconnected state.
  • The app log showed:
    • Connection timed out
    • Wire 出错:Connection timed out
    • disconnected with 0s/0 packets

AU server attempt

  • Server shown: 144.172.65.238 / Australia.
  • One attempt reached TLS and sent auth, then failed after about 10 seconds.
  • The app log showed:
    • Welcome timeout after 10.02秒
    • 服务器未返回欢迎信息
    • disconnected after about 10 seconds / 2 packets
  • A later attempt stayed without a completed tunnel for more than 20 seconds after auth-related log lines.

Expected behavior

APN should either:

  • establish the VPN tunnel and create an Android VPN/tun interface, or
  • fail quickly with a clear actionable error and automatically try another usable server.

Actual behavior

The connection fails or hangs after TCP/TLS/auth progress. Android does not show an active VPN network/tun interface after the failed/hung attempts.

Evidence from local ADB checks after a hung/failed attempt:

  • dumpsys connectivity showed only Wi-Fi as the current connected network, with NOT_VPN capabilities.
  • ip addr show did not show an active tun/VPN interface or APN-assigned 10.8.x.x address.

Reproducibility

Reproduced during several attempts on the same device/session:

  • SG: failed with welcome timeout.
  • US: failed with connection timeout.
  • AU: failed with welcome timeout once, and later hung without creating a VPN network.

Duplicate checks

Before filing, I searched this tracker for:

  • welcome timeout
  • 服务器未返回欢迎信息
  • 144.172.65.238
  • Android connection timeout

No matching existing issue was found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions