copilot-api icon indicating copy to clipboard operation
copilot-api copied to clipboard

Support HTTP_PROXY, HTTPS_PROXY, ALL_PROXY environment

Open mjm114514 opened this issue 1 year ago • 7 comments

Some region does not support claude models, so we need proxy support.

mjm114514 avatar Sep 20 '25 15:09 mjm114514

Seems turning on "tun mode" in clash works.

sunhs avatar Sep 23 '25 13:09 sunhs

everything run? I failed

XuHgwei avatar Sep 27 '25 07:09 XuHgwei

From my case it works. Turning on tun mode, don't set HTTP_PROXY/HTTPS_PROXY/SOCKS_PROXY in the terminal, starts copilot-api, and claude is in the model list

sunhs avatar Sep 27 '25 07:09 sunhs

same with "npx copilot-api@latest start --port 5001"? I try again, and still fail. Thanks for replying

XuHgwei avatar Sep 27 '25 08:09 XuHgwei

Yeah.

Just tried again:

  • Without tun mode, even if set proxy env var: no claude model.
  • With tun mode, no proxy env var set: claude model available.
  • With tun mode, set proxy env var: this time claude model is available too.

By the way, my proxy node is in HK. So I don't quite understand what's behind the scene.

Image

sunhs avatar Sep 27 '25 08:09 sunhs

yeah~THANK YOU! I know why my TUN mode failed, that's because its supports component hasn''t been installed which called "Service Mode".

XuHgwei avatar Sep 27 '25 08:09 XuHgwei