diff --git a/common/authenticator-requests/src/v3/registration.rs b/common/authenticator-requests/src/v3/registration.rs index 70dceb7690..37234f7e1f 100644 --- a/common/authenticator-requests/src/v3/registration.rs +++ b/common/authenticator-requests/src/v3/registration.rs @@ -27,7 +27,7 @@ pub type HmacSha256 = Hmac; pub type Nonce = u64; pub type Taken = Option; -pub const BANDWIDTH_CAP_PER_DAY: u64 = 1024 * 1024 * 1024; // 1 GB +pub const BANDWIDTH_CAP_PER_DAY: u64 = 250 * 1024 * 1024 * 1024; // 250 GB #[derive(Serialize, Deserialize, Debug, Clone)] pub struct InitMessage { diff --git a/common/wireguard/src/peer_handle.rs b/common/wireguard/src/peer_handle.rs index 3b6f13d960..71fa06f847 100644 --- a/common/wireguard/src/peer_handle.rs +++ b/common/wireguard/src/peer_handle.rs @@ -6,7 +6,7 @@ use crate::peer_controller::PeerControlRequest; use defguard_wireguard_rs::host::Peer; use defguard_wireguard_rs::{host::Host, key::Key}; use futures::channel::oneshot; -use nym_authenticator_requests::v2::registration::BANDWIDTH_CAP_PER_DAY; +use nym_authenticator_requests::latest::registration::BANDWIDTH_CAP_PER_DAY; use nym_credential_verification::bandwidth_storage_manager::BandwidthStorageManager; use nym_gateway_storage::models::WireguardPeer; use nym_gateway_storage::Storage; @@ -18,7 +18,7 @@ use tokio::sync::{mpsc, RwLock}; use tokio_stream::{wrappers::IntervalStream, StreamExt}; pub(crate) type SharedBandwidthStorageManager = Arc>>; -const AUTO_REMOVE_AFTER: Duration = Duration::from_secs(60 * 60 * 24); // 24 hours +const AUTO_REMOVE_AFTER: Duration = Duration::from_secs(60 * 60 * 24 * 30); // 30 days pub struct PeerHandle { storage: St, @@ -98,7 +98,7 @@ impl PeerHandle { } else { if SystemTime::now().duration_since(self.startup_timestamp)? >= AUTO_REMOVE_AFTER { log::debug!( - "Peer {} has been present for 24 hours, removing it", + "Peer {} has been present for 30 days, removing it", self.public_key.to_string() ); let success = self.remove_peer().await?;