CzBiX / WSLHostPatcher

Dynamic patch WSL2 to listen port on any interface.
MIT License
724 stars 49 forks source link

wslhostpatcher stopped working #17

Open mf-guse opened 1 year ago

mf-guse commented 1 year ago

I've been using wslhostpatcher successfully for a while to get access to my locally running Rancher-Desktop from an Domain from outside (only for development purposes).

Setup:

My workflow was:

Since the last WSL2 update it stopped working, the applications running in Rancher Desktop are no more available from outside.

Unfortunately it is very uncomfortable without wslhostpatcher to make applications available which are running in the WSL2.

Is there any help? Any new version of wslhostpatcher?

mapokapo commented 3 weeks ago

I've also tried recently running WSLHostPatcher but it just simply wouldn't work.

  1. When the unzipped WSLHostPatcher folder is in a Windows path (eg. "/mnt/c/WSLHostPatcher"), then I get the error:
    /mnt/c/WSLHostPatcher/WSLHostPatcher.exe: Invalid argument
  2. When the WSLHostPatcher folder is in a WSL path (eg. "/home/user/WSLHostPatcher/WSLHostPatcher.exe"), it hangs for around 1 minute before outputting the same error. I've made sure the file is chmod +x'd, and that the WSL user is the owner of the file.

I've also tried running it as sudo from WSL, which outputs the same error. I've also tried running it as an admin from the command prompt in the Windows folder, which simply outputs "Access is denied." (for both admins and users).

CzBiX commented 2 weeks ago

@mapokapo This seems to be a different issue.

First, check if the file's permissions are set correctly in Windows, and then check if the file is corrupted. Also, check if any antivirus software are blocking the file.