sakai135 / wsl-vpnkit

Provides network connectivity to WSL 2 when blocked by VPN
MIT License
2.3k stars 168 forks source link

Choose random free SSH port for GVPROXY #266

Open al-kuznetsov opened 2 months ago

al-kuznetsov commented 2 months ago

If the default SSH port 2222 is inaccessible choose next available port.

See issue #230: when the default port 2222 is inaccessible the service fails to start.
Choosing a random accessible port often helps and improves launch of /app/wsl-vpnkit rig.

Fixes issue #230

al-kuznetsov commented 2 months ago

Hi everyone,
Take note if you want to use this fix:
If you keep this git repo inside WSL and want to build the distro wsl-vpnkit.tar.gz with ./build.sh <image_name>, you first want to change new line sequences from Windows-style CRLF to Unix-style LF. Otherwise I didn't manage to build.