4 releases (2 breaking)

0.3.0 Jul 12, 2024
0.2.0 May 10, 2024
0.1.1 Apr 18, 2024
0.1.0 Feb 28, 2024

#1973 in Network programming

Download history 720/week @ 2024-04-05 479/week @ 2024-04-12 627/week @ 2024-04-19 713/week @ 2024-04-26 554/week @ 2024-05-03 655/week @ 2024-05-10 620/week @ 2024-05-17 537/week @ 2024-05-24 374/week @ 2024-05-31 564/week @ 2024-06-07 500/week @ 2024-06-14 715/week @ 2024-06-21 676/week @ 2024-06-28 615/week @ 2024-07-05 898/week @ 2024-07-12 535/week @ 2024-07-19

2,873 downloads per month
Used in 12 crates (9 directly)

Apache-2.0

1MB
22K SLoC

pingora-proxy

Programmable HTTP proxy built on top of [pingora_core].

Features

  • HTTP/1.x and HTTP/2 for both downstream and upstream
  • Connection pooling
  • TLSv1.3, mutual TLS, customizable CA
  • Request/Response scanning, modification or rejection
  • Dynamic upstream selection
  • Configurable retry and failover
  • Fully programmable and customizable at any stage of a HTTP request

How to use

Users of this crate defines their proxy by implementing [ProxyHttp] trait, which contains the callbacks to be invoked at each stage of a HTTP request.

Then the service can be passed into [http_proxy_service()] for a pingora_core::server::Server to run it.

See examples/load_balancer.rs for a detailed example.

Dependencies

~37–61MB
~1M SLoC