ArchWSL
ArchWSL copied to clipboard
Can not access Windows via localhost
I'm using proxychains4 as my shell proxy, but I can not access 127.0.0.1:7890 where a proxy in Windows is running in WSL. Using LAN address of Windows works. The same thing happend when using dev server in node (vite), I started a dev server on localhost:3000 in WSL but I can not access it in Windows. I can access it in WSL though. There may be something wrong with vEthenet(WSL)
I'm using WSL2, Windows ver 10.0.19042.1165
In addition, after install ArchWSL, these issues come with my Ubuntu distro, too.
Ok things start getting wired now... I had my Arch distro backuped and recoveried, and now I can access it from windows with localhost... the different is that my subsystemd didn't work this time.
You can't access Windows host by localhost in wsl2, I mean, you just can't......... The reason you can access wsl host in Windows is Microsoft does some hack to it.
But still you can access Windows by a local adress, you can get it by running this in your wsl shell
cat /etc/resolv.conf | grep nameserver | awk '{print $2}'