InvisibleManVPN / InvisibleMan-XRayClient

A client for xray core
MIT License
421 stars 52 forks source link

The connection in the TUN mode works only once #126

Closed Bushroott closed 1 month ago

Bushroott commented 2 months ago

After launching the program, when you click the "start" button, administrator rights are requested, and a virtual network adapter is created in the system. After that, the connection is established, and everything works fine. When you press the "stop" button, the virtual network adapter is removed from the system, and when you press the "start" button again, it no longer appears. At the same time, the program reports that the connection has been established, but in fact it is not there. To reconnect, you need to exit the program and run it again.

OS Windows 7 x64 InvisibleMan-XRay v2.3.2 x32

pps83 commented 2 months ago

@InvisibleManVPN seems like the last build is broken. I have the same issue where it's not working at all. Do you have a vpn client without all that gui eye candy mess?

pps83 commented 2 months ago

it's ridiculous that you can't even copy version info. image

InvisibleManVPN commented 2 months ago

Hey @Bushroott! Did you check both x64 and x86 versions? In both versions, you have this issue?

InvisibleManVPN commented 2 months ago

@Bushroott If you can please download the previous version of Invisible Man TUN v0.3.3 and extract it in the InvisibleManXRay-x86\TUN path and check whether the program is working properly.

Bushroott commented 2 months ago

@Bushroott If you can please download the previous version of Invisible Man TUN v0.3.3 and extract it in the InvisibleManXRay-x86\TUN path and check whether the program is working properly.

