Skip to content
Open
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
1,017 changes: 756 additions & 261 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.22" }
tun = { version = "0.8.5" }

[workspace.lints.clippy]
large_futures = "deny"
Expand Down
12 changes: 6 additions & 6 deletions mitmproxy-contentviews/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ publish.workspace = true
workspace = true

[dependencies]
anyhow = { version = "1.0.97", features = ["backtrace"] }
log = "0.4.27"
data-encoding = "2.8.0"
anyhow = { version = "1.0.102", features = ["backtrace"] }
log = "0.4.29"
data-encoding = "2.10.0"
pretty-hex = "0.4.1"
mitmproxy-highlight = { path = "../mitmproxy-highlight" }
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"
rmp-serde = "1.1"
rmp-serde = "1.3"
protobuf = "3.7.2"
regex = "1.10.3"
regex = "1.12.3"
flate2 = "1.1"
protobuf-parse = "3.7"

[dev-dependencies]
criterion = "0.7.0"
criterion = "0.8.2"

[[bench]]
name = "contentviews"
Expand Down
14 changes: 7 additions & 7 deletions mitmproxy-highlight/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ publish.workspace = true
workspace = true

[dependencies]
anyhow = { version = "1.0.97", features = ["backtrace"] }
tree-sitter = "0.25.8"
tree-sitter-css = "0.23.2"
tree-sitter-highlight = "0.25.8"
tree-sitter-javascript = "0.23.1"
anyhow = { version = "1.0.102", features = ["backtrace"] }
tree-sitter = "0.25.10"
tree-sitter-css = "0.25.0"
tree-sitter-highlight = "0.25.10"
tree-sitter-javascript = "0.25.0"
tree-sitter-xml = "0.7.0"
tree-sitter-yaml = "0.7.1"
tree-sitter-yaml = "0.7.2"

[dev-dependencies]
criterion = "0.7.0"
criterion = "0.8.2"

[[bench]]
name = "syntax_highlight"
Expand Down
14 changes: 7 additions & 7 deletions mitmproxy-linux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ mitmproxy-linux-ebpf-common = { path = "../mitmproxy-linux-ebpf-common"}
tun = { workspace = true, features = ["async"] }
aya = { workspace = true }
aya-log = { workspace = true }
tokio = { version = "1.47", 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"
prost = "0.14.1"
tokio = { version = "1.49", features = ["macros", "net", "rt-multi-thread", "sync", "io-util", "signal"] }
anyhow = { version = "1.0.102", features = ["backtrace"] }
log = "0.4.29"
env_logger = "0.11.9"
prost = "0.14.3"
internet-packet = { version = "0.2.0", features = ["checksums"] }
libc = "0.2.174"
const-sha1 = "0.3.0"

[target.'cfg(target_os = "linux")'.build-dependencies]
anyhow = { version = "1.0.97", features = ["backtrace"] }
aya-build = "0.1.2"
anyhow = { version = "1.0.102", features = ["backtrace"] }
aya-build = "0.1.3"
mitmproxy-linux-ebpf = { path = "../mitmproxy-linux-ebpf" }

[target.'cfg(target_os = "linux")'.dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion mitmproxy-macos/certificate-truster/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ rust-version.workspace = true
publish.workspace = true

[target.'cfg(target_os = "macos")'.dependencies]
security-framework = "3.2.0"
security-framework = "3.7.0"
86 changes: 29 additions & 57 deletions mitmproxy-macos/redirector/ipc/mitmproxy_ipc.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
}

/// Packet with associated tunnel info (Windows pipe to mitmproxy)
struct MitmproxyIpc_PacketWithMeta: @unchecked Sendable {
struct MitmproxyIpc_PacketWithMeta: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.

var data: Data = Data()

var tunnelInfo: MitmproxyIpc_TunnelInfo {
get {return _tunnelInfo ?? MitmproxyIpc_TunnelInfo()}
get {_tunnelInfo ?? MitmproxyIpc_TunnelInfo()}
set {_tunnelInfo = newValue}
}
/// Returns true if `tunnelInfo` has been explicitly set.
var hasTunnelInfo: Bool {return self._tunnelInfo != nil}
var hasTunnelInfo: Bool {self._tunnelInfo != nil}
/// Clears the value of `tunnelInfo`. Subsequent reads from it will return its default value.
mutating func clearTunnelInfo() {self._tunnelInfo = nil}

Expand All @@ -51,20 +51,20 @@ struct MitmproxyIpc_TunnelInfo: Sendable {
// methods supported on all messages.

var pid: UInt32 {
get {return _pid ?? 0}
get {_pid ?? 0}
set {_pid = newValue}
}
/// Returns true if `pid` has been explicitly set.
var hasPid: Bool {return self._pid != nil}
var hasPid: Bool {self._pid != nil}
/// Clears the value of `pid`. Subsequent reads from it will return its default value.
mutating func clearPid() {self._pid = nil}

var processName: String {
get {return _processName ?? String()}
get {_processName ?? String()}
set {_processName = newValue}
}
/// Returns true if `processName` has been explicitly set.
var hasProcessName: Bool {return self._processName != nil}
var hasProcessName: Bool {self._processName != nil}
/// Clears the value of `processName`. Subsequent reads from it will return its default value.
mutating func clearProcessName() {self._processName = nil}

Expand Down Expand Up @@ -113,7 +113,7 @@ struct MitmproxyIpc_FromProxy: Sendable {

/// Packet (macOS UDP Stream)
/// ⚠️ Bump network extension version on changes, https://github.com/mitmproxy/mitmproxy_rs/pull/227.
struct MitmproxyIpc_Packet: @unchecked Sendable {
struct MitmproxyIpc_Packet: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
Expand Down Expand Up @@ -182,20 +182,20 @@ struct MitmproxyIpc_TcpFlow: Sendable {
// methods supported on all messages.

var remoteAddress: MitmproxyIpc_Address {
get {return _remoteAddress ?? MitmproxyIpc_Address()}
get {_remoteAddress ?? MitmproxyIpc_Address()}
set {_remoteAddress = newValue}
}
/// Returns true if `remoteAddress` has been explicitly set.
var hasRemoteAddress: Bool {return self._remoteAddress != nil}
var hasRemoteAddress: Bool {self._remoteAddress != nil}
/// Clears the value of `remoteAddress`. Subsequent reads from it will return its default value.
mutating func clearRemoteAddress() {self._remoteAddress = nil}

var tunnelInfo: MitmproxyIpc_TunnelInfo {
get {return _tunnelInfo ?? MitmproxyIpc_TunnelInfo()}
get {_tunnelInfo ?? MitmproxyIpc_TunnelInfo()}
set {_tunnelInfo = newValue}
}
/// Returns true if `tunnelInfo` has been explicitly set.
var hasTunnelInfo: Bool {return self._tunnelInfo != nil}
var hasTunnelInfo: Bool {self._tunnelInfo != nil}
/// Clears the value of `tunnelInfo`. Subsequent reads from it will return its default value.
mutating func clearTunnelInfo() {self._tunnelInfo = nil}

Expand All @@ -214,20 +214,20 @@ struct MitmproxyIpc_UdpFlow: Sendable {
// methods supported on all messages.

var localAddress: MitmproxyIpc_Address {
get {return _localAddress ?? MitmproxyIpc_Address()}
get {_localAddress ?? MitmproxyIpc_Address()}
set {_localAddress = newValue}
}
/// Returns true if `localAddress` has been explicitly set.
var hasLocalAddress: Bool {return self._localAddress != nil}
var hasLocalAddress: Bool {self._localAddress != nil}
/// Clears the value of `localAddress`. Subsequent reads from it will return its default value.
mutating func clearLocalAddress() {self._localAddress = nil}

var tunnelInfo: MitmproxyIpc_TunnelInfo {
get {return _tunnelInfo ?? MitmproxyIpc_TunnelInfo()}
get {_tunnelInfo ?? MitmproxyIpc_TunnelInfo()}
set {_tunnelInfo = newValue}
}
/// Returns true if `tunnelInfo` has been explicitly set.
var hasTunnelInfo: Bool {return self._tunnelInfo != nil}
var hasTunnelInfo: Bool {self._tunnelInfo != nil}
/// Clears the value of `tunnelInfo`. Subsequent reads from it will return its default value.
mutating func clearTunnelInfo() {self._tunnelInfo = nil}

Expand All @@ -239,19 +239,19 @@ struct MitmproxyIpc_UdpFlow: Sendable {
fileprivate var _tunnelInfo: MitmproxyIpc_TunnelInfo? = nil
}

struct MitmproxyIpc_UdpPacket: @unchecked Sendable {
struct MitmproxyIpc_UdpPacket: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.

var data: Data = Data()

var remoteAddress: MitmproxyIpc_Address {
get {return _remoteAddress ?? MitmproxyIpc_Address()}
get {_remoteAddress ?? MitmproxyIpc_Address()}
set {_remoteAddress = newValue}
}
/// Returns true if `remoteAddress` has been explicitly set.
var hasRemoteAddress: Bool {return self._remoteAddress != nil}
var hasRemoteAddress: Bool {self._remoteAddress != nil}
/// Clears the value of `remoteAddress`. Subsequent reads from it will return its default value.
mutating func clearRemoteAddress() {self._remoteAddress = nil}

Expand Down Expand Up @@ -282,10 +282,7 @@ fileprivate let _protobuf_package = "mitmproxy_ipc"

extension MitmproxyIpc_PacketWithMeta: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".PacketWithMeta"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "data"),
2: .standard(proto: "tunnel_info"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}data\0\u{3}tunnel_info\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down Expand Up @@ -324,10 +321,7 @@ extension MitmproxyIpc_PacketWithMeta: SwiftProtobuf.Message, SwiftProtobuf._Mes

extension MitmproxyIpc_TunnelInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".TunnelInfo"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "pid"),
2: .standard(proto: "process_name"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}pid\0\u{3}process_name\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down Expand Up @@ -366,10 +360,7 @@ extension MitmproxyIpc_TunnelInfo: SwiftProtobuf.Message, SwiftProtobuf._Message

extension MitmproxyIpc_FromProxy: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".FromProxy"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "packet"),
2: .standard(proto: "intercept_conf"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}packet\0\u{3}intercept_conf\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down Expand Up @@ -436,9 +427,7 @@ extension MitmproxyIpc_FromProxy: SwiftProtobuf.Message, SwiftProtobuf._MessageI

extension MitmproxyIpc_Packet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".Packet"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "data"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}data\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down Expand Up @@ -468,9 +457,7 @@ extension MitmproxyIpc_Packet: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl

extension MitmproxyIpc_InterceptConf: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".InterceptConf"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "actions"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}actions\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down Expand Up @@ -500,10 +487,7 @@ extension MitmproxyIpc_InterceptConf: SwiftProtobuf.Message, SwiftProtobuf._Mess

extension MitmproxyIpc_NewFlow: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".NewFlow"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "tcp"),
2: .same(proto: "udp"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}tcp\0\u{1}udp\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down Expand Up @@ -570,10 +554,7 @@ extension MitmproxyIpc_NewFlow: SwiftProtobuf.Message, SwiftProtobuf._MessageImp

extension MitmproxyIpc_TcpFlow: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".TcpFlow"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "remote_address"),
2: .standard(proto: "tunnel_info"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}remote_address\0\u{3}tunnel_info\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down Expand Up @@ -612,10 +593,7 @@ extension MitmproxyIpc_TcpFlow: SwiftProtobuf.Message, SwiftProtobuf._MessageImp

extension MitmproxyIpc_UdpFlow: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".UdpFlow"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "local_address"),
3: .standard(proto: "tunnel_info"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}local_address\0\u{4}\u{2}tunnel_info\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down Expand Up @@ -654,10 +632,7 @@ extension MitmproxyIpc_UdpFlow: SwiftProtobuf.Message, SwiftProtobuf._MessageImp

extension MitmproxyIpc_UdpPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".UdpPacket"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "data"),
2: .standard(proto: "remote_address"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}data\0\u{3}remote_address\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down Expand Up @@ -696,10 +671,7 @@ extension MitmproxyIpc_UdpPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageI

extension MitmproxyIpc_Address: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".Address"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "host"),
2: .same(proto: "port"),
]
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}host\0\u{1}port\0")

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
Expand Down
12 changes: 6 additions & 6 deletions mitmproxy-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ crate-type = ["lib", "cdylib"]
mitmproxy = { path = "../" }
mitmproxy-highlight = { path = "../mitmproxy-highlight" }
mitmproxy-contentviews = { path = "../mitmproxy-contentviews" }
anyhow = { version = "1.0.97", features = ["backtrace"] }
data-encoding = "2.8.0"
log = "0.4.27"
anyhow = { version = "1.0.102", features = ["backtrace"] }
data-encoding = "2.10.0"
log = "0.4.29"
pyo3 = { version = "0.25", features = ["abi3", "abi3-py312", "anyhow"] }
pyo3-async-runtimes = { version = "0.25", 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.47", features = ["macros", "net", "rt-multi-thread", "sync"] }
tokio = { version = "1.49", features = ["macros", "net", "rt-multi-thread", "sync"] }
boringtun = "0.6"
tar = "0.4.44"
console-subscriber = { version = "0.4.1", optional = true }
console-subscriber = { version = "0.5.0", optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
nix = { version = "0.30.1", features = ["user"] }
nix = { version = "0.31.2", features = ["user"] }

[dev-dependencies]
env_logger = "0.11"
Expand Down
10 changes: 5 additions & 5 deletions mitmproxy-windows/redirector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ workspace = true

[target.'cfg(windows)'.dependencies]
mitmproxy = { path = "../../" }
tokio = { version = "1.47", features = ["macros", "net", "rt-multi-thread", "sync", "io-util"] }
anyhow = { version = "1.0.97", features = ["backtrace"] }
tokio = { version = "1.49", features = ["macros", "net", "rt-multi-thread", "sync", "io-util"] }
anyhow = { version = "1.0.102", features = ["backtrace"] }
windivert = "0.6.0"
lru_time_cache = "0.11.11"
log = "0.4.27"
env_logger = "0.11.5"
prost = "0.14.1"
log = "0.4.29"
env_logger = "0.11.9"
prost = "0.14.3"
internet-packet = { version = "0.2.2", features = ["checksums"] }

[target.'cfg(windows)'.dev-dependencies]
Expand Down
Loading
Loading