continue icon indicating copy to clipboard operation
continue copied to clipboard

Not able to use with proxy

Open HatefulRock opened this issue 1 year ago • 13 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 10
- Continue: v0.8.24
- IDE: VSCode

Description

Unable to use continue on vscode with proxy

To reproduce

No response

Log output

request to https://proxy-server-green-l6vsfbzhba-uw.a.run.app/stream_chat failed, reason: self signed certificate in certificate chain

POST https://us.i.posthog.com/e/?retry_count=1&ip=1&_=1713432561822&ver=1.116.6&compression=base64 net::ERR_CERT_AUTHORITY_INVALID
[Extension Host] FetchError: request to https://proxy-server-green-l6vsfbzhba-uw.a.run.app/stream_chat failed, reason: self signed certificate in certificate chain
	at ClientRequest.<anonymous> (c:\Users\a0e72199\.vscode\extensions\continue.continue-0.8.24-win32-x64\out\extension.js:25975:14)
	at ClientRequest.emit (node:events:529:35)
	at ClientRequest.emit (node:domain:489:12)
	at TLSSocket.socketErrorListener (node:_http_client:501:9)
	at TLSSocket.emit (node:events:517:28)
	at TLSSocket.emit (node:domain:489:12)
	at emitErrorNT (node:internal/streams/destroy:151:8)
	at emitErrorCloseNT (node:internal/streams/destroy:116:3)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

HatefulRock avatar Apr 18 '24 09:04 HatefulRock

@HatefulRock Would you be able to share a bit more info about what your proxy setup looks like? Most importantly, there is the HTTP: Proxy field in VS Code settings, and the HTTP: Proxy Support field.

If you already have VS Code set up to use a proxy, then the Proxy Support field can be set to "override" in order to handle all outgoing traffic from extensions automatically and send it through your proxy.

Otherwise, Continue also has a proxy option in config.json which can be set for each model with "requestOptions.proxy"

sestinj avatar Apr 19 '24 17:04 sestinj

@sestinj is it also possible to configure a no_proxy variable?

ilyanoskov avatar Apr 27 '24 11:04 ilyanoskov

@ilyanoskov We don't have this today, but to make sure I understand what you mean:

You would set requestOptions.proxy to the proxy that you want most requests to go through, and also requestOptions.noProxy with a list of host names that you don't want the proxy to be used for?

sestinj avatar May 03 '24 20:05 sestinj

@sestinj this is a feature that we would also like to see implemented. Your understanding is correct.

nmcostello avatar Jun 05 '24 14:06 nmcostello

@nmcostello Here's a first pass at the feature: https://github.com/continuedev/continue/commit/e7f1f43fddc81034a046c0bbde5d963b53282e17

I'll release it later today in pre-release, but let me know if there's anything else that you would need

sestinj avatar Jun 05 '24 23:06 sestinj

Awesome! I'll check it out in the pre-release. This should be what's needed.

nmcostello avatar Jun 06 '24 13:06 nmcostello

I have the same request. I set the config.json like this. But it doesn't work at version of 0.8.40. Looking forward to your new release. { "model": "gpt-4o", "title": "GPT-4o", "systemMessage": "You are an expert software developer. You give helpful and concise responses.", "apiKey": "my-api-key", "completionOptions": {}, "provider": "openai", "requestOptions":{ "proxy": "socks5h://127.0.0.1:7890" } }

sooit avatar Jun 07 '24 02:06 sooit

Just pushed 0.9.154 so it should be on the store in a matter of 20 minutes

sestinj avatar Jun 07 '24 17:06 sestinj