Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump the dependencies group across 1 directory with 6 updates #142

Merged
merged 6 commits into from
May 16, 2024
Merged
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
782 changes: 641 additions & 141 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,25 @@ log = "0.4.18"
once_cell = "1"
pretty-hex = "0.4.1"
rand_core = { version = "0.6.4", features = ["getrandom"] }
smoltcp = "0.10"
smoltcp = "0.11"
tokio = { version = "1.35.1", features = ["macros", "net", "rt-multi-thread", "sync", "time", "io-util", "process"] }
boringtun = { version = "0.6", default-features = false }
x25519-dalek = "=2.0.0-rc.3"
async-trait = "0.1.77"
console-subscriber = { version = "0.2.0", optional = true }
image = "0.24.8"
image = "0.25.1"
prost = "0.12.3"
tokio-util = { version = "0.7.10", features = ["codec"] }
futures-util = { version = "0.3.30", features = ["sink"] }
lru_time_cache = "0.11.11"
internet-packet = { version = "0.2.0", features = ["smoltcp"] }

# [patch.crates-io]
[patch.crates-io]
# tokio = { path = "../tokio/tokio" }
# smoltcp = { git = 'https://github.com/mhils/smoltcp', rev = 'f65351adfa92db5193f368368cb668bac721fe43' }
smoltcp = { git = 'https://github.com/smoltcp-rs/smoltcp', rev = 'ef67e7b46cabf49783053cbf68d8671ed97ff8d4' }

[target.'cfg(windows)'.dependencies.windows]
version = "0.52.0"
version = "0.56.0"
features = [
"Win32_Foundation",
"Win32_Graphics_Dwm",
Expand All @@ -69,10 +69,10 @@ features = [

[target.'cfg(target_os = "macos")'.dependencies]
apple-security-framework = "2.9.2"
nix = { version = "0.27.1", default-features = false, features = ["fs"] }
nix = { version = "0.28.0", default-features = false, features = ["fs"] }

[dev-dependencies]
env_logger = "0.10"
env_logger = "0.11"
rand = "0.8"
criterion = "0.5.1"

Expand Down
4 changes: 2 additions & 2 deletions mitmproxy-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ crate-type = ["cdylib"]
[dependencies]
mitmproxy = { path = "../" }
anyhow = { version = "1.0.79", features = ["backtrace"] }
data-encoding = "2.5.0"
data-encoding = "2.6.0"
log = "0.4.18"
once_cell = "1"
pyo3 = { version = "0.20.3", features = ["abi3", "abi3-py310", "extension-module", "anyhow"] }
Expand All @@ -29,7 +29,7 @@ console-subscriber = { version = "0.2.0", optional = true }


[dev-dependencies]
env_logger = "0.10"
env_logger = "0.11"

[features]
tracing = ["console-subscriber"]
2 changes: 1 addition & 1 deletion mitmproxy-windows/redirector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ anyhow = { version = "1.0.79", features = ["backtrace"] }
windivert = "0.6.0"
lru_time_cache = "0.11.11"
log = "0.4.18"
env_logger = "0.10.2"
env_logger = "0.11.3"
prost = "0.12.3"
internet-packet = { version = "0.2.0", features = ["checksums"] }

Expand Down
1 change: 1 addition & 0 deletions src/ipc/mitmproxy_ipc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @generated
// This file is @generated by prost-build.
// Note: The protobuf definition is shared between the Rust and Swift parts.
// We are not using prost-build because providing protoc is a hassle on many platforms.
// See .github/workflows/autofix.yml for how to update the respective files,
Expand Down
8 changes: 4 additions & 4 deletions src/network/icmp.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::messages::SmolPacket;
use smoltcp::phy::ChecksumCapabilities;
use smoltcp::wire::{
Icmpv4Message, Icmpv4Packet, Icmpv4Repr, Icmpv6Message, Icmpv6Packet, Icmpv6Repr, IpAddress,
IpProtocol, Ipv4Packet, Ipv4Repr, Ipv6Packet, Ipv6Repr,
Icmpv4Message, Icmpv4Packet, Icmpv4Repr, Icmpv6Message, Icmpv6Packet, Icmpv6Repr, IpProtocol,
Ipv4Packet, Ipv4Repr, Ipv6Packet, Ipv6Repr,
};

pub(super) fn handle_icmpv4_echo_request(
Expand Down Expand Up @@ -98,8 +98,8 @@ pub(super) fn handle_icmpv6_echo_request(
let mut output_ip_packet = SmolPacket::from(output_ipv6_packet);
icmp_repr.emit(
// Directing fake reply back to the original source address.
&IpAddress::from(dst_addr),
&IpAddress::from(src_addr),
&dst_addr,
&src_addr,
&mut Icmpv6Packet::new_unchecked(output_ip_packet.payload_mut()),
&ChecksumCapabilities::default(),
);
Expand Down
10 changes: 8 additions & 2 deletions src/network/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use anyhow::Result;
use pretty_hex::pretty_hex;
use smoltcp::iface::{Config, SocketSet};
use smoltcp::socket::{tcp, Socket};
use smoltcp::wire::HardwareAddress;
use smoltcp::wire::{HardwareAddress, Ipv6Address};
use smoltcp::{
iface::{Interface, SocketHandle},
time::Instant,
Expand Down Expand Up @@ -64,12 +64,18 @@ impl<'a> TcpHandler<'a> {
ip_address
.push(IpCidr::new(IpAddress::v4(0, 0, 0, 1), 0))
.unwrap();
ip_address
.push(IpCidr::new(IpAddress::v6(0, 0, 0, 0, 0, 0, 0, 1), 0))
.unwrap();
});
// TODO: IPv6
iface
.routes_mut()
.add_default_ipv4_route(Ipv4Address::new(0, 0, 0, 1))
.unwrap();
iface
.routes_mut()
.add_default_ipv6_route(Ipv6Address::new(0, 0, 0, 0, 0, 0, 0, 1))
.unwrap();

TcpHandler {
iface,
Expand Down
4 changes: 2 additions & 2 deletions src/network/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ fn build_icmp6_echo_packet(
let mut output_ipv6_packet = Ipv6Packet::new_unchecked(buf);
ip_repr.emit(&mut output_ipv6_packet);
icmp_repr.emit(
&IpAddress::from(src_addr),
&IpAddress::from(dst_addr),
&src_addr,
&dst_addr,
&mut Icmpv6Packet::new_unchecked(output_ipv6_packet.payload_mut()),
&ChecksumCapabilities::default(),
);
Expand Down
4 changes: 1 addition & 3 deletions src/network/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ impl UdpHandler {
}

pub(crate) fn write_data(&mut self, id: ConnectionId, data: Vec<u8>) -> Option<UdpPacket> {
let Some((state, addrs)) = self.connections.get(&id) else {
return None;
};
let (state, addrs) = self.connections.get(&id)?;
// Refresh id lookup.
self.id_lookup.insert(*addrs, id);

Expand Down
2 changes: 1 addition & 1 deletion src/windows/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl IconCache {
let mut c = Cursor::new(Vec::new());
pixels
.to_image()
.write_to(&mut c, image::ImageOutputFormat::Png)
.write_to(&mut c, image::ImageFormat::Png)
.unwrap();
c.into_inner()
});
Expand Down
4 changes: 2 additions & 2 deletions wireguard-test-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ publish.workspace = true

[dependencies]
anyhow = "1.0.79"
data-encoding = "2.5.0"
data-encoding = "2.6.0"
boringtun = "0.6"
hex = "0.4"
smoltcp = "0.10"
smoltcp = "0.11"
Loading