【问题标题】:HTTP requests via proxy with boost beast通过带有 boost beast 的代理的 HTTP 请求
【发布时间】:2022-02-22 06:06:27
【问题描述】:

在使用 Boost Beast 发出 HTTP 请求时是否可以设置代理? 使用 CURL 很简单。有人做过吗? 谢谢,

【问题讨论】:

    标签: c++ http boost proxy boost-asio


    【解决方案1】:

    取决于代理的种类。 Asio 库发行版 (asio/example/cpp{03,11}/socks4) 中有一个 socks4 示例。

    我在这里写了一个 socks4 客户端(同步/异步):socks4 with asynchronous boost::asio

    最近我为 socks5 扩展了它:Is there a native support for proxy connection via socks5 for boost::asio?

    我也放到了 github 上:https://github.com/sehe/asio-socks45-client。我打算花一些时间来修改它们,至少添加基本身份验证。它们可能会被添加到 Beast 库中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-12
      • 2011-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多