Closed Rigidoont closed 2 months ago
Alright, I seem to have figured out how to add a proxy. According to GitHub Copilot's documentation, it checks the following env variables:
HTTPS_PROXY
https_proxy
HTTP_PROXY
http_proxy
When spawning an agent in src/copilot/CopilotAgent.ts
, I added env: { HTTP_PROXY: 'http://localhost:1080' }
in the third argument, which worked perfectly:
this.agent = spawn(
File.wrapFilePath(this.plugin.settings.nodePath),
[File.wrapFilePath(this.agentPath), "--stdio"],
{
shell: true,
stdio: "pipe",
env: { HTTP_PROXY: 'http://localhost:1080' }
},
);
Since other users might benefit from this functionality, would you consider adding a proxy configuration option directly within the plugin’s UI? This would make it more accessible for users who might not be comfortable modifying the code.
Hi @Rigidoont,
Thanks for doing the research! I will implement it in the end of the week when I have a bit more time.
Hi @Rigidoont,
The new setting is available in the v1.0.10
, please tell me if it fit your needs!
I've tried it out. It's perfect! Thank you so much!
Hi! This plugin is amazing! Thank you very much for making it.
I need some help with configuring a proxy. In my IDE by JetBrains, there are settings to configure a proxy under "Settings" -> "Appearance & Behavior" -> "System settings" -> "HTTP Proxy", but I couldn't find similar options in the settings of this plugin.
Could you please help me figure out how to use a proxy with this plugin or consider adding a feature that allows users to configure an HTTP proxy directly within the plugin?