Skip to content

Proxy中的HyperClient缺少走代理的功能 #1231

@dryBranch

Description

@dryBranch

Is your feature request related to a problem? Please describe.
现有的 HyperClient 好像无法走 http 代理

Describe the solution you'd like
proxy::HyperClient 里的类型写死了 HttpsConnector
ReqwestClient 在有的网站会出现奇怪的问题,会无法连接导致 403,这估计是 reqwest 的问题。

Describe alternatives you've considered
我现在是暂时直接用 HyperClient 的代码直接改成一个新的类型来用。
不知道后面会将 HyperClient 改成泛型的还是直接改成类似这样

#[derive(Clone, Debug)]
pub struct HyperProxyedClient {
    inner: HyperUtilClient<ProxyConnector<HttpsConnector<HttpConnector>>, ReqBody>,
}

Additional context
salvo = "0.84.2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions