Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The `wsl-vpnkit` script can be used as a normal script in your existing distro.
sudo apt-get install iproute2 iptables iputils-ping dnsutils wget

# download wsl-vpnkit and unpack
VERSION=v0.4.x
VERSION=v0.4.1
wget https://github.com/sakai135/wsl-vpnkit/releases/download/$VERSION/wsl-vpnkit.tar.gz
tar --strip-components=1 -xf wsl-vpnkit.tar.gz \
app/wsl-vpnkit \
Expand Down Expand Up @@ -130,12 +130,14 @@ On older WSL versions where `/mnt/wsl/resolv.conf` is not available, `wsl-vpnkit
`wsl-vpnkit` requires that the WSL 2 distro be able to run Windows executables. This [`interop` setting](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings) is enabled by default in WSL 2 and in the `wsl-vpnkit` distro.

Security configurations on the Windows host may only permit running executables in certain directories. You can copy `wsl-gvproxy.exe` to an appropriate location and use the `GVPROXY_PATH` environment variable to specify the location.
`GVPROXY_PATH` must point to a /mnt folder for wsl-gvproxy.exe to work!

```sh
# enable [automount] in wsl.conf for wsl-vpnkit distro
# Please be sure the [automount] section exists
wsl.exe -d wsl-vpnkit --cd /app sed -i -- "s/enabled=false/enabled=true/" /etc/wsl.conf

# set GVPROXY_PATH when running wsl-vpnkit
# set GVPROXY_PATH when running wsl-vpnkit to a /mnt directory (it must reside on windows host filesystem)
wsl.exe -d wsl-vpnkit --cd /app GVPROXY_PATH=/mnt/c/path/wsl-gvproxy.exe wsl-vpnkit
```

Expand Down
9 changes: 6 additions & 3 deletions wsl-vpnkit.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ After=network.target

[Service]
# for wsl-vpnkit setup as a distro
ExecStart=/mnt/c/Windows/system32/wsl.exe -d wsl-vpnkit --cd /app wsl-vpnkit
# No longer supported in 0.4.1
# ExecStart=/mnt/c/Windows/system32/wsl.exe -d wsl-vpnkit --cd /app wsl-vpnkit

# for wsl-vpnkit setup as a standalone script
#ExecStart=/full/path/to/wsl-vpnkit
#Environment=VMEXEC_PATH=/full/path/to/wsl-vm GVPROXY_PATH=/full/path/to/wsl-gvproxy.exe
# GVPROXY_PATH must point to /mnt directory to work!!!
ExecStart=/home/hosermage/wsl-vpnkit/wsl-vpnkit
Environment=VMEXEC_PATH=/home/hosermage/wsl-vpnkit/wsl-vm GVPROXY_PATH=/mnt/c/bin/wsl-vpnkit/wsl-gvproxy.exe

Restart=always
RestartSec=5
KillMode=mixed

[Install]
Expand Down