In this video I have shown how to set proxy in WSL (Ubuntu 18).
Note pad text.
#on ubuntu terminal write
sudo nano /etc/environment
#paste the following here
export http_proxy="http://example.proxy.server:8080"
export https_proxy="https://example.proxy.server:8080"
export no_proxy="localhost.127.0.0.1,::1,localhost"
#Save and exit
again on ubuntu terminal write
nano ~/.profile
Again paste the following at the end
export http_proxy="http://example.proxy.server:8080"
export https_proxy="https://example.proxy.server:8080"
export no_proxy="localhost.127.0.0.1,::1,localhost"
Save and Exit
And you are done. Enjoy!