Skip to content
Merged
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
18 changes: 18 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defguard_event_logger = { path = "./crates/defguard_event_logger", version = "0.
defguard_event_router = { path = "./crates/defguard_event_router", version = "0.0.0" }
defguard_mail = { path = "./crates/defguard_mail", version = "0.0.0" }
defguard_proto = { path = "./crates/defguard_proto", version = "0.0.0" }
defguard_session_manager = { path = "./crates/defguard_session_manager", version = "0.0.0" }
defguard_version = { path = "./crates/defguard_version", version = "0.0.0" }
defguard_web_ui = { path = "./crates/defguard_web_ui", version = "0.0.0" }
model_derive = { path = "./crates/model_derive", version = "0.0.0" }
Expand Down
1 change: 1 addition & 0 deletions crates/defguard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ defguard_core = { workspace = true }
defguard_event_router = { workspace = true }
defguard_event_logger = { workspace = true }
defguard_mail = { workspace = true }
defguard_session_manager = { workspace = true }
defguard_version = { workspace = true }

# external dependencies
Expand Down
17 changes: 14 additions & 3 deletions crates/defguard/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ use defguard_common::{
config::{Command, DefGuardConfig, SERVER_CONFIG},
db::{
init_db,
models::{Settings, settings::initialize_current_settings},
models::{
Settings,
User,
settings::initialize_current_settings,
// wireguard_peer_stats::WireguardPeerStats,
},
},
};
use defguard_core::{
auth::failed_login::FailedLoginMap,
db::{AppEvent, GatewayEvent, User},
db::AppEvent,
enterprise::{
activity_log_stream::activity_log_stream_manager::run_activity_log_stream_manager,
license::{License, run_periodic_license_check, set_cached_license},
Expand All @@ -23,7 +28,7 @@ use defguard_core::{
events::{ApiEvent, BidiStreamEvent, GrpcEvent, InternalEvent},
grpc::{
WorkerState,
gateway::{client_state::ClientMap, map::GatewayMap},
gateway::{client_state::ClientMap, events::GatewayEvent, map::GatewayMap},
run_grpc_bidi_stream, run_grpc_server,
},
init_dev_env, init_vpn_location, run_web_server,
Expand All @@ -35,6 +40,7 @@ use defguard_core::{
use defguard_event_logger::{message::EventLoggerMessage, run_event_logger};
use defguard_event_router::{RouterReceiverSet, run_event_router};
use defguard_mail::{Mail, run_mail_handler};
// use defguard_session_manager::run_session_manager;
use secrecy::ExposeSecret;
use tokio::sync::{broadcast, mpsc::unbounded_channel};

Expand Down Expand Up @@ -106,6 +112,7 @@ async fn main() -> Result<(), anyhow::Error> {
let (wireguard_tx, _wireguard_rx) = broadcast::channel::<GatewayEvent>(256);
let (mail_tx, mail_rx) = unbounded_channel::<Mail>();
let (event_logger_tx, event_logger_rx) = unbounded_channel::<EventLoggerMessage>();
// let (peer_stats_tx, peer_stats_rx) = unbounded_channel::<WireguardPeerStats>();

let worker_state = Arc::new(Mutex::new(WorkerState::new(webhook_tx.clone())));
let gateway_state = Arc::new(Mutex::new(GatewayMap::new()));
Expand Down Expand Up @@ -220,6 +227,10 @@ async fn main() -> Result<(), anyhow::Error> {
activity_log_stream_reload_notify.clone(),
activity_log_messages_rx
) => error!("Activity log stream manager returned early: {res:?}"),
// res = run_session_manager(
// pool.clone(),
// peer_stats_rx
// ) => error!("VPN client session manager returned early: {res:?}"),
}

Ok(())
Expand Down
7 changes: 7 additions & 0 deletions crates/defguard_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ rust-version.workspace = true
model_derive.workspace = true

anyhow.workspace = true
argon2.workspace = true
base32.workspace = true
base64.workspace = true
chrono.workspace = true
claims.workspace = true
clap.workspace = true
ed25519-dalek = { version = "2.2", features = ["rand_core"] }
humantime.workspace = true
Expand All @@ -24,13 +27,17 @@ reqwest.workspace = true
rsa.workspace = true
secrecy.workspace = true
serde.workspace = true
serde_cbor.workspace = true
sqlx.workspace = true
struct-patch.workspace = true
thiserror.workspace = true
tonic.workspace = true
totp-lite.workspace = true
tracing.workspace = true
utoipa.workspace = true
uuid.workspace = true
webauthn-rs.workspace = true
x25519-dalek.workspace = true

[dev-dependencies]
matches.workspace = true
Expand Down
Loading