Skip to content

Commit

Permalink
build(deps): bump the dependencies group across 1 directory with 6 up…
Browse files Browse the repository at this point in the history
…dates (#142)

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

Bumps the dependencies group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [smoltcp](https://github.com/smoltcp-rs/smoltcp) | `0.10.0` | `0.11.0` |
| [image](https://github.com/image-rs/image) | `0.24.9` | `0.25.1` |
| [windows](https://github.com/microsoft/windows-rs) | `0.52.0` | `0.56.0` |
| [nix](https://github.com/nix-rust/nix) | `0.27.1` | `0.28.0` |
| [env_logger](https://github.com/rust-cli/env_logger) | `0.10.2` | `0.11.3` |
| [data-encoding](https://github.com/ia0/data-encoding) | `2.5.0` | `2.6.0` |



Updates `smoltcp` from 0.10.0 to 0.11.0
- [Release notes](https://github.com/smoltcp-rs/smoltcp/releases)
- [Changelog](https://github.com/smoltcp-rs/smoltcp/blob/main/CHANGELOG.md)
- [Commits](smoltcp-rs/smoltcp@v0.10.0...v0.11.0)

Updates `image` from 0.24.9 to 0.25.1
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](image-rs/image@v0.24.9...v0.25.1)

Updates `windows` from 0.52.0 to 0.56.0
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](microsoft/windows-rs@0.52.0...0.56.0)

Updates `nix` from 0.27.1 to 0.28.0
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](nix-rust/nix@v0.27.1...v0.28.0)

Updates `env_logger` from 0.10.2 to 0.11.3
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](rust-cli/env_logger@v0.10.2...v0.11.3)

Updates `data-encoding` from 2.5.0 to 2.6.0
- [Commits](https://github.com/ia0/data-encoding/commits)

---
updated-dependencies:
- dependency-name: smoltcp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: image
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: windows
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: data-encoding
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* [autofix.ci] apply automated fixes

* update Cargo.lock

* fix windows

* bump smoltcp

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <[email protected]>
  • Loading branch information
3 people authored May 16, 2024
1 parent 8ecc53c commit 312e95a
Show file tree
Hide file tree
Showing 10 changed files with 669 additions and 165 deletions.
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
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"

0 comments on commit 312e95a

Please sign in to comment.