Skip to content

[Bug]: Bug: Bug: Outbound connection test fails when eth0 has no internet and default route is via tun0 #5152

@iran100

Description

@iran100

Describe the bug

In version 2.9.3, the Outbound connection test worked perfectly and showed the correct latency. However, since upgrading to v3.3.0, the test (for all outbounds like Armenia, SamanTel Socks) always returns "Failed", even though all tunnels and outbound connections are fully functional for clients. This issue only happens because the server architecture routes all internet traffic via a VPN interface (tun0), leaving the primary eth0 interface with no direct internet access.

How to reproduce the problem

  1. Set up a VPS where the primary interface (eth0) has no internet connection.
  2. Connect the VPS to an OpenVPN client, making tun0 the default route for all traffic.
  3. Configure normal inbounds and several healthy outbounds (e.g., Vless, Socks).
  4. Go to the panel, click "Test All" (TCP or HTTP).
  5. Observe that all outbounds result in "Failed" while clients connecting through those same inbounds/outbounds have internet access.

Expected behavior

I expected the panel's test mechanism to follow the system's default routing table (respecting tun0) and show the correct latency (ms), rather than strict-binding or forcing test packets via the internet-less eth0 interface.

Actual behavior

The panel incorrectly shows "Failed" for all healthy outbound connections because it cannot successfully send test packets via the primary, but internet-less, eth0 interface.

Relevant logs

Screenshots

No response

3x-ui version

3.3.0

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 26.04

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions