Skip to content

Commit b7507ea

Browse files
committed
feat(dgw): emit syslogs and Windows events for important events
Issue: DGW-63 Security: yes
1 parent 9ddf10c commit b7507ea

File tree

34 files changed

+2331
-28
lines changed

34 files changed

+2331
-28
lines changed

.cargo/mutants.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
skip_calls = ["emit_to_syslog", "emit_to_event_log"]
2+
exclude_re = ["impl Debug"]

Cargo.lock

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ members = [
66
"devolutions-gateway",
77
"devolutions-session",
88
"jetsocat",
9+
"testsuite",
910
"tools/generate-openapi",
1011
]
1112
default-members = [
@@ -36,6 +37,10 @@ strip = "symbols"
3637
tracing-appender = { git = "https://github.com/CBenoit/tracing.git", rev = "42097daf92e683cf18da7639ddccb056721a796c" }
3738

3839
[workspace.lints.rust]
40+
# Declare the custom cfgs.
41+
unexpected_cfgs = { level = "warn", check-cfg = [
42+
'cfg(build_profile, values("dev","release","production"))',
43+
]}
3944

4045
# == Safer unsafe == #
4146
unsafe_op_in_unsafe_fn = "warn"
@@ -55,6 +60,9 @@ noop_method_call = "warn"
5560
unused_crate_dependencies = "warn"
5661
unused_macro_rules = "warn"
5762

63+
[workspace.dependencies]
64+
proptest = "1.0"
65+
5866
[workspace.lints.clippy]
5967

6068
# == Safer unsafe == #

crates/proxy-socks/src/socks5.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,8 @@ impl From<io::ErrorKind> for Socks5FailureCode {
276276
match kind {
277277
io::ErrorKind::ConnectionRefused => Socks5FailureCode::ConnectionRefused,
278278
io::ErrorKind::TimedOut => Socks5FailureCode::TtlExpired,
279-
#[cfg(feature = "nightly")] // https://github.com/rust-lang/rust/issues/86442
280-
std::io::ErrorKind::HostUnreachable => Socks5FailureCode::HostUnreachable,
281-
#[cfg(feature = "nightly")] // https://github.com/rust-lang/rust/issues/86442
282-
std::io::ErrorKind::NetworkUnreachable => Socks5FailureCode::NetworkUnreachable,
279+
io::ErrorKind::HostUnreachable => Socks5FailureCode::HostUnreachable,
280+
io::ErrorKind::NetworkUnreachable => Socks5FailureCode::NetworkUnreachable,
283281
_ => Socks5FailureCode::GeneralSocksServerFailure,
284282
}
285283
}

crates/sysevent-codes/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "sysevent-codes"
3+
version = "0.0.0"
4+
edition = "2024"
5+
authors = ["Devolutions Inc. <infos@devolutions.net>"]
6+
license = "MIT OR Apache-2.0"
7+
publish = false
8+
9+
[lints]
10+
workspace = true
11+
12+
[dependencies]
13+
sysevent.path = "../sysevent"

0 commit comments

Comments
 (0)