deps
This commit is contained in:
parent
8ee626fcab
commit
7645830c77
39 changed files with 38 additions and 4384 deletions
|
|
@ -1,13 +1,14 @@
|
|||
[package]
|
||||
name = "rpxy-lib"
|
||||
version = "0.7.0-alpha.4"
|
||||
authors = ["Jun Kurihara"]
|
||||
homepage = "https://github.com/junkurihara/rust-rpxy"
|
||||
repository = "https://github.com/junkurihara/rust-rpxy"
|
||||
license = "MIT"
|
||||
readme = "../README.md"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
description = "Library of `rpxy`: a simple and ultrafast http reverse proxy"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
license.workspace = true
|
||||
readme.workspace = true
|
||||
edition.workspace = true
|
||||
publish.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
@ -31,7 +32,7 @@ webpki-roots = ["rustls-backend", "hyper-rustls/webpki-tokio"]
|
|||
rand = "0.8.5"
|
||||
rustc-hash = "1.1.0"
|
||||
bytes = "1.5.0"
|
||||
derive_builder = "0.13.1"
|
||||
derive_builder = "0.20.0"
|
||||
futures = { version = "0.3.30", features = ["alloc", "async-await"] }
|
||||
tokio = { version = "1.36.0", default-features = false, features = [
|
||||
"net",
|
||||
|
|
@ -82,12 +83,12 @@ tracing = { version = "0.1.40" }
|
|||
quinn = { version = "0.10.2", optional = true }
|
||||
h3 = { path = "../submodules/h3/h3/", optional = true }
|
||||
h3-quinn = { path = "../submodules/h3/h3-quinn/", optional = true }
|
||||
s2n-quic = { version = "1.32.0", default-features = false, features = [
|
||||
s2n-quic = { version = "1.33.0", default-features = false, features = [
|
||||
"provider-tls-rustls",
|
||||
], optional = true }
|
||||
s2n-quic-core = { version = "0.32.0", default-features = false, optional = true }
|
||||
s2n-quic-core = { version = "0.33.0", default-features = false, optional = true }
|
||||
s2n-quic-h3 = { path = "../submodules/s2n-quic-h3/", optional = true }
|
||||
s2n-quic-rustls = { version = "0.32.0", optional = true }
|
||||
s2n-quic-rustls = { version = "0.33.0", optional = true }
|
||||
# for UDP socket wit SO_REUSEADDR when h3 with quinn
|
||||
socket2 = { version = "0.5.5", features = ["all"], optional = true }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
#[cfg(feature = "sticky-cookie")]
|
||||
use super::load_balance::LoadBalanceStickyBuilder;
|
||||
use super::load_balance::{
|
||||
load_balance_options as lb_opts, LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder,
|
||||
LoadBalanceRoundRobinBuilder,
|
||||
load_balance_options as lb_opts, LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder, LoadBalanceRoundRobinBuilder,
|
||||
};
|
||||
// use super::{BytesName, LbContext, PathNameBytesExp, UpstreamOption};
|
||||
use super::upstream_opts::UpstreamOption;
|
||||
|
|
@ -56,8 +55,7 @@ where
|
|||
}
|
||||
|
||||
if !(inner.iter().all(|(_, elem)| {
|
||||
!(elem.options.contains(&UpstreamOption::ForceHttp11Upstream)
|
||||
&& elem.options.contains(&UpstreamOption::ForceHttp2Upstream))
|
||||
!(elem.options.contains(&UpstreamOption::ForceHttp11Upstream) && elem.options.contains(&UpstreamOption::ForceHttp2Upstream))
|
||||
})) {
|
||||
error!("Either one of force_http11 or force_http2 can be enabled");
|
||||
return Err(RpxyError::InvalidUpstreamOptionSetting);
|
||||
|
|
@ -175,7 +173,7 @@ impl UpstreamCandidatesBuilder {
|
|||
&mut self,
|
||||
v: &Option<String>,
|
||||
// upstream_num: &usize,
|
||||
upstream_vec: &Vec<Upstream>,
|
||||
upstream_vec: &[Upstream],
|
||||
_server_name: &str,
|
||||
_path_opt: &Option<String>,
|
||||
) -> &mut Self {
|
||||
|
|
@ -236,10 +234,7 @@ impl UpstreamCandidates {
|
|||
let pointer_to_upstream = self.load_balance.get_context(context_to_lb);
|
||||
debug!("Upstream of index {} is chosen.", pointer_to_upstream.ptr);
|
||||
debug!("Context to LB (Cookie in Request): {:?}", context_to_lb);
|
||||
debug!(
|
||||
"Context from LB (Set-Cookie in Response): {:?}",
|
||||
pointer_to_upstream.context
|
||||
);
|
||||
debug!("Context from LB (Set-Cookie in Response): {:?}", pointer_to_upstream.context);
|
||||
(self.inner.get(pointer_to_upstream.ptr), pointer_to_upstream.context)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue