sakai135 / wsl-vpnkit

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

wget fail #264

Open pavlexander opened 3 months ago

pavlexander commented 3 months ago

Fresh distro installation of vpntoolkit

wsl.exe -d wsl-vpnkit --cd /app wsl-vpnkit

output

+ VPNKIT_GATEWAY_IP=192.168.127.1
+ VPNKIT_HOST_IP=192.168.127.254
+ VPNKIT_LOCAL_IP=192.168.127.2
+ TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
+ VMEXEC_PATH=/app/wsl-vm
+ GVPROXY_PATH=/app/wsl-gvproxy.exe
+ TAP_NAME=wsltap
+ CHECK_HOST=example.com
+ CHECK_DNS=1.1.1.1
+ DEBUG=0
+ set +x
+ WSL2_TAP_NAME=eth0
+ WSL2_GATEWAY_IP=10.255.255.254
+ '[' 0 -eq 0 ]
+ set +x
starting vm and gvproxy...
INFO[0000] waiting for packets...
time="2024-07-17T17:41:21+03:00" level=info msg="waiting for clients..."
time="2024-07-17T17:41:21+03:00" level=info msg="new connection from remote to 53136"
started vm and gvproxy
check: ✔️ ping success to IPv4 WSL 2 gateway / Windows host (10.255.255.254)
check: ✔️ ping success to IPv4 Windows host (192.168.127.254)
check: ✔️ ping success to IPv4 gateway (192.168.127.1)
check: ✔️ nslookup success for example.com A using 192.168.127.1
check: ✔️ nslookup success for example.com A using 10.255.255.254
check: ❌ nslookup fail for example.com A using 1.1.1.1
check: ✔️ ping success to IPv4 external host domain (example.com)
check: ✔️ ping success to IPv4 external host IP (1.1.1.1)
check: ✔️ nslookup success for example.com AAAA using 192.168.127.1
check: ✔️ nslookup success for example.com AAAA using 10.255.255.254
check: ❌ nslookup fail for example.com AAAA using 1.1.1.1
ping: bad address 'example.com'
check: ➖ ping fail to IPv6 external host (example.com)
wget: server returned error: HTTP/1.0 501 Not Implemented
check: ❌ wget fail for http://example.com
W0717 17:41:36.447769   53136 gonet.go:457] ep.GetRemoteAddress() failed: endpoint not connected
wget: error getting response: Resource temporarily unavailable
check: ❌ wget fail for https://example.com

it mostly succeeds but the last 2 requests fail wget fail for http://example.com and one for https.. what is the reason for this? I can access the domain just fine on a host windows machine.

any way to investigate and fix it?

sirVir commented 2 months ago

Same issue with Windows 11 and Cisco AnyConnect

sirVir commented 2 months ago

As a note, I made it work when setup as systemd service following the README instruction. It doesn't seem to work in standalone mode though.