Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 66 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 21 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ prost-types = { version = "0.12", default-features = false }
rand = { version = "0.9.2", default-features = false, features = ["small_rng", "thread_rng"] }
rand_distr = { version = "0.5.1", default-features = false }
regex = { version = "1.11.2", default-features = false, features = ["std", "perf"] }
reqwest = { version = "0.11", features = ["json"] }
reqwest = { version = "0.12", features = ["json"] }
rust_decimal = { version = "1.37.0", default-features = false, features = ["std"] }
semver = { version = "1.0.27", default-features = false, features = ["serde", "std"] }
serde = { version = "1.0.219", default-features = false, features = ["alloc", "derive", "rc"] }
Expand Down Expand Up @@ -222,7 +222,6 @@ serial_test = { version = "3.2" }
[dependencies]
cfg-if.workspace = true
reqwest.workspace = true
reqwest_12 = { package = "reqwest", version = "0.12", features = ["json"] }
clap.workspace = true
clap_complete.workspace = true
indoc.workspace = true
Expand Down Expand Up @@ -383,15 +382,9 @@ h2 = { version = "0.4.11", default-features = false, optional = true }
hash_hasher = { version = "2.0.4", default-features = false }
hashbrown = { version = "0.14.5", default-features = false, optional = true, features = ["ahash"] }
headers = { version = "0.3.9", default-features = false }
headers_04 = { package = "headers", version = "0.4", default-features = false }
hostname = { version = "0.4.0", default-features = false }
http = { version = "0.2.9", default-features = false }
http-1 = { package = "http", version = "1.0", default-features = false, features = ["std"] }
http-serde = "1.1.3"
http-body = { version = "0.4.6", default-features = false }
humantime.workspace = true
hyper = { version = "0.14.32", default-features = false, features = ["client", "runtime", "http1", "http2", "server", "stream", "backports", "deprecated"] }
hyper-openssl = { version = "0.9.2", default-features = false }
hyper-proxy = { version = "0.9.1", default-features = false, features = ["openssl-tls"] }
indexmap.workspace = true
inventory = { version = "0.3.20", default-features = false }
ipnet = { version = "2", default-features = false, optional = true, features = ["serde", "std"] }
Expand Down Expand Up @@ -443,6 +436,25 @@ warp = { version = "0.3.7", default-features = false }
zstd = { version = "0.13.0", default-features = false }
arr_macro = { version = "0.2.1" }

# http 0.x
http = { version = "0.2.9", default-features = false }
http-serde = "1.1.3"

hyper = { version = "0.14.32", default-features = false, features = ["client", "runtime", "http1", "http2", "server", "stream", "backports", "deprecated"] }
hyper-proxy = { version = "0.9.1", default-features = false, features = ["openssl-tls"] }
hyper-openssl = { version = "0.9.2", default-features = false }

# http 1.x
hyper_1 = { package = "hyper", version = "1.0", default-features = false, features = ["client", "http1", "http2", "server"] }
hyper-util = { version = "0.1", features = ["tokio"] }
hyper-openssl_10 = { package = "hyper-openssl", version = "0.10", default-features = false, features = ["client-legacy"] }
hyper-proxy2 = { version = "0.1", default-features = false, features = ["openssl-tls"] }
http-body = { version = "0.4.6", default-features = false }

http-1 = { package = "http", version = "1.0", default-features = false, features = ["std"] }
http-body_1 = { package = "http-body", version = "1.0", default-features = false }
http-body-util = { version = "0.1.3", features = ["channel"] }

# depending on fork for bumped nix dependency
# https://github.com/heim-rs/heim/pull/360
heim = { git = "https://github.com/vectordotdev/heim.git", branch = "update-nix", default-features = false, features = ["disk"] }
Expand Down
2 changes: 1 addition & 1 deletion lib/vector-api-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tokio-stream = { workspace = true, features = ["sync"] }
graphql_client = { version = "0.14.0", default-features = false, features = ["graphql_query_derive"] }

# HTTP / WebSockets
reqwest = { version = "0.11.26", default-features = false, features = ["json"] }
reqwest = { version = "0.12.28", default-features = false, features = ["json"] }
tokio-tungstenite = { workspace = true, features = ["connect", "rustls"] }

# External libs
Expand Down
3 changes: 3 additions & 0 deletions lib/vector-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ float_eq = { version = "1.0", default-features = false }
futures.workspace = true
futures-util = { version = "0.3.29", default-features = false, features = ["std"] }
headers = { version = "0.3.9", default-features = false }
headers_04 = { package = "headers", version = "0.4", default-features = false }
http = { version = "0.2.9", default-features = false }
http-1 = { package = "http", version = "1.0", default-features = false, features = ["std"] }
hyper-proxy = { version = "0.9.1", default-features = false, features = ["openssl-tls"] }
hyper-proxy2 = { version = "0.1", default-features = false, features = ["openssl-tls"] }
indexmap.workspace = true
inventory.workspace = true
ipnet = { version = "2", default-features = false, features = ["serde", "std"] }
Expand Down
26 changes: 26 additions & 0 deletions lib/vector-core/src/config/global_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use vector_config::{configurable_component, impl_generate_config_from_default};
use super::{
super::default_data_dir, AcknowledgementsConfig, LogSchema, Telemetry,
metrics_expiration::PerMetricSetExpiration, proxy::ProxyConfig,
proxy_http_1::ProxyConfig as Http1ProxyConfig,
};
use crate::serde::bool_or_struct;

Expand Down Expand Up @@ -112,6 +113,11 @@ pub struct GlobalOptions {
#[configurable(metadata(docs::common = false, docs::required = false))]
pub proxy: ProxyConfig,

#[configurable(derived)]
#[serde(default, skip_serializing_if = "crate::serde::is_default")]
#[configurable(metadata(docs::common = false, docs::required = false))]
pub http_1_proxy: Http1ProxyConfig,

/// Controls how acknowledgements are handled for all sinks by default.
///
/// See [End-to-end Acknowledgements][e2e_acks] for more information on how Vector handles event
Expand Down Expand Up @@ -335,6 +341,7 @@ impl GlobalOptions {
acknowledgements: self.acknowledgements.merge_default(&with.acknowledgements),
timezone: self.timezone.or(with.timezone),
proxy: self.proxy.merge(&with.proxy),
http_1_proxy: self.http_1_proxy.merge(&with.http_1_proxy),
expire_metrics: self.expire_metrics.or(with.expire_metrics),
expire_metrics_secs: self.expire_metrics_secs.or(with.expire_metrics_secs),
expire_metrics_per_metric_set: merged_expire_metrics_per_metric_set,
Expand Down Expand Up @@ -461,6 +468,25 @@ mod tests {
);
}

#[test]
fn merges_http_1_proxy() {
// We use the `.http` settings as a proxy for the other settings, as they are all compared
// for equality above.
let merge = |a, b| merge("proxy.http", a, b, |result| result.http_1_proxy.http);

assert_eq!(merge(None, None), Ok(None));
assert_eq!(merge(Some("test1"), None), Ok(Some("test1".into())));
assert_eq!(merge(None, Some("test2")), Ok(Some("test2".into())));
assert_eq!(
merge(Some("test3"), Some("test3")),
Ok(Some("test3".into()))
);
assert_eq!(
merge(Some("test4"), Some("test5")),
Err(vec!["conflicting values for 'proxy.http' found".into()])
);
}

#[test]
fn merges_acknowledgements() {
let merge = |a, b| merge("acknowledgements", a, b, |result| result.acknowledgements);
Expand Down
1 change: 1 addition & 0 deletions lib/vector-core/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mod log_schema;
pub(crate) mod metrics_expiration;
pub mod output_id;
pub mod proxy;
pub mod proxy_http_1;
mod telemetry;

pub use global_options::{GlobalOptions, WildcardMatching};
Expand Down
Loading
Loading