通过python调用c++封装的通讯模块,底层使用brpc(baidu_std),如何让brpc的请求统一通过代理服务器进行转发
- Dominant language
- C++
- Stars
- 17.6k
- Forks
- 4.1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 69
Description
**Describe the bug (描述bug)**
尝试过在os中
export HTTP_PROXY="xx.xx.xx.xx:8080"
export HTTPS_PROXY="xx.xx.xx.xx:8080"
curl -x xx.xx.xx.xx:8080 目标ip:目标port
curl可以正常通过代理服务器转发到目标ip地址
但启动的python程序(调用编译好的C++通讯模块,底层使用brpc),默认使用baidu_std协议时,请求直接打到目标ip,没有经过代理服务器,将brpc_channel_protocol换为h2:grpc同样无法走代理服务器
**To Reproduce (复现方法)**
**Expected behavior (期望行为)**
请问如何设置brpc的代理服务器行为?
**Versions (各种版本)**
OS:
Compiler:
brpc:
protobuf:
**Additional context/screenshots (更多上下文/截图)**
Contributor guide
Research direction
No source files, tests, or version details are provided. Start by reproducing the Python program's compiled C++ brpc request with baidu_std and h2:grpc, comparing it with the working HTTP_PROXY, HTTPS_PROXY, and curl -x cases. Done means documenting or implementing a supported proxy configuration that routes the brpc request through the proxy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100