Skip to content

Commit

Permalink
Merge pull request #243 from DefGuard/dev
Browse files Browse the repository at this point in the history
Merge dev -> main
  • Loading branch information
t-aleksander authored Jun 25, 2024
2 parents a745630 + 74543c1 commit a269366
Show file tree
Hide file tree
Showing 47 changed files with 447 additions and 232 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#### Documentation ###

- [ ] If testing requires changes in the environment or deployment, please **update the documentation** (https://defguard.gitbook.io) first and **attach the link to the documentation** section in this pool request
- [ ] If testing requires changes in the environment or deployment, please **update the documentation** (https://defguard.gitbook.io) first and **attach the link to the documentation** section in this pull request
- [ ] I have commented on my code, particularly in hard-to-understand areas

#### Testing ###
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "defguard-client",
"private": false,
"version": "0.3.0",
"version": "0.4.0",
"type": "module",
"scripts": {
"dev": "npm-run-all --parallel vite typesafe-i18n",
Expand Down
16 changes: 11 additions & 5 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 23 additions & 10 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[package]
name = "defguard-client"
version = "0.3.0"
version = "0.4.0"
description = "Defguard desktop client"
license = ""
homepage = "https://github.com/DefGuard/client"
repository = "https://github.com/DefGuard/client"
default-run = "defguard-client"
edition = "2021"
rust-version = "1.60"
authors = ["Defguard"]

[build-dependencies]
tauri-build = { version = "1.5", features = [] }
Expand All @@ -16,10 +17,10 @@ prost-build = { version = "0.12" }

[dependencies]
anyhow = "1.0"
base64 = "0.21"
base64 = "0.22"
clap = { version = "4.4", features = ["derive", "env"] }
chrono = { version = "0.4", features = ["serde"] }
defguard_wireguard_rs = { git = "https://github.com/DefGuard/wireguard-rs.git", rev = "v0.4.4" }
defguard_wireguard_rs = { git = "https://github.com/DefGuard/wireguard-rs.git", rev = "v0.4.5" }
dirs = "5.0"
lazy_static = "1.4"
local-ip-address = "0.5"
Expand All @@ -31,13 +32,28 @@ rust-ini = "0.20"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_with = "3.5"
sqlx = { version = "0.7", features = ["chrono", "sqlite", "runtime-tokio", "uuid", "macros"] }
sqlx = { version = "0.7", features = [
"chrono",
"sqlite",
"runtime-tokio",
"uuid",
"macros",
] }
struct-patch = "0.4"
strum = { version = "0.25", features = ["derive"] }
dark-light = "1.0"
webbrowser = "0.8"

tauri = { version = "1.5", features = [ "dialog-all", "clipboard-all", "http-all", "window-all", "system-tray", "native-tls-vendored", "icon-png", "fs-all"] }
tauri = { version = "1.5", features = [
"dialog-all",
"clipboard-all",
"http-all",
"window-all",
"system-tray",
"native-tls-vendored",
"icon-png",
"fs-all",
] }
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
Expand All @@ -48,10 +64,7 @@ tonic = "0.10"
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
x25519-dalek = { version = "2", features = [
"getrandom",
"static_secrets",
] }
x25519-dalek = { version = "2", features = ["getrandom", "static_secrets"] }
reqwest = { version = "0.11", features = ["json"] }

[target.'cfg(target_os = "windows")'.dependencies]
Expand All @@ -64,7 +77,7 @@ nix = { version = "0.28", features = ["net"] }
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes.
# DO NOT REMOVE!!
custom-protocol = [ "tauri/custom-protocol" ]
custom-protocol = ["tauri/custom-protocol"]

[dev-dependencies]
tokio = { version = "1.34", features = ["full"] }
Binary file modified src-tauri/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square107x107Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square142x142Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square284x284Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square30x30Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square310x310Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square71x71Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square89x89Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/icon.icns
Binary file not shown.
Binary file modified src-tauri/icons/icon.ico
Binary file not shown.
Binary file modified src-tauri/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src-tauri/proto
Submodule proto updated 1 files
+1 −0 core/proxy.proto
Binary file modified src-tauri/resources/icons/tray-32x32-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/resources/icons/tray-32x32-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/resources/icons/tray-32x32-gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/resources/icons/tray-32x32-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions src-tauri/src/appstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ impl AppState {
info!("Removed connection from active connections: {removed_connection:#?}");
Some(removed_connection)
} else {
debug!("No active connection found with location_id: {location_id}");
None
}
}
Expand All @@ -97,11 +98,15 @@ impl AppState {
let active_connections = self.get_connections();
info!("Found {} active connections", active_connections.len());
for connection in active_connections {
debug!("Found active connection");
debug!(
"Found active connection with location {}",
connection.location_id
);
trace!("Connection: {connection:#?}");
debug!("Removing interface");
debug!("Removing interface {}", connection.interface_name);
disconnect_interface(connection, self).await?;
}
info!("All active connections closed");
Ok(())
}

Expand All @@ -123,7 +128,7 @@ impl AppState {
debug!("Found connection: {connection:#?}");
Some(connection.to_owned())
} else {
error!("Element with id: {id}, connection_type: {connection_type:?} not found.");
error!("Couldn't find connection with id: {id}, connection_type: {connection_type:?} in active connections.");
None
}
}
Expand Down
Loading

0 comments on commit a269366

Please sign in to comment.