Skip to content

Commit 8387195

Browse files
authored
Packet Filter support (#168)
1 parent 461ac71 commit 8387195

File tree

17 files changed

+2168
-409
lines changed

17 files changed

+2168
-409
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,49 @@
11
[package]
22
name = "defguard-gateway"
3-
version = "1.3.0"
3+
version = "1.3.1"
44
edition = "2021"
55

66
[dependencies]
77
axum = { version = "0.8", features = ["macros"] }
88
base64 = "0.22"
99
clap = { version = "4.5", features = ["derive", "env"] }
10-
defguard_wireguard_rs = { git = "https://github.com/DefGuard/wireguard-rs.git", rev = "v0.7.2" }
10+
defguard_wireguard_rs = { git = "https://github.com/DefGuard/wireguard-rs.git", rev = "v0.7.3" }
1111
env_logger = "0.11"
1212
gethostname = "1.0"
1313
ipnetwork = "0.21"
14+
libc = { version = "0.2", default-features = false }
1415
log = "0.4"
1516
prost = "0.13"
1617
serde = { version = "1.0", features = ["derive"] }
1718
syslog = "7.0"
1819
thiserror = "2.0"
19-
tonic = { version = "0.12", features = ["gzip", "tls", "tls-native-roots"] }
20-
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
20+
tokio = { version = "1", features = ["macros", "rt-multi-thread", "signal"] }
2121
tokio-stream = { version = "0.1", features = [] }
2222
toml = { version = "0.8", default-features = false, features = ["parse"] }
23+
tonic = { version = "0.12", default-features = false, features = [
24+
"codegen",
25+
"gzip",
26+
"prost",
27+
"tls-native-roots",
28+
] }
2329

2430
[target.'cfg(target_os = "linux")'.dependencies]
2531
nftnl = { git = "https://github.com/DefGuard/nftnl-rs.git", rev = "1a1147271f43b9d7182a114bb056a5224c35d38f" }
2632
mnl = "0.2"
2733

34+
[target.'cfg(any(target_os = "freebsd", target_os = "macos", target_os = "netbsd"))'.dependencies]
35+
nix = { version = "0.30", default-features = false, features = ["ioctl"] }
36+
2837
[dev-dependencies]
2938
tokio = { version = "1", features = ["io-std", "io-util"] }
39+
tonic = { version = "0.12", default-features = false, features = [
40+
"codegen",
41+
"prost",
42+
"transport",
43+
] }
3044
x25519-dalek = { version = "2.0", features = ["getrandom", "static_secrets"] }
3145

3246
[build-dependencies]
33-
prost-build = { version = "0.13" }
3447
tonic-build = { version = "0.12" }
3548
vergen-git2 = { version = "1.0", features = ["build"] }
3649

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
66
Emitter::default().add_instructions(&git2)?.emit()?;
77

88
// compiling protos using path on build time
9-
let mut config = prost_build::Config::new();
9+
let mut config = tonic_build::Config::new();
1010
// enable optional fields
1111
config.protoc_arg("--experimental_allow_proto3_optional");
1212
tonic_build::configure().compile_protos_with_config(

0 commit comments

Comments
 (0)