31 releases

0.7.16 May 9, 2024
0.7.14 Mar 21, 2024
0.7.13 Feb 28, 2024
0.7.8 Dec 16, 2023
0.2.7 Oct 27, 2022

#261 in Authentication

Download history 552/week @ 2024-01-24 98/week @ 2024-01-31 568/week @ 2024-02-07 660/week @ 2024-02-14 462/week @ 2024-02-21 1008/week @ 2024-02-28 495/week @ 2024-03-06 166/week @ 2024-03-13 221/week @ 2024-03-20 348/week @ 2024-03-27 492/week @ 2024-04-03 292/week @ 2024-04-10 491/week @ 2024-04-17 614/week @ 2024-04-24 1082/week @ 2024-05-01 1064/week @ 2024-05-08

3,311 downloads per month
Used in qcs

Apache-2.0

360KB
7K SLoC

qcs-api-client-grpc

crates.io version crates.io license - Apache-2.0 crates.io recent downloads docs.rs badge

This crate provides an autogenerated gRPC client for the QCS API, along with helper utilities for automatically loading credentials from a user's QCS config and keeping authentication tokens refreshed.

  • get_channel: create a Channel to the given gRPC endpoint with QCS authentication automatically set up, that routes requests through client-side HTTP, HTTPS, or SOCKS5 proxies based on the presence of HTTPS_PROXY or HTTP_PROXY environment variables.
  • wrap_channel: wrap an existing Channel with QCS authentication.

Quick Start

See docs.rs for a quick start guide.

Proxies

The get_channel function configures the returned Channel to route requests through a client proxy based on the presence of environment variables HTTPS_PROXY and/or HTTP_PROXY. The variable names can be all-uppercase or all-lowercase, but the all-uppercase variants will take precedence. Currently, the supported proxy schemes are http, https, and socks5.

There are some caveats to the proxy configuration:

  • If both variables are defined, neither can be a socks5 proxy, unless they are both the same value.
  • If only one variable is defined, and it is a socks5 proxy, all traffic will routed through it.

Dependencies

~21–40MB
~716K SLoC