Copilot plugin cannot be used in WSL

The author used VSCode, and Copilot in the Windows project was able to reply normally. However, Copilot in the WSL project experienced network errors. The problem was found to be caused by the Copilot plugin in WSL not being able to access the proxy, and the issue of WSL terminal accessing the proxy was easily resolved.

Due to the author’s use of v2rayn, they initially attempted to use this solution, but it did not solve the issue of Copilot in WSL, so they abandoned this route.

Then we will use the method of building our own SOCKS5 server. There is an OpenWRT bypass router in the author’s local area network for all LAN devices to use, and we use this bypass router for proxy server configuration. Access the OpenWRT management interface, open the service, and select the server options for the SS plugin. Configure a SOCKS5 type server, set the port, username, and password, and enable them.

Then open the WSL terminal and modify the~/. bashrc file configuration. Add (note to modify to your own bypass IP, SOCKS5 server port number, and password) at the end of the file and perform sync synchronization.

export http_proxy="socks5h://Socks5:密码@192.168.3.22: 19071"

export https_proxy="socks5h://Socks5:密码@192.168.3.22: 19071"

export all_proxy="socks5h://Socks5:密码@192.168.3.22: 19071"

Execute in WSL terminal

curl ip.sb

If the SOCKS5 server is not configured, you will see the following results

After configuring the server, the IP address can be seen during execution. At the same time, curl Google was tested and it was found that it could also be successfully accessed. At this point, our WSL terminal can successfully use the proxy with the help of SOCKS5 server.

Next, search for http_dexy in the VSCode settings, add the corresponding SOCKS5 configuration, and restart to use Copilot in WSL normally.

Reference link

https://zhuanlan.zhihu.com/p/414627975

https://blog.csdn.net/Asssshzy/article/details/129691504

Published on October 4, 2025.

Leave a Reply