diff --git a/Cargo.lock b/Cargo.lock index f79cd381..7b654fee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,6 +264,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "aya-build" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765c92c523541cbf5e3a94c7a6ff4068a4d9537f98a2eeb136461c0537ded8c1" +dependencies = [ + "anyhow", + "cargo_metadata", +] + [[package]] name = "aya-ebpf" version = "0.1.1" @@ -678,15 +688,15 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "cocoa" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" +checksum = "ad36507aeb7e16159dfe68db81ccc27571c3ccd4b76fb2fb72fc59e7a4b1b64c" dependencies = [ "bitflags 2.9.0", "block", "cocoa-foundation", "core-foundation", - "core-graphics", + "core-graphics 0.24.0", "foreign-types", "libc", "objc", @@ -777,9 +787,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" dependencies = [ "core-foundation-sys", "libc", @@ -804,6 +814,19 @@ dependencies = [ "libc", ] +[[package]] +name = "core-graphics" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags 2.9.0", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + [[package]] name = "core-graphics-types" version = "0.2.0" @@ -835,25 +858,22 @@ dependencies = [ [[package]] name = "criterion" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +checksum = "3bf7af66b0989381bd0be551bd7cc91912a655a58c6918420c9527b1fd8b4679" dependencies = [ "anes", "cast", "ciborium", "clap", "criterion-plot", - "is-terminal", - "itertools 0.10.5", + "itertools 0.13.0", "num-traits", - "once_cell", "oorandom", "plotters", "rayon", "regex", "serde", - "serde_derive", "serde_json", "tinytemplate", "walkdir", @@ -1449,12 +1469,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" - [[package]] name = "hex" version = "0.4.3" @@ -1491,9 +1505,9 @@ dependencies = [ [[package]] name = "hickory-resolver" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a128410b38d6f931fcc6ca5c107a3b02cabd6c05967841269a4ad65d23c44331" +checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a" dependencies = [ "cfg-if", "futures-util", @@ -1512,9 +1526,9 @@ dependencies = [ [[package]] name = "hickory-server" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "716f516285473ce476dfc996bac9a3c9ef2fee4f380ebec5980b12216fe4f547" +checksum = "d53e5fe811b941c74ee46b8818228bfd2bc2688ba276a0eaeb0f2c95ea3b2585" dependencies = [ "async-trait", "bytes", @@ -1923,17 +1937,6 @@ dependencies = [ "serde", ] -[[package]] -name = "is-terminal" -version = "0.4.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -1949,6 +1952,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.14.0" @@ -2195,7 +2207,7 @@ dependencies = [ "cocoa", "console-subscriber", "core-foundation", - "core-graphics", + "core-graphics 0.25.0", "criterion", "data-encoding", "env_logger", @@ -2206,7 +2218,7 @@ dependencies = [ "internet-packet", "log", "lru_time_cache", - "nix 0.30.0", + "nix 0.30.1", "objc", "pretty-hex", "prost", @@ -2259,8 +2271,8 @@ version = "0.13.0-dev" dependencies = [ "anyhow", "aya", + "aya-build", "aya-log", - "cargo_metadata", "const-sha1", "env_logger", "hex", @@ -2305,7 +2317,7 @@ dependencies = [ "mitmproxy", "mitmproxy-contentviews", "mitmproxy-highlight", - "nix 0.30.0", + "nix 0.30.1", "pyo3", "pyo3-async-runtimes", "pyo3-log", @@ -2347,9 +2359,9 @@ dependencies = [ [[package]] name = "nix" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537bc3c4a347b87fd52ac6c03a02ab1302962cfd93373c5d7a112cdc337854cc" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ "bitflags 2.9.0", "cfg-if", @@ -2657,9 +2669,9 @@ dependencies = [ [[package]] name = "prefix-trie" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5f930995ba4986bd239ba8d8fded67cad82d1db329c4f316f312847cba16aa" +checksum = "85cf4c7c25f1dd66c76b451e9041a8cfce26e4ca754934fa7aed8d5a59a01d20" dependencies = [ "ipnet", "num-traits", @@ -2861,9 +2873,9 @@ dependencies = [ [[package]] name = "pyo3-log" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079e412e909af5d6be7c04a7f29f6a2837a080410e1c529c9dee2c367383db4" +checksum = "45192e5e4a4d2505587e27806c7b710c231c40c56f3bfc19535d0bb25df52264" dependencies = [ "arc-swap", "log", @@ -3302,9 +3314,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3375,9 +3387,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.35.0" +version = "0.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b897c8ea620e181c7955369a31be5f48d9a9121cb59fd33ecef9ff2a34323422" +checksum = "79251336d17c72d9762b8b54be4befe38d2db56fbbc0241396d70f173c39d47a" dependencies = [ "libc", "memchr", @@ -3412,9 +3424,9 @@ checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" [[package]] name = "tempfile" -version = "3.19.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", "getrandom 0.3.2", @@ -3540,9 +3552,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.2" +version = "1.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" dependencies = [ "backtrace", "bytes", @@ -3739,9 +3751,9 @@ dependencies = [ [[package]] name = "tree-sitter" -version = "0.25.3" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ac5ea5e7f2f1700842ec071401010b9c59bf735295f6e9fa079c3dc035b167" +checksum = "ac5fff5c47490dfdf473b5228039bfacad9d765d9b6939d26bf7cc064c1c7822" dependencies = [ "cc", "regex", @@ -3753,9 +3765,9 @@ dependencies = [ [[package]] name = "tree-sitter-highlight" -version = "0.25.3" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076673d82b859652de3e7abe73a4592c173e51dfc9b83eb49f0479fd9fe4631c" +checksum = "2b95a758838aa4272d7c5c40fe35a4c8266fd3e3a36e019eef952ec5840b60ed" dependencies = [ "regex", "streaming-iterator", @@ -3781,9 +3793,9 @@ dependencies = [ [[package]] name = "tree-sitter-yaml" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c99f2b92b677f1a18b6b232fa9329afb5758118238a7d0b29cae324ef50d5e" +checksum = "3d5893f2a05e57c86a2338aa3aed167a1e5c68b8fdff3bf4a460941f2d8fc944" dependencies = [ "cc", "tree-sitter-language", @@ -3797,9 +3809,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tun" -version = "0.7.19" +version = "0.7.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96826f74fb6301ef2954661a43a9ff37cd1158de10a138c1184300333d2d98e4" +checksum = "dc6bf9cb46a7a749b12997f2a746fdfbd8e5975ec74d89215b8275708b2feb1a" dependencies = [ "bytes", "cfg-if", @@ -3808,7 +3820,7 @@ dependencies = [ "ipnet", "libc", "log", - "nix 0.30.0", + "nix 0.30.1", "thiserror 2.0.12", "tokio", "tokio-util", diff --git a/Cargo.toml b/Cargo.toml index 2048054c..d2df1090 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ aya = { version = "0.13.0", default-features = false } aya-ebpf = { version = "0.1.1", default-features = false } aya-log = { version = "0.2.1", default-features = false } aya-log-ebpf = { version = "0.1.1", default-features = false } -tun = { version = "0.7.19" } +tun = { version = "0.7.21" } [workspace.lints.clippy] large_futures = "deny" @@ -59,7 +59,7 @@ anyhow = { version = "1.0.97", features = ["backtrace"] } log = "0.4.27" pretty-hex = "0.4.1" smoltcp = "0.12" -tokio = { version = "1.44.1", features = ["macros", "net", "rt-multi-thread", "sync", "time", "io-util", "process"] } +tokio = { version = "1.45.1", features = ["macros", "net", "rt-multi-thread", "sync", "time", "io-util", "process"] } boringtun = { version = "0.6", default-features = false } console-subscriber = { version = "0.4.1", optional = true } image = { version = "0.25.6", default-features = false, features = ["png", "tiff"] } @@ -69,8 +69,8 @@ futures-util = { version = "0.3.31", features = ["sink"] } lru_time_cache = "0.11.11" internet-packet = { version = "0.2.3", features = ["smoltcp"] } data-encoding = "2.8.0" -hickory-resolver = "0.25.1" -socket2 = "0.5.9" +hickory-resolver = "0.25.2" +socket2 = "0.5.10" [patch.crates-io] # tokio = { path = "../tokio/tokio" } @@ -94,23 +94,23 @@ features = [ [target.'cfg(target_os = "macos")'.dependencies] security-framework = "3.2.0" -nix = { version = "0.30.0", default-features = false, features = ["fs"] } -core-graphics = "0.24" +nix = { version = "0.30.1", default-features = false, features = ["fs"] } +core-graphics = "0.25" core-foundation = "0.10" cocoa = "0.26" objc = "0.2" -sysinfo = "0.35.0" +sysinfo = "0.35.1" [target.'cfg(target_os = "linux")'.dependencies] tun = { workspace = true, features = ["async"] } -tempfile = "3.19.1" -sysinfo = "0.35.0" +tempfile = "3.20.0" +sysinfo = "0.35.1" [dev-dependencies] env_logger = "0.11" rand = "0.9" -criterion = "0.5.1" -hickory-server = "0.25.1" +criterion = "0.6.0" +hickory-server = "0.25.2" [[bench]] name = "process" diff --git a/mitmproxy-contentviews/Cargo.toml b/mitmproxy-contentviews/Cargo.toml index cdbb0b18..3c315dae 100644 --- a/mitmproxy-contentviews/Cargo.toml +++ b/mitmproxy-contentviews/Cargo.toml @@ -26,7 +26,7 @@ flate2 = "1.0" protobuf-parse = "3.7" [dev-dependencies] -criterion = "0.5.1" +criterion = "0.6.0" [[bench]] name = "contentviews" diff --git a/mitmproxy-contentviews/benches/contentviews.rs b/mitmproxy-contentviews/benches/contentviews.rs index 0b0305ab..fd19b990 100644 --- a/mitmproxy-contentviews/benches/contentviews.rs +++ b/mitmproxy-contentviews/benches/contentviews.rs @@ -1,5 +1,6 @@ -use criterion::{black_box, criterion_group, criterion_main, Criterion}; +use criterion::{criterion_group, criterion_main, Criterion}; use mitmproxy_contentviews::{test::TestMetadata, MsgPack, Prettify, Protobuf, Reencode}; +use std::hint::black_box; fn criterion_benchmark(c: &mut Criterion) { c.bench_function("protobuf-prettify", |b| { diff --git a/mitmproxy-highlight/Cargo.toml b/mitmproxy-highlight/Cargo.toml index bd36f616..5e8c41a2 100644 --- a/mitmproxy-highlight/Cargo.toml +++ b/mitmproxy-highlight/Cargo.toml @@ -13,13 +13,13 @@ workspace = true [dependencies] anyhow = { version = "1.0.97", features = ["backtrace"] } -tree-sitter-highlight = "0.25.3" -tree-sitter-yaml = "0.7.0" +tree-sitter-highlight = "0.25.5" +tree-sitter-yaml = "0.7.1" tree-sitter-xml = "0.7.0" -tree-sitter = "0.25.3" +tree-sitter = "0.25.5" [dev-dependencies] -criterion = "0.5.1" +criterion = "0.6.0" [[bench]] name = "syntax_highlight" diff --git a/mitmproxy-highlight/benches/syntax_highlight.rs b/mitmproxy-highlight/benches/syntax_highlight.rs index bf7d5afe..7096c22f 100644 --- a/mitmproxy-highlight/benches/syntax_highlight.rs +++ b/mitmproxy-highlight/benches/syntax_highlight.rs @@ -1,5 +1,6 @@ -use criterion::{black_box, criterion_group, criterion_main, Criterion}; +use criterion::{criterion_group, criterion_main, Criterion}; use mitmproxy_highlight::Language; +use std::hint::black_box; fn criterion_benchmark(c: &mut Criterion) { c.bench_function("syntax_highlight small", |b| { diff --git a/mitmproxy-linux/Cargo.toml b/mitmproxy-linux/Cargo.toml index 55e3c57f..2b6fada1 100644 --- a/mitmproxy-linux/Cargo.toml +++ b/mitmproxy-linux/Cargo.toml @@ -21,7 +21,7 @@ mitmproxy-linux-ebpf-common = { path = "../mitmproxy-linux-ebpf-common"} tun = { workspace = true, features = ["async"] } aya = { workspace = true } aya-log = { workspace = true } -tokio = { version = "1.44", features = ["macros", "net", "rt-multi-thread", "sync", "io-util", "signal"] } +tokio = { version = "1.45", features = ["macros", "net", "rt-multi-thread", "sync", "io-util", "signal"] } anyhow = { version = "1.0.97", features = ["backtrace"] } log = "0.4.27" env_logger = "0.11.5" @@ -31,7 +31,8 @@ libc = "0.2.170" const-sha1 = "0.3.0" [target.'cfg(target_os = "linux")'.build-dependencies] -cargo_metadata = { version = "0.19.2", default-features = false } +anyhow = { version = "1.0.97", features = ["backtrace"] } +aya-build = "0.1.2" mitmproxy-linux-ebpf = { path = "../mitmproxy-linux-ebpf" } [target.'cfg(target_os = "linux")'.dev-dependencies] diff --git a/mitmproxy-linux/build.rs b/mitmproxy-linux/build.rs index 07e1883d..9a2dbd53 100644 --- a/mitmproxy-linux/build.rs +++ b/mitmproxy-linux/build.rs @@ -1,144 +1,22 @@ #[cfg(target_os = "linux")] -use std::{ - env, fs, - io::{BufRead as _, BufReader}, - path::PathBuf, - process::{Child, Command, Stdio}, -}; +use anyhow::{anyhow, Context as _}; #[cfg(target_os = "linux")] -use cargo_metadata::{ - Artifact, CompilerMessage, Message, Metadata, MetadataCommand, Package, Target, -}; +use aya_build::cargo_metadata; #[cfg(not(target_os = "linux"))] fn main() {} /// Based on https://github.com/aya-rs/aya-template/blob/main/%7B%7Bproject-name%7D%7D/build.rs #[cfg(target_os = "linux")] -fn main() { - let Metadata { packages, .. } = MetadataCommand::new().no_deps().exec().unwrap(); +fn main() -> anyhow::Result<()> { + let cargo_metadata::Metadata { packages, .. } = cargo_metadata::MetadataCommand::new() + .no_deps() + .exec() + .context("MetadataCommand::exec")?; let ebpf_package = packages .into_iter() - .find(|Package { name, .. }| name == "mitmproxy-linux-ebpf") - .unwrap(); - - let out_dir = env::var_os("OUT_DIR").unwrap(); - let out_dir = PathBuf::from(out_dir); - - let endian = env::var_os("CARGO_CFG_TARGET_ENDIAN").unwrap(); - let target = if endian == "big" { - "bpfeb" - } else if endian == "little" { - "bpfel" - } else { - panic!("unsupported endian={:?}", endian) - }; - - let arch = env::var_os("CARGO_CFG_TARGET_ARCH").unwrap(); - - let target = format!("{target}-unknown-none"); - - let Package { manifest_path, .. } = ebpf_package; - let ebpf_dir = manifest_path.parent().unwrap(); - - // We have a build-dependency on `mitmproxy-linux-ebpf`, so cargo will automatically rebuild us - // if `mitmproxy-linux-ebpf`'s *library* target or any of its dependencies change. Since we - // depend on `mitmproxy-linux-ebpf`'s *binary* targets, that only gets us half of the way. This - // stanza ensures cargo will rebuild us on changes to the binaries too, which gets us the - // rest of the way. - println!("cargo:rerun-if-changed={}", ebpf_dir.as_str()); - - let mut cmd = Command::new("cargo"); - cmd.args([ - "build", - "-Z", - "build-std=core", - "--bins", - "--message-format=json", - "--release", - "--target", - &target, - ]); - - cmd.env("CARGO_CFG_BPF_TARGET_ARCH", arch); - - // Workaround to make sure that the rust-toolchain.toml is respected. - for key in ["RUSTUP_TOOLCHAIN", "RUSTC", "RUSTC_WORKSPACE_WRAPPER"] { - cmd.env_remove(key); - } - cmd.current_dir(ebpf_dir); - - // Workaround for https://github.com/rust-lang/cargo/issues/6412 where cargo flocks itself. - let ebpf_target_dir = out_dir.join("mitmproxy-linux-ebpf"); - cmd.arg("--target-dir").arg(&ebpf_target_dir); - - let mut child = cmd - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn() - .unwrap_or_else(|err| panic!("failed to spawn {cmd:?}: {err}")); - let Child { stdout, stderr, .. } = &mut child; - - // Trampoline stdout to cargo warnings. - let stderr = stderr.take().unwrap(); - let stderr = BufReader::new(stderr); - let stderr = std::thread::spawn(move || { - for line in stderr.lines() { - let line = line.unwrap(); - let skip = line.contains("info: latest update on") - || line.contains("syncing channel updates") - || line.contains("downloading component") - || line.contains("installing component") - || line.contains("Updating crates.io index") - || line.contains("Updating git repository") - || line.contains("Downloading") - || line.contains("Downloaded") - || line.contains("Compiling ") - || line.contains("Finished `"); - if !skip { - println!("cargo:warning={line}"); - } - } - }); - - let stdout = stdout.take().unwrap(); - let stdout = BufReader::new(stdout); - let mut executables = Vec::new(); - for message in Message::parse_stream(stdout) { - #[allow(clippy::collapsible_match)] - match message.expect("valid JSON") { - Message::CompilerArtifact(Artifact { - executable, - target: Target { name, .. }, - .. - }) => { - if let Some(executable) = executable { - executables.push((name, executable.into_std_path_buf())); - } - } - Message::CompilerMessage(CompilerMessage { message, .. }) => { - for line in message.rendered.unwrap_or_default().split('\n') { - println!("cargo:warning={line}"); - } - } - Message::TextLine(line) => { - println!("cargo:warning={line}"); - } - _ => {} - } - } - - let status = child - .wait() - .unwrap_or_else(|err| panic!("failed to wait for {cmd:?}: {err}")); - assert_eq!(status.code(), Some(0), "{cmd:?} failed: {status:?}"); - - stderr.join().map_err(std::panic::resume_unwind).unwrap(); - - for (name, binary) in executables { - let dst = out_dir.join(name); - let _: u64 = fs::copy(&binary, &dst) - .unwrap_or_else(|err| panic!("failed to copy {binary:?} to {dst:?}: {err}")); - } + .find(|cargo_metadata::Package { name, .. }| name == "mitmproxy-linux-ebpf") + .ok_or_else(|| anyhow!("mitmproxy-linux-ebpf package not found"))?; + aya_build::build_ebpf([ebpf_package]) } diff --git a/mitmproxy-rs/Cargo.toml b/mitmproxy-rs/Cargo.toml index 3c4d4ca5..7d519d44 100644 --- a/mitmproxy-rs/Cargo.toml +++ b/mitmproxy-rs/Cargo.toml @@ -26,13 +26,13 @@ pyo3 = { version = "0.24", features = ["abi3", "abi3-py312", "anyhow"] } pyo3-async-runtimes = { version = "0.24", features = ["tokio-runtime", "testing", "attributes"] } pyo3-log = "0.12" rand_core = { version = "0.6.4", features = ["getrandom"] } # https://github.com/dalek-cryptography/curve25519-dalek/issues/731 -tokio = { version = "1.44", features = ["macros", "net", "rt-multi-thread", "sync"] } +tokio = { version = "1.45", features = ["macros", "net", "rt-multi-thread", "sync"] } boringtun = "0.6" tar = "0.4.44" console-subscriber = { version = "0.4.1", optional = true } [target.'cfg(target_os = "linux")'.dependencies] -nix = { version = "0.30.0", features = ["user"] } +nix = { version = "0.30.1", features = ["user"] } [dev-dependencies] env_logger = "0.11" diff --git a/mitmproxy-windows/redirector/Cargo.toml b/mitmproxy-windows/redirector/Cargo.toml index b05263da..f64347f7 100644 --- a/mitmproxy-windows/redirector/Cargo.toml +++ b/mitmproxy-windows/redirector/Cargo.toml @@ -15,7 +15,7 @@ workspace = true [target.'cfg(windows)'.dependencies] mitmproxy = { path = "../../" } -tokio = { version = "1.44", features = ["macros", "net", "rt-multi-thread", "sync", "io-util"] } +tokio = { version = "1.45", features = ["macros", "net", "rt-multi-thread", "sync", "io-util"] } anyhow = { version = "1.0.97", features = ["backtrace"] } windivert = "0.6.0" lru_time_cache = "0.11.11" diff --git a/src/processes/nix_list.rs b/src/processes/nix_list.rs index 543fa99b..2ebe336f 100644 --- a/src/processes/nix_list.rs +++ b/src/processes/nix_list.rs @@ -91,10 +91,12 @@ mod macos_visible_windows { use cocoa::foundation::NSString; use core_foundation::number::{kCFNumberSInt32Type, CFNumberGetValue, CFNumberRef}; use core_graphics::display::{ - kCGNullWindowID, kCGWindowListExcludeDesktopElements, kCGWindowListOptionOnScreenOnly, CFArrayGetCount, CFArrayGetValueAtIndex, CFDictionaryGetValueIfPresent, CFDictionaryRef, CGWindowListCopyWindowInfo, }; + use core_graphics::window::{ + kCGNullWindowID, kCGWindowListExcludeDesktopElements, kCGWindowListOptionOnScreenOnly, + }; use std::collections::HashSet; use std::ffi::c_void;