Skip to content

Commit

Permalink
chore: disable fake-ip store by default
Browse files Browse the repository at this point in the history
chore: disable fake-ip store by default
  • Loading branch information
greenhat616 committed Jan 18, 2025
1 parent 433ffd7 commit fe182a9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/tauri/src/enhance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@ pub async fn enhance() -> (Mapping, Vec<String>, PostProcessingOutput) {
}

fn use_cache(mut config: Mapping) -> Mapping {
if !config.contains_key("profile") {
let key = serde_yaml::Value::from("profile");
if config.contains_key(&key) {
tracing::debug!("Don't detect profile, set default profile for memorized profile");
let mut profile = Mapping::new();
profile.insert("store-selected".into(), true.into());
profile.insert("store-fake-ip".into(), true.into());
// Disable fake-ip store, due to the slow speed.
// each dns query should indirect to the file io, which is very very slow.
profile.insert("store-fake-ip".into(), false.into());
config.insert("profile".into(), profile.into());
}
config
Expand Down

0 comments on commit fe182a9

Please sign in to comment.