Skip to content

Incorrect device IP detection when multiple network interfaces are active (WiFi + Ethernet) or when using Clash Verge VPN TUN mode #4050

Closed

Description

@zbl-jerry

How frequently does the bug occur?

Always

Description

The application fails to correctly identify the device's IP address in scenarios where multiple network interfaces are present or when VPN tunneling is active. The detected IP may incorrectly resolve to:
TUN virtual network adapter (when using Clash Verge VPN in TUN mode)
WiFi network interface
Ethernet network interface
Instead of the expected physical network interface IP.

Stacktrace & log output

Can you reproduce the bug?

Always

Reproduction Steps

Device pairing succeeds but synchronization fails because of wrong device ip

Version

v1.28 && v1.29

OS

macos 15.5

Activity

  1. guiyanakuang commented on Mar 15, 2026

    @guiyanakuang
    Member

    @zbl-jerry Thanks for reporting this issue!

    As a workaround, you can manually select the correct network interface in Settings → Network Settings. Simply uncheck the virtual/TUN interface and check the physical one (e.g., your WiFi or Ethernet adapter). This should resolve the pairing and synchronization issue immediately.

    That said, I do plan to improve the auto-selection logic in a future release — specifically by lowering the priority of known virtual interfaces (such as tun*, utun*, docker*, etc.) so that the application defaults to the correct physical adapter without requiring manual intervention.

    Image
  2. guiyanakuang commented on Jun 21, 2026

    @guiyanakuang
    Member

    Hi @zbl-jerry, good news — this has been fixed in the latest version (2.1.5).

    The IP/device-identity handling has been reworked since you reported this:

    • Identity is now decoupled from IP. Trust is bound to the device's appInstanceId (established via the ECDH key exchange), not to its network address. When the active address changes — e.g. switching between WiFi/Ethernet or a TUN adapter coming and going — the connection now re-resolves and reconnects automatically instead of getting stuck on a stale/virtual address.
    • Network change self-healing. CrossPaste now detects network interface changes and rebuilds discovery accordingly, so cases like Clash Verge TUN mode toggling no longer leave it pinned to the wrong interface.
    • You can still explicitly pick the correct physical interface under Settings → Network Settings if you want to exclude virtual/TUN adapters entirely.

    Please upgrade to 2.1.5 and let us know if the issue is fully resolved on your side. Thanks for the detailed report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions