I have followed these two links to set up apt-get proxy. https://github.com/microsoft/WSL/issues/6143 and https://askubuntu.com/questions/7470/how-to-run-sudo-apt-get-update-through-proxy-in-commandline meaning;
I edited /etc/sudoers
to:
Defaults env_keep = "http_proxy https_proxy ftp_proxy DISPLAY XAUTHORITY"
and set proxy like this:
export HTTPS_PROXY="http://${hostip}:1080" export HTTPS_PROXY="http://${hostip}:1080" export https_proxy="http://${hostip}:1080" export http_proxy="http://${hostip}:1080"
but I still can't connect to my shadowsocks server. any thoughts?
hostip
variable? I don't see any reference to that in either of the two links you posted.hostip=$(powershell.exe "(Test-Connection -ComputerName (hostname) -Count 1).IPV4Address.IPAddressToString")
. There are some other, simpler methods (e.g.yourwindowscomputername.local
oryourwindowscomputername.mshome.net
), but they return the IP of the virtual NIC, and your proxy may not be bound to that address.