MatsuriDayo / nekoray

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

[Windows] Can't activate VPN mode [Solved] #200

Closed maaaAMA closed 1 year ago

maaaAMA commented 1 year ago

Hi,

I'm a Windows user, not Linux, and I'm not able to activate VPN mode anymore after restarting the computer while Nekoray was still running. I'm also unable to use any other V2Ray core-based client as well, as they all give Kernel failure errors. I'm willing to provide more info if required. I appreciate any assistance or temporary fix.

Additional info: CMD launches after attempting to activate "VPN mode" and closes after a few moments; this is what it shows:

2022/12/06 03:52:56 underlyingDNS: {f627d343-a35b-46b2-8776-4d36311fe97f} 192.168.1.1 sing-box: 1.1 Neko: nekoray-2.7-2022-12-04

INFO[0000] router: updated default interface Ethernet 2, index 21

I've already tried:

Other tested clients based on V2Ray:

arm64v8a commented 1 year ago

To get the VPN logs:

  1. cmd.exe as Administrator
  2. cd path\to\nekoray
  3. nekobox_core run -c config\sing-box-vpn.json
maaaAMA commented 1 year ago

Hi,

Thanks for your attention to this matter; I appreciate it. Here is the result:

F:\VPN\nekoray>nekobox_core run -c config\sing-box-vpn.json 2022/12/06 18:23:11 underlyingDNS: {f627d343-a35b-46b2-8776-4d36311fe97f} 192.168.1.1 sing-box: 1.1 Neko: nekoray-2.7-2022-12-04

←[36mINFO←[0m[0000] router: updated default interface Ethernet 2, index 19 ←[31mFATAL←[0m[0015] start service: initialize inbound/tun[0]: configure tun interface: The device is not ready for use.

F:\VPN\nekoray>

Please, let me know if anything else is required.

maaaAMA commented 1 year ago

Hi,

I've found the root of this issue and reached an unusual solution that resolves the problem with the "VPN mode" on the "Nekoray."

  1. Remove all installed VPN programs or adaptors. (Thre's no need to delete Nekoray)
  2. Press the Windows key + R to open Run. Type down regedit and press enter. Go to Computer\HKEY_CLASSES_ROOT\Msi.Package\. Right-click on shell key and create a new key, then set the key name as runas. Change the runas string value to Install as &administrator. (Don't include the dot) After which, right-click on runas key and create a new key, then set the key name as command. Next, change the command string value to msiexe /i "%1". (Don't include the dot). Restart the Windows.
  3. Go to OpenVPN community downloads and download the latest version of OpenVPN and install the program. Test: In order to check whether everything is fine or not, try to connect to any available VPN server using OpenVPN. You can find lots of servers on VPN Gate. There are also instructions on how to connect to their servers using OpenVPN on their website here: Connect to VPN Gate by Using OpenVPN Protocol. If everything worked fine and you were able to connect to a VPN server, you are good to go. Disconnect and close OpenVPN.
  4. Open Nekoray and turn on the VPN mode.

Enjoy!

Msi.Package commands credits: https://www.youtube.com/watch?v=DcU92W3Vu6o&ab_channel=MKTECH

VahidJavanmard commented 1 year ago

Hi I Had Same Problem With These Log

←[36mINFO←[0m[0000] router: updated default interface Ethernet, index 22 ←[31mFATAL←[0m[0001] start service: initialize inbound/tun[0]: configure tun interface: set ipv4 dns: The RPC server is unavailable.

amirsolo commented 1 year ago

Hi I Had Same Problem With These Log

←[36mINFO←[0m[0000] router: updated default interface Ethernet, index 22 ←[31mFATAL←[0m[0001] start service: initialize inbound/tun[0]: configure tun interface: set ipv4 dns: The RPC server is unavailable.

@VahidJavanmard Have you fixed your issue? I'm running into a similar issue. When clicking on the VPN mode, the terminal opens but then exits immediately after showing the below message:

2023/02/03 00:36:35 underlyingDNS: {*******} ******
sing-box: 1.1.4 Neko: nekoray-2.13-2023-01-31

INFO[0000] router: updated default interface Wi-Fi, index 18

I really need to tunnel my entire system and the for now the only available option I have is this feature of NekoRay which has been giving me this error recently.

AleTTA3 commented 1 year ago

I have This problem

←[36mINFO←[0m[0000] router: updated default interface Ethernet, index 16 ←[31mFATAL←[0m[0001] start service: initialize inbound/tun[0]: configure tun interface: set ipv4 dns: The service has not been started.

alihassan78611092 commented 5 months ago

when i start my config it shows me this and my wifi get disconected

INFO[0004] [206243479 0ms] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:51012 INFO[0004] [206243479 0ms] inbound/tun[tun-in]: inbound packet connection to 172.19.0.2:53 INFO[0004] outbound/vless[proxy]: outbound connection to 8.8.8.8:443 INFO[0004] outbound/vless[proxy]: outbound connection to 8.8.8.8:443 ERROR[0005] dns: exchange failed for mtalk.google.com. IN A: Post "https://8.8.8.8/dns-query": EOF INFO[0005] [2572342939 0ms] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:54738 INFO[0005] [2572342939 0ms] inbound/tun[tun-in]: inbound packet connection to 172.19.0.2:53 INFO[0005] outbound/vless[proxy]: outbound connection to 8.8.8.8:443 INFO[0005] outbound/vless[proxy]: outbound connection to 8.8.8.8:443 ERROR[0005] dns: exchange failed for www.msftconnecttest.com. IN A: Post "https://8.8.8.8/dns-query": EOF