Unfortunately, the behavior of the program doesn`t change with the old driver either.

Bushroott commented 2 months ago

Hey @Bushroott! Did you check both x64 and x86 versions? In both versions, you have this issue?

Both versions are affected.

TemityStolyarov commented 1 month ago

up it's a little annoying to restart the app every time in order to reconnect to my VPN. is there a bugfix planned in the near future? bc its still not working properly at 2.3.2 / 1.8.23

InvisibleManVPN commented 1 month ago

Hey @TemityStolyarov, I'm working on it and for this reason, I postponed the new release to find a solution for that. Can I ask you to provide me a video about what you do in this process? Currently, this issue happens for some users and some others have no issue with that.

i0FFLINE commented 1 month ago

confirm issue

InvisibleManVPN commented 1 month ago

Hello @Bushroott @pps83 @TemityStolyarov @i0FFLINE I couldn't regenerate the problem. As I know, this bug happens to some users. Can you try regenerating the bug and sending me the result? If you can, please download one of these zip files (based on the architecture of your OS):

In these files, I developed a logger system to log the process and record it into a log.txt file. So, we can track the things happens in this process. After downloading, just go to the {the path of the app}/TUN and extract it there. Then, start the Invisible Man XRay and try to regenerate the problem. After that, just send me the log.txt file here.

P.S: It would be great if you could record a video of the process you do. It may help us to know more about the problem.

InvisibleManVPN commented 1 month ago

Hello @TemityStolyarov You should copy the exe file inside the zip in the {Invisible Man XRay path}/TUN path and then open the Invisible Man XRay.exe app and try to click on the RUN button in TUN mode. You shouldn't open the InvisibleMan-TUN.exe directly. Also, make sure don't remove other files (like tun.dll, tun2socks.exe, etc) in the TUN folder.

TemityStolyarov commented 1 month ago

You shouldn't open the InvisibleMan-TUN.exe directly

yep, my bad

here is the contents

  • 19-Oct-24 3:15:52 PM: Start tunneling process.
  • 19-Oct-24 3:15:52 PM: Trying to cleanup profiles.
  • 19-Oct-24 3:15:52 PM: Cleanup profiles successfully done.
  • 19-Oct-24 3:15:52 PM: Trying to run tunnel.
  • 19-Oct-24 3:15:52 PM: Wait until interface created.
  • 19-Oct-24 3:15:52 PM: Set interface address.
  • 19-Oct-24 3:15:52 PM: Wait until interface address set.
  • 19-Oct-24 3:15:53 PM: Set interface DNS.
  • 19-Oct-24 3:15:53 PM: Set routes.
  • 19-Oct-24 3:16:02 PM: Stop tunneling process.
  • 19-Oct-24 3:16:09 PM: Start tunneling process.
  • 19-Oct-24 3:16:09 PM: Wait until interface created.
  • 19-Oct-24 3:16:16 PM: Scheduler failed. Reason: Device with the name 'InvisibleMan-XRay' was not found.
  • 19-Oct-24 3:16:16 PM: Start tunneling process failed. Reason: Device with the name 'InvisibleMan-XRay' was not found.
  • 19-Oct-24 3:16:32 PM: Stop tunneling process.
  • 19-Oct-24 3:16:34 PM: Stop tunneling process.
  • 19-Oct-24 3:16:34 PM: Stop tunneling process.

video link

the time may be different, but my actions are similar

InvisibleManVPN commented 1 month ago

@TemityStolyarov Many thanks for your answer. Seems for some users, TUN can't detect that the tunneling process is finished (for the second time and so on). Can I ask you to open the Command Prompt and type this:

TASKLIST /FI "PID eq 12345"

I'm using the above command to ensure the tunneling process is finished and maybe the problem is here. Type it in your cmd and send me the result.

image

i0FFLINE commented 1 month ago

I suspect the cause is the Hyper-V installed on the machine. It has its own fancy ethernet interface(s). If You have Windows 11 Pro - try to install and setup the second Virtual Switch with external connection type. May be help.

TemityStolyarov commented 1 month ago

image

same result for me: before the first connection, during use and after first disconnect image

@i0FFLINE mentioned a good idea for research - I do have virtualization enabled. Can you check it out, please?

pps83 commented 1 month ago

I suspect the cause is the Hyper-V installed on the machine. It has its own fancy ethernet interface(s). If You have Windows 11 Pro - try to install and setup the second Virtual Switch with external connection type. May be help.

Looks like that's the reason. I had the issue with win10 and win11 and on both of them I have hyper-v enabled, and softether vpn installed as well.

InvisibleManVPN commented 1 month ago

Hey @TemityStolyarov, thank you for the screenshot. I think I found the problem. It's not related to hyper-v directly. I changed my approach in the TUN service to find out if it's a process running or not. Can everyone download one of these files (based on the architecture of the app you use), extract it into the {Invisible Man XRay path}/TUN and test the Invisible Man XRay.exe app again?

TemityStolyarov commented 1 month ago
it worked - 22-Oct-24 10:55:43 AM: Start tunneling process. - 22-Oct-24 10:55:43 AM: Trying to cleanup profiles. - 22-Oct-24 10:55:43 AM: Cleanup profiles successfully done. - 22-Oct-24 10:55:43 AM: Trying to run tunnel. - 22-Oct-24 10:55:43 AM: Wait until interface created. - 22-Oct-24 10:55:44 AM: Set interface address. - 22-Oct-24 10:55:44 AM: Wait until interface address set. - 22-Oct-24 10:55:44 AM: Set interface DNS. - 22-Oct-24 10:55:45 AM: Set routes. - 22-Oct-24 10:55:55 AM: Stop tunneling process. - 22-Oct-24 10:55:57 AM: Start tunneling process. - 22-Oct-24 10:55:57 AM: Trying to cleanup profiles. - 22-Oct-24 10:55:57 AM: Cleanup profiles successfully done. - 22-Oct-24 10:55:57 AM: Trying to run tunnel. - 22-Oct-24 10:55:57 AM: Wait until interface created. - 22-Oct-24 10:55:57 AM: Set interface address. - 22-Oct-24 10:55:57 AM: Wait until interface address set. - 22-Oct-24 10:55:58 AM: Set interface DNS. - 22-Oct-24 10:55:58 AM: Set routes. - 22-Oct-24 10:56:09 AM: Stop tunneling process.

thank you! @InvisibleManVPN

InvisibleManVPN commented 1 month ago

@TemityStolyarov Thank you too for testing and giving me feedback to find the problem. @Bushroott @pps83 @i0FFLINE Guys please confirm that the issue is fixed for you as well. This problem isn't related to the app but to the TUN service. Anyway, in the next release, I will push this fix.

i0FFLINE commented 1 month ago

works fine

i0FFLINE commented 1 month ago

@InvisibleManVPN

but there's a nuance. After connecting to the server, there is no traffic for a very long time. up to 1 minute no website responds or loads as at speeds of 10 kilobits/sec.

UPD: almost all resources either don't open or like built-in censorship ))))

InvisibleManVPN commented 1 month ago

but there's a nuance. After connecting to the server, there is no traffic for a very long time. up to 1 minute no website responds or loads as at speeds of 10 kilobits/sec.

@i0FFLINE Sounds strange. Anyway, I don't think this problem is related to this issue. Didn't have this problem previously? Can you test more?

i0FFLINE commented 1 month ago

but there's a nuance. After connecting to the server, there is no traffic for a very long time. up to 1 minute no website responds or loads as at speeds of 10 kilobits/sec.

@i0FFLINE Sounds strange. Anyway, I don't think this problem is related to this issue. Didn't have this problem previously? Can you test more?

my fault, its my provider laggy (i think router's uplink rebooted) all works fine

TemityStolyarov commented 1 month ago

my friend reported a bug: he presses the 'Run' button and there is no connection. it just spins a little bit and immediately turns off. is this some other already known issue?

InvisibleManVPN commented 1 month ago

my friend reported a bug: he presses the 'Run' button and there is no connection. it just spins a little bit and immediately turns off. is this some other already known issue?

@TemityStolyarov In the TUN mode or Proxy mode? To better track, please submit a new issue.

InvisibleManVPN commented 1 month ago

This issue resolved by did a fix on Invisible Man TUN service (see this) In the next release of Invisible Man XRay, I will update the TUN service and this problem will be solved. Until that time, you can also update the TUN service with the latest version that has already been published (InvisibleMan-TUN v0.3.5)