deanmcniven / wsl2-vpn-support

This Powershell script will reconfigure the system routes to fix WSL2 networking when on a VPN
45 stars 23 forks source link

Pick specific interface IP since a distro can have multiple #8

Closed ascheel closed 1 year ago

ascheel commented 1 year ago

A WSL2 installation can have multiple interfaces and IP addresses. For example, if Docker is installed inside of WSL2 (instead of as Docker Desktop due to licensing restrictions), then a second IP is provided by the hostname -I command that this script relies on.

Instead, I am parsing out the IP address based on the output of ip -o addr. This DOES require the user to specify their interface ID if it's not eth0.

deanmcniven commented 1 year ago

Thanks for your PR.

I'm going to merge this into the "ascheel_change" branch as there are some additional changes i was required to make for this work on my setup.

Will then merge into master from there

deanmcniven commented 1 year ago

This change is now in master, thanks again @ascheel