feat(proxy): 添加环境变量代理支持 #294
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
为HTTP客户端配置添加ProxyFromEnvironment支持,允许通过环境变量配置代理
变更描述
针对企业内网中部署无法访问公网环境,需要用到代理。
但这两处地方Transport没有获取代理,导致无法使用环境中的代理配置
修改后,支持从环境变量中获取代理配置,如
export HTTP_PROXY=http://127.0.0.1:8080
export HTTPS_PROXY=http://127.0.0.1:8080
export NO_PROXY=localhost,127.0.0.1,.example.com
变更类型
影响范围
ModelUsecase - 模型创建
LLMProxy - 模型请求转发
测试验证
目前暂时无法测试,原因如下:
缺少开发者贡献的本地打包和测试的指导教程,本地打包自己摸索了较长时间,希望后续能完善相关贡献指南
希望有进一步建议,我可以完善相关测试
相关问题
关闭 #287