reqwest_proxy 0.1.4

Seamlessly proxy reqwest traffic through Shadowsocks, Hysteria2, and more. / 通过 Shadowsocks、Hysteria2 等多种协议无缝代理 reqwest 流量。
Documentation
#[macro_export]
macro_rules! conn {
  ($($name:ident, $name_str:literal);+)=>{
    pub mod conn {
      $(
        #[cfg(feature = $name_str)]
        pub mod $name {
          use $crate::$name::StreamType;

          pub struct ConnFuture {
            pub(crate) fut: std::pin::Pin<Box<dyn std::future::Future<Output = Result<StreamType, std::io::Error>> + Send>>,
          }

          impl std::future::Future for ConnFuture {
            type Output = Result<StreamType, std::io::Error>;
            fn poll(
                mut self: std::pin::Pin<&mut Self>,
                cx: &mut std::task::Context<'_>,
            ) -> std::task::Poll<Self::Output> {
                self.fut.as_mut().poll(cx)
            }
          }
        }
      )+
    }
  }
}