MatsuriDayo / nekoray

Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
https://matsuridayo.github.io/
GNU General Public License v3.0
13.45k stars 1.26k forks source link

BUG: Tun Mode don't work (turn off automatically) #1390

Open eheydari opened 3 months ago

eheydari commented 3 months ago

Problem

System Proxy Mode work, but Tum Mode Don't

Either get this Error: "If there is no response for a long time, it is recommended to restart the software.", or it's Turn Off automatically;

and I have to Restart the Program.

I'm Using version 4.0-Beta3-2024-13-07, but it was also present in 3.26 Stable Version.

log

sing-box: 1.9.3-neko-1 NekoBox: nekoray-4.0-beta3-2024-07-13
2024/08/09 07:41:48 nekobox_core grpc server listening at ...
>>>>>>>> Starting profile [VLESS] .......
INFO[0000] router: updated default interface WiFi, index 21
INFO[0000] inbound/mixed[mixed-in]: tcp server started at ......
INFO[0000] sing-box started (0.00s)
>>>>>>>> Stopping profile [VLESS] ....
>>>>>>>> Starting profile [VLESS] ....
INFO[0000] router: updated default interface WiFi, index 21
INFO[0000] inbound/mixed[mixed-in]: tcp server started at ....
WARN[0010] inbound/tun[tun-in]: open tun interface take too much time to finish!
<<<<<<<< Failed to start profile [VLESS] ...

<replaced configs with dots (...)>

erius0 commented 1 month ago

One of my friends faced the exact same problem on Windows 10, took me some time to find a fix, I followed the instructions specified in the response from @cewei in this issue tailscale/tailscale#6461. Basically it's some sort of driver conflict and nekoray is unable to properly create a TUN device. The steps i did in order to fix the issue are:

  1. Open Powershell as administrator
  2. Export the list of the drivers currently present on the system
    dism /online /get-drivers /format:table > C:\drivers.txt
  3. Find a Wireguard wintun driver in the list and note its .inf filename
  4. Remove the driver, where oemNN.inf is the name of the Wireguard driver
    pnputil.exe /d oemNN.inf
  5. Restart your PC and try to enable TUN mode in nekoray

If this doesn't help, you may also try to delete drivers of other VPN clients (OpenVPN, ZeroTier etc.) or drivers of any other pieces of software that could mess with network adapters