diff --git a/dap-lib/src/client/doh_client_main.rs b/dap-lib/src/client/doh_client_main.rs deleted file mode 100644 index d092e87..0000000 --- a/dap-lib/src/client/doh_client_main.rs +++ /dev/null @@ -1,21 +0,0 @@ -use crate::{error::*, globals::Globals, http_client::HttpClientInner}; -use std::sync::Arc; -use tokio::sync::RwLock; - -#[derive(Debug)] -/// DoH, ODoH, MODoH client -pub struct DoHClient { - inner: Arc>, -} - -impl DoHClient { - /// Create a new DoH client - pub fn new(inner: Arc>) -> Self { - Self { inner } - } - - /// Make DoH query - pub async fn make_doh_query(&self, packet_buf: &[u8], globals: &Arc) -> Result> { - Ok(vec![]) - } -} diff --git a/dap-lib/src/client/mod.rs b/dap-lib/src/client/mod.rs deleted file mode 100644 index 91e4cbc..0000000 --- a/dap-lib/src/client/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -mod doh_client_main; - -pub use doh_client_main::DoHClient; - -#[derive(PartialEq, Eq, Debug, Clone)] -pub enum DoHMethod { - Get, - Post, -} diff --git a/dap-lib/src/constants.rs b/dap-lib/src/constants.rs index cee00ec..89fe2c3 100644 --- a/dap-lib/src/constants.rs +++ b/dap-lib/src/constants.rs @@ -39,8 +39,9 @@ pub const TOKEN_REFRESH_MARGIN: i64 = 120; /// every 60 secs, token is checked. then if the refresh condition is satisfied, refresh. /// this is to rapidly recover from the hibernation of PC on which this is working. (at most 60 secs is needed for recovery) pub const TOKEN_REFRESH_WATCH_DELAY: i64 = 60; - +/// wait for 10 secs before relogin pub const TOKEN_RELOGIN_WAITING_SEC: u64 = 10; +/// relogin at most 5 times pub const MAX_RELOGIN_ATTEMPTS: usize = 5; pub const HEALTHCHECK_TARGET_FQDN: &str = "dns.google."; // client