Title: feat: add HTTP/HTTPS/SOCKS5 proxy supportFeat/proxy support 添加HTTP/HTTPS/SOCKS5代理支持 by kiangz · Pull Request #162 · lessweb/deepcode-cli · GitHub
Open Graph Title: feat: add HTTP/HTTPS/SOCKS5 proxy supportFeat/proxy support 添加HTTP/HTTPS/SOCKS5代理支持 by kiangz · Pull Request #162 · lessweb/deepcode-cli
X Title: feat: add HTTP/HTTPS/SOCKS5 proxy supportFeat/proxy support 添加HTTP/HTTPS/SOCKS5代理支持 by kiangz · Pull Request #162 · lessweb/deepcode-cli
Description: Summary Add comprehensive proxy support for all network requests (OpenAI API, telemetry, web search). Changes New src/common/proxy.ts: Proxy resolution module with support for: HTTPS_PROXY, HTTP_PROXY, SOCKS_PROXY, SOCKS5_PROXY environment variables NO_PROXY bypass with wildcard (*), exact match, and subdomain wildcard (.example.com) DEEPCODE_ prefixed environment variables Configuration via ~/.deepcode/settings.json env field Priority: user settings < project settings < system env vars Dispatcher caching to avoid re-creating ProxyAgent on every request src/common/openai-client.ts: Integrate ProxyAgent into OpenAI client src/common/telemetry.ts: Route telemetry through proxyFetch src/tools/web-search-handler.ts: Route web search through proxyFetch docs/configuration.md / docs/configuration_en.md: Add proxy configuration docs (zh + en) src/tests/proxy.test.ts: 28 unit tests covering all proxy scenarios Compatibility PowerShell: $env:HTTPS_PROXY = "http://..." Bash: export HTTPS_PROXY=http://... Settings: {"env": {"HTTPS_PROXY": "http://..."}} 摘要 为所有网络请求添加全面的代理支持(OpenAI API、遥测、网络搜索)。 更改 新增src/common/proxy.ts:代理解析模块,支持: HTTPS_PROXY 、HTTP_PROXY 、SOCKS_PROXY和SOCKS5_PROXY环境变量 “NO_PROXY”绕过通配符(“*”)、精确匹配和子域通配符(“.example.com”) “DEEPCODE_”前缀环境变量 通过“~/.depcode/settings.json” “env”字段进行配置 优先级:用户设置<项目设置<系统环境变量 调度程序缓存,以避免在每次请求时重新创建“ProxyAgent” src/common/openai-client.ts:将ProxyAgent 集成到openai客户端中 src/common/ttelemetry.ts:通过proxyFetch路由遥测 src/tools/web-search-handler.ts:通过proxyFetch路由web搜索 docs/configuration.md/docs/configuration _en.md:添加代理配置文档(中文+英文) src/tests/proxy.test.ts:28个单元测试,涵盖所有代理场景 兼容性 PowerShell: $env:HTTPS_PROXY = "http://..." Bash: export HTTPS_PROXY=http://... Settings: {"env": {"HTTPS_PROXY": "http://..."}}
Open Graph Description: Summary Add comprehensive proxy support for all network requests (OpenAI API, telemetry, web search). Changes New src/common/proxy.ts: Proxy resolution module with support for: HTTPS_PROXY, HTTP...
X Description: Summary Add comprehensive proxy support for all network requests (OpenAI API, telemetry, web search). Changes New src/common/proxy.ts: Proxy resolution module with support for: HTTPS_PROXY, HTTP...
Opengraph URL: https://github.com/lessweb/deepcode-cli/pull/162
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:731b0fda-6f91-3a9f-ec8e-762fd603cd4a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BA06:2BE9C6:108A3C8:170F2A9:6A4DF68F |
| html-safe-nonce | 1500a7a476741c0ef1aca3b99e1f58c44bfa5778f7fffe581fdc392e6415e028 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTA2OjJCRTlDNjoxMDhBM0M4OjE3MEYyQTk6NkE0REY2OEYiLCJ2aXNpdG9yX2lkIjoiNzU5MDA1MTkzMDgwMzQwMjM4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 24cdb9a03f83fa6d2bc53363ea875d6cdc55a55a7a3ebc34d20a3f8d3e036f7c |
| hovercard-subject-tag | pull_request:3809233763 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/lessweb/deepcode-cli/pull/162/files |
| twitter:image | https://avatars.githubusercontent.com/u/50792067?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/50792067?s=400&v=4 |
| og:image:alt | Summary Add comprehensive proxy support for all network requests (OpenAI API, telemetry, web search). Changes New src/common/proxy.ts: Proxy resolution module with support for: HTTPS_PROXY, HTTP... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/lessweb/deepcode-cli git https://github.com/lessweb/deepcode-cli.git |
| octolytics-dimension-user_id | 118287711 |
| octolytics-dimension-user_login | lessweb |
| octolytics-dimension-repository_id | 1223512305 |
| octolytics-dimension-repository_nwo | lessweb/deepcode-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1223512305 |
| octolytics-dimension-repository_network_root_nwo | lessweb/deepcode-cli |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f4bb89367ca678f057d79b1abc45d6675b1bd5b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width