Skip to content

VLESS > WG proxy chain stops working after switching WiFi #5303

@Exclude0122

Description

@Exclude0122

Integrity requirements

  • I have read all the comments in the issue template and ensured that this issue meet the requirements.
  • I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • I provided the complete config and logs, rather than just providing the truncated parts based on my own judgment.
  • I searched issues and did not find any similar issues.
  • The problem can be successfully reproduced in the latest Release

Description

Wireguard does not try to reconnect after switch from WiFi to cellular, when using Wireguard -> VLESS proxy chain.

Reproduction Method

For some reason, this bug can only be reproduced on android phones. I did not find any method to reproduce this bug on desktop.

  1. Download https://github.com/lhear/SimpleXray
  2. Import client config
  3. Connect phone to WiFi
  4. Start xray server on another device that is connected to the same WiFi, with the provided server config
  5. Start SimpleXray. Make sure Wireguard->VLESS chain works
  6. Disconnect and reconnect to WiFi
  7. Wireguard->VLESS chain stops working

Client config

Details

{
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 10808,
      "protocol": "socks",
      "settings": {
        "auth": "noauth",
        "udp": true
      },
      "tag": "socks"
    }
  ],
  "log": {
    "access": "",
    "loglevel": "debug"
  },
  "outbounds": [
    {
      "protocol": "wireguard",
      "settings": {
        "address": [
          "10.2.0.2/32"
        ],
        "kernelMode": false,
        "peers": [
          {
            "allowedIPs": [
              "0.0.0.0/0",
              "::/0"
            ],
            "endpoint": "PROTONVPN_WG:51820",
            "keepAlive": 60,
            "preSharedKey": "",
            "publicKey": ""
          }
        ],
        "secretKey": "",
        "workers": 2
      },
      "streamSettings": {
        "network": "tcp",
        "sockopt": {
          "dialerProxy": "VLESS"
        }
      }
    },
    {
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "ADDRESS OF THE SERVER",
            "port": 8008,
            "users": [
              {
                "encryption": "none",
                "id": "3d6d811e-0844-489e-9b04-ff1f20d29332",
                "level": 0
              }
            ]
          }
        ]
      },
      "tag": "VLESS"
    }
  ]
}

Server config

Details

{
  "inbounds": [
    {
      "protocol": "vless",
      "port": 8008,
      "settings": {
        "clients": [
            {
            "id": "3d6d811e-0844-489e-9b04-ff1f20d29332"
        }
        ],
        "decryption": "none"
      },
      "tag": "VLESS"
    }
  ],
  "log": {
    "loglevel": "warning"
  },
  "outbounds": [
    {
        "protocol": "freedom"
    }
  ]
}

Client log

Details

[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send handshake initiation: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe
[Error] peer(lZkX…6zgY) - Failed to send data packets: io: read/write on closed pipe

Server log

Details

2025/11/13 21:51:04.557245 [Warning] core: Xray 25.10.15 started
2025/11/13 21:51:53.209011 from tcp:192.168.2.95:46000 accepted udp:PROTONVPN_WG:51820
2025/11/13 22:01:34.667540 from tcp:192.168.2.66:41516 accepted udp:PROTONVPN_WG:51820

